convert-existing-command

A command converts an existing slash command into a new sibling command that delegates suitable batch work to a separate local-model session while retaining session-specific steps.

In plain words
What is it for?
Use it to convert commands that run tests, analyse diffs, generate files, or perform bulk edits, while reviewing whether delegation fits the command.
Why use it?
It can move self-contained processing out of the main session without changing the original command or overwriting an existing file.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/pcvelz/cloudone/convert-existing-command
Clone the repo
git clone --depth 1 https://github.com/pcvelz/cloudone
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,524 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00058 $0.01524
Opus 5 $0.00029 $0.00762
Sonnet 5 $0.00012 $0.00305
Haiku 4.5 $0.00006 $0.00152

Measured yesterday against content hash 02a7d9a4a3d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

convert-existing-command scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/convert-existing-command.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/convert-existing-command

$ARGUMENTS names the slash command to convert, and the name for the new sibling command: <source> <new-name>.

The output is a second command. The source file is never touched — not rewritten, not backed up, not moved. If both arguments are not present, ask; never guess a name and never write over an existing file.

Read .claude/docs/delegation-contract.md before you start. This command produces artifacts defined there (the state machine, the result schema, the contract block) and must not restate or reinvent them.

1. Locate the source

  • If the first argument resolves to a file, use it.
  • Otherwise search ./.claude/commands/*.md and ~/.claude/commands/*.md for a matching name. Multiple or zero matches → list what you found and ask which file to convert.
  • If the second argument is missing, ask for the sibling name. If a file with that name already exists, stop and ask — never overwrite.

2. Suitability check

Read the source command fully. Delegation fits when the body contains self-contained batch work: running a pipeline or test suite, analysing a diff, generating files, bulk edits.

It fits badly when the body is dominated by things that need the calling session: reading conversation context, asking the user questions mid-flow, or producing results the caller must act on immediately.

Badly-suited is not the same as impossible — that is what the split in the next section is for. Say in two sentences which parts look coupled to the caller, and let the split table resolve it. Only abandon the conversion if nothing substantial is left to delegate once the coupled steps are removed.

3. Architectural phase (before writing anything)

The communication design is fixed here, once, and then embedded in the emitted command. It is never decided at runtime. Produce three artifacts and show all three to the user for sign-off before emitting.

(a) The split table. Walk every step of the source body and answer one question: does this step need the caller's identity or conversation state? Yes → retained. No → delegated. Identity-bearing work includes anything stamped with the caller's session id, anything that reads the conversation, and anything the caller must act on immediately.

Read the full file on GitHub · 145 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 145 lines · 58 tokens per session scan A 02a7d9a4a3d3

Subscribe to this mod's changes

convert-existing-command is a command published in the GitHub repository pcvelz/cloudone (1 stars, last pushed 19d ago), licensed MIT. It adds 58 tokens to every session and 1,524 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.