Agent skill

Dynamo Clone Hotpath Audit

by ai-dynamo in ai-dynamo/dynamo

Audit Dynamo Rust hot-path .clone() calls, explain which clones are removable and why, and only apply clone-removal patches when explicitly requested.

Apache-2.0Auto-check passed

Install Dynamo Clone Hotpath Audit

skills CLI
$ npx skills add ai-dynamo/dynamo --skill dynamo-clone-hotpath-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ai-dynamo/dynamo dynamo-clone-hotpath-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ai-dynamo/dynamo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/dynamo-clone-hotpath-audit .claude/skills/dynamo-clone-hotpath-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dynamo-clone-hotpath-audit
GitHub stars
8.2k
Token cost
~2k tokens
SKILL.md length
891 words
Files
2 (incl. scripts)
Skills in repo
27
Repo updated
First seen
Licence
Apache-2.0

At a glance

Audit Dynamo Rust hot-path .clone() calls, explain which clones are removable and why, and only apply clone-removal patches when explicitly requested.

  • Works in 7 steps: Build The Inventory → Split The Audit By Hot Path → Use Independent Review Roles → …
  • SKILL.md covers Purpose, Prerequisites, Instructions and Available Scripts, plus 2 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Dynamo Clone Hotpath Audit is an agent skill from ai-dynamo/dynamo. Audit Dynamo Rust hot-path .clone() calls, explain which clones are removable and why, and only apply clone-removal patches when explicitly requested.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/clone_inventory.py`).

It works with Rust. The repository describes itself as: A Datacenter Scale Distributed Inference Serving Framework. The licence is Apache-2.0.

Example prompts

  • “/dynamo-clone-hotpath-audit”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Build The Inventory
  2. Split The Audit By Hot Path
  3. Use Independent Review Roles
  4. Classify Every Candidate
  5. Patch In Small Batches
  6. Required Finding Format
  7. Validate Before Finishing

What it can do on your machine

Read from SKILL.md and the folder at commit 1668037. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dynamo Clone Hotpath Audit loads about 2k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 891 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ai-dynamo/dynamo at commit 1668037, republished under its Apache-2.0 licence (© ai-dynamo). 891 words, ~2,028 tokens.

Download SKILL.mdSave it as .claude/skills/dynamo-clone-hotpath-audit/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
dynamo-clone-hotpath-audit
description
Audit Dynamo Rust hot-path `.clone()` calls, explain which clones are removable and why, and only apply clone-removal patches when explicitly requested.
license
Apache-2.0
metadata.author
NVIDIA
metadata.tags
dynamo, rust, performance, code-review, allocation
metadata.permissions
file_read, file_write

Dynamo Clone Hotpath Audit

<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: CC-BY-4.0
-->

Purpose

Find .clone() calls in Dynamo Rust request, scheduling, KV, block-manager, and runtime hot paths that can be removed without changing ownership semantics. This is an audit-first workflow, not a blanket clone-removal tool.

Default behavior is read-only audit. Do not edit files, commit, or open a PR unless the user explicitly asks to fix, patch, apply, implement, or create an MR/PR. A skill invocation such as $dynamo-clone-hotpath-audit, "audit", "check", or "scan" is not patch permission.

Prerequisites

  • Rust source checkout of ai-dynamo/dynamo.
  • Python 3.10+ for the inventory script.
  • Ability to run targeted Rust validation commands for touched crates.
  • Subagent tooling if available. If subagents are unavailable, run the same roles as separate, explicit review passes and say they were not independent.

Instructions

1. Build The Inventory

Run the read-only scanner from the repository root:

bash
python3 .agents/skills/dynamo-clone-hotpath-audit/scripts/clone_inventory.py \
  --only-actionable \
  --limit 80

Use narrower paths when the user names a subsystem:

bash
python3 .agents/skills/dynamo-clone-hotpath-audit/scripts/clone_inventory.py \
  --paths lib/kv-router/src/scheduling lib/llm/src/backend.rs \
  --only-actionable

Treat the scanner as a triage aid. It ranks likely expensive clones but does not prove removability.

2. Split The Audit By Hot Path

Prioritize in this order:

  1. per-request LLM paths: lib/llm/src/backend.rs, preprocessor, HTTP/gRPC services, protocol conversion, migration
  2. KV routing and scheduling: lib/kv-router/src/scheduling, lib/kv-router/src/sequences, lib/kv-router/src/indexer
  3. KV/block manager event paths: lib/llm/src/block_manager, lib/bindings/kvbm/src/block_manager, lib/kvbm-engine/src/offload
  4. runtime request/transport paths: lib/runtime/src/component, lib/runtime/src/pipeline, lib/runtime/src/transports
  5. tests, examples, debug paths, and benchmark setup only after hot paths
3. Use Independent Review Roles

For non-trivial audits, use subagents. Give each subagent only the inventory slice and relevant source files, not your intended answer.

Required roles:

  • candidate finder: identify high-value clones and classify cheap/required ones
  • ownership refactorer: propose concrete borrow, move, Arc, or mem::take changes
  • correctness adversary: reject changes that alter sharing, extend lock lifetimes, borrow across .await, break spawned task ownership, or make APIs less clear
  • validation planner: choose the smallest tests, clippy commands, or benchmarks that prove the touched behavior

If two roles disagree, keep the clone unless you can write down a precise ownership proof and validation plan.

4. Classify Every Candidate

Use these buckets:

  • cheap required: Arc, sender, cancellation token, runtime handle, watch receiver, metrics handle, or tracing span clone needed to share ownership
  • semantic required: the original value must stay available for a later use, retry, fan-out, or async task
  • cold/test-only: outside production hot paths
  • removable move: value is cloned immediately before its final ownership use
  • removable borrow: callee does not need ownership and can accept &T, &str, slice, or iterator
  • structural refactor: requires changing data layout, e.g. Vec<T> to Arc<[T]>, or changing an API family

Do not patch candidates in the first three buckets.

5. Patch In Small Batches

Only run this section when the user explicitly asks for fixes or a patch. If the user only asked for an audit, stop after the report and list recommended patch batches as follow-up work.

Keep each patch batch narrow: one subsystem or one repeated pattern. Avoid a single repository-wide clone cleanup PR unless the user explicitly asks for it.

Preferred fixes:

  • move a value when the clone is immediately consumed and not used afterward
  • pass &T, &str, &[T], or an iterator when the callee only reads
  • consume batches with into_iter() instead of indexing and cloning
  • extract small Copy fields before moving a large event
  • use std::mem::take only when leaving the source value empty is part of the intended semantics
  • use Arc only when shared ownership is semantically right, not just to avoid borrow-checker work

Do not:

  • remove clones that cross tokio::spawn, channel send, callback storage, or task lifetime boundaries without proving ownership
  • extend mutex/RwLock guard lifetimes to avoid a clone
  • borrow across .await unless the borrow is local and compiler-verified
  • trade a clear cheap clone for a confusing lifetime-heavy API
  • make public APIs borrow data whose ownership was intentionally independent
Show full SKILL.md (275 more words)Show less
6. Required Finding Format

For every proposed change, report:

  • file:line
  • hot-path rationale
  • cloned value and likely clone cost
  • bucket and recommended change
  • removal rationale: why this clone is unnecessary, not only why it is expensive
  • required-clone check: why it is not cheap required or semantic required
  • correctness proof: why the old and new ownership semantics match
  • validation command

Example:

text
lib/llm/src/preprocessor.rs:123
Hot path: every embeddings request.
Cost: clones Vec<String> before moving into spawn_blocking.
Bucket: removable move.
Change: move input_strs into the closure.
Removal rationale: the clone feeds the only owned consumer and the original is
not read after closure construction.
Required-clone check: no fan-out, retry, async task sharing, or later logging
uses the original value.
Proof: the closure receives the same owned Vec<String>; all later behavior reads
from that moved value.
Validation: cargo test -p dynamo-llm preprocessor
7. Validate Before Finishing

If patches were made, always run formatting and the narrowest relevant Rust tests. For broad API changes, also run clippy or crate-level tests for each touched crate. If no patches were made, do not run tests just to make the audit look validated; report the inventory command and any read-only review checks.

Return:

  • clone candidates reviewed
  • candidates intentionally left alone and why
  • patches made, or none: audit-only
  • tests run and results, or not run: no files changed
  • residual high-value candidates that should be separate PRs

Available Scripts

ScriptPurposeArguments
scripts/clone_inventory.pyRank Rust .clone() call sites by hot-path likelihood and removal potential--paths, --limit, --format, --only-actionable, --include-tests

Invoke via the agentskills.io run_script() protocol:

python
run_script("scripts/clone_inventory.py", args=["--only-actionable", "--limit", "80"])

Output Contract

Return a concise audit report or PR summary with:

  • scope and inventory command
  • top findings with buckets
  • per finding: removal rationale, required-clone check, correctness proof, and validation command
  • exact refactors made, or none: audit-only
  • independent review role outcomes
  • validation commands and status
  • follow-up candidates excluded from the current audit or patch

Limitations

  • The scanner is heuristic and line-based. It can miss macro-expanded clones, multi-line ownership patterns, or clones hidden behind helper methods.
  • Some expensive-looking clones are required for async task ownership, fan-out, retries, or API clarity.
  • Performance impact is inferred unless backed by benchmarks or allocation profiles.

© ai-dynamo, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in .agents/skills/dynamo-clone-hotpath-audit of ai-dynamo/dynamo.

  • SKILL.md
  • scripts/clone_inventory.py

Open the folder on GitHubat commit 1668037

Compare with similar skills

Dynamo Clone Hotpath Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dynamo Clone Hotpath Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dynamo Clone Hotpath Audit this skillai-dynamo/dynamo8.2k—~2kAutomated safety check: PassApache-2.0
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0
Firecrawl Page Scrape Integrationfirecrawl/firecrawl190k1 repos~944Automated safety check: PassISC
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Rust TDD Workflowrtk-ai/rtk83k—~753Automated safety check: NotesApache-2.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Adds Firecrawl's /scrape endpoint to application code to pull markdown, HTML, links, screenshots or structured data from a single known URL.

    190k GitHub starsUsed in 1 repo~944 tokens
    Data & AnalyticsAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Enforces red-green-refactor for Rust work, with idiomatic test patterns, a naming convention and a pre-commit gate of cargo fmt, clippy and test.

    83k GitHub stars~753 tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from ai-dynamo/dynamo

All 27 skills in this repo
  • Visual Review

    ai-dynamo/dynamo

    Create self-contained interactive HTML code-review dashboards from GitHub or GitLab pull requests, checked-out branch diffs, or supplied unified diffs, with correctness and safe-to-merge scores…

    8.2k GitHub stars~4.5k tokensUpdated today
    Auto-check passed
  • Fern Components

    ai-dynamo/dynamo

    Knowledge of Fern's built-in MDX component library (accordions, callouts, cards, steps, tabs, code blocks, API-reference snippets, and more) for authoring docs pages.

    8.2k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Fern Navigation

    ai-dynamo/dynamo

    Knowledge of Fern's site-level navigation and structure configuration — how a docs site is organized in docs.yml (and product/version .yml files) using sections, pages, folders, tabs, tab variants…

    8.2k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Dynamo Agent Harness

    ai-dynamo/dynamo

    Drives persistent Claude Code, Codex, or OpenCode agent sessions through a Dynamo OpenAI/Anthropic-compatible endpoint over Agent Client Protocol (ACP).

    8.2k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Benchmark and profile the Dynamo frontend (dynamo.frontend HTTP + tokenizer + KV router) against mock workers (dynamo.mocker).

    8.2k GitHub stars~3.5k tokensUpdated today
    Auto-check: notes
  • Selects and freezes a question-driven AIPerf workload, objective, load policy, and Kubernetes execution manifest for a successfully deployed Dynamo candidate.

    8.2k GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Works with

Questions about Dynamo Clone Hotpath Audit

What does Dynamo Clone Hotpath Audit do?

Audit Dynamo Rust hot-path .clone() calls, explain which clones are removable and why, and only apply clone-removal patches when explicitly requested. Dynamo Clone Hotpath Audit is an agent skill from ai-dynamo/dynamo.clone() calls, explain which clones are removable and why, and only apply clone-removal patches when explicitly requested.

How do I install Dynamo Clone Hotpath Audit in Claude Code?

Run `npx skills add ai-dynamo/dynamo --skill dynamo-clone-hotpath-audit -a claude-code`. Or copy the skill folder (.agents/skills/dynamo-clone-hotpath-audit in ai-dynamo/dynamo) into .claude/skills/dynamo-clone-hotpath-audit in your project. Claude Code loads it when a task matches its description.

How do I install Dynamo Clone Hotpath Audit in Codex?

Run `npx skills add ai-dynamo/dynamo --skill dynamo-clone-hotpath-audit -a codex`. Or copy the skill folder (.agents/skills/dynamo-clone-hotpath-audit in ai-dynamo/dynamo) into .agents/skills/dynamo-clone-hotpath-audit in your project. Codex loads it when a task matches its description.

Can I use Dynamo Clone Hotpath Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-dynamo/dynamo --skill dynamo-clone-hotpath-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dynamo-clone-hotpath-audit, .gemini/skills/dynamo-clone-hotpath-audit, .github/skills/dynamo-clone-hotpath-audit and .opencode/skills/dynamo-clone-hotpath-audit in your project.

What does Dynamo Clone Hotpath Audit need to run?

Going by SKILL.md and its folder, Dynamo Clone Hotpath Audit needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Dynamo Clone Hotpath Audit access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dynamo Clone Hotpath Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Dynamo Clone Hotpath Audit use?

Dynamo Clone Hotpath Audit is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dynamo Clone Hotpath Audit use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dynamo Clone Hotpath Audit?

Skills that share tags, products or a category with Dynamo Clone Hotpath Audit: Update V8 Version (openinterpreter/openinterpreter, 69k stars), Firecrawl Page Scrape Integration (firecrawl/firecrawl, 190k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars) and Rust TDD Workflow (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dynamo Clone Hotpath Audit?

ai-dynamo (a GitHub organization) maintains it in ai-dynamo/dynamo, which has 8,245 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 8, 2026.

Source: ai-dynamo/dynamo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.