remove-spec

Delete a spec folder and remove it from index.json.

Command for Claude Code

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/jnarowski/agentcmd/remove-spec
Clone the repo
git clone --depth 1 https://github.com/jnarowski/agentcmd

Made for: Claude Code.

Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 480 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin unknown 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.00010 $0.00480
Opus 5 $0.00005 $0.00240
Sonnet 5 $0.00002 $0.00096
Haiku 4.5 $0.00001 $0.00048

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

Security

Grade C, and why

remove-spec scanned grade C with 1 finding 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 today.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Remove the spec folder using `rm -rf`
.claude/commands/remove-spec.md · 65 lines

What it actually says

Remove Spec

Permanently delete a spec folder and remove its entry from the specs index. This command does not ask for confirmation.

Variables

  • $spec-identifier: $1 (required) - The spec ID (e.g., "251112054939-workflow-resync"), name (e.g., "workflow-resync"), or relative/absolute path to the spec folder

Instructions

  • This command permanently deletes the spec folder - there is no confirmation step
  • Remove the spec entry from .agent/specs/index.json
  • If the spec is not found, report an error and list available specs
  • Handle both full spec IDs and partial name matches

Workflow

  1. Parse the spec identifier and locate the spec folder:

    • If $spec-identifier is an absolute path, use it directly
    • If it starts with .agent/specs/, treat as relative path
    • Otherwise, search .agent/specs/index.json for matching ID or name
    • Check all workflow folders: backlog/, todo/, in-progress/, done/
  2. Delete the spec folder and update index:

    • Remove the spec folder using rm -rf
    • Load .agent/specs/index.json
    • Remove the matching spec entry from the JSON
    • Write updated index back to file
  3. Report the deletion:

    • Show the spec name and folder that was deleted
    • Confirm removal from index.json

Error Handling

  • If spec not found: List all available specs with their IDs and locations
  • If index.json malformed: Report error and suggest manual inspection
  • If deletion fails: Report filesystem error

Examples

# Remove by full ID
/remove-spec 251112054939-workflow-resync

# Remove by name match
/remove-spec workflow-resync

# Remove by path
/remove-spec .agent/specs/todo/251112054939-workflow-resync

Report

Return:

  • Spec name and ID that was deleted
  • Full path to the deleted folder
  • Confirmation that index.json was updated
  • If error: Clear error message and list of available specs
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. today First seen · 65 lines · 10 tokens per session scan C efecf59d5793

Subscribe to this mod's changes

remove-spec is a command published in the GitHub repository jnarowski/agentcmd (18 stars, last pushed 8mo ago), licensed MIT. It adds 10 tokens to every session and 480 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.