generate_command

A command for creating a custom slash command in the `.claude/commands/` folder, using YAML metadata and common development tools.

In plain words
What is it for?
Use it when adding a command for a recurring development task involving files, tests, code searches, web research, or specialized agents.
Why use it?
It helps keep new commands consistent and gives them clear instructions, examples, and completion checks.

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/aegntic/compound-engineering/generate_command
Clone the repo
git clone --depth 1 https://github.com/aegntic/compound-engineering
Per session 14 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,026 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 91% copy Near-identical to another mod 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.00014 $0.01026
Opus 5 $0.00007 $0.00513
Sonnet 5 $0.00003 $0.00205
Haiku 4.5 $0.00001 $0.00103

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

Security

Grade A, and why

generate_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.

Origin

This is a copy

91% identical to generate_command — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/generate_command.md · 166 lines

How it starts

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

Create a Custom Claude Code Command

Create a new slash command in .claude/commands/ for the requested task.

Goal

#$ARGUMENTS

Key Capabilities to Leverage

File Operations:

  • Read, Edit, Write - modify files precisely
  • Glob, Grep - search codebase
  • MultiEdit - atomic multi-part changes

Development:

  • Bash - run commands (git, tests, linters)
  • Task - launch specialized agents for complex tasks
  • TodoWrite - track progress with todo lists

Web & APIs:

  • WebFetch, WebSearch - research documentation
  • Git - branches, diffs, commits
  • Playwright - browser automation, screenshots

Integrations:

  • Laravel Horizon - queue monitoring
  • Context7 - framework docs
  • Stripe, Todoist, Featurebase (if relevant)

Best Practices

  1. Be specific and clear - detailed instructions yield better results
  2. Break down complex tasks - use step-by-step plans
  3. Use examples - reference existing code patterns
  4. Include success criteria - tests pass, linting clean, etc.
  5. Think first - use "think hard" or "plan" keywords for complex problems
  6. Iterate - guide the process step by step

Required: YAML Frontmatter

EVERY command MUST start with YAML frontmatter:

---
name: command-name
description: Brief description of what this command does (max 100 chars)
argument-hint: "[what arguments the command accepts]"
---

Fields:

  • name: Lowercase command identifier (used internally)
  • description: Clear, concise summary of command purpose
  • argument-hint: Shows user what arguments are expected (e.g., [file path], [PR number], [optional: format])

Structure Your Command

# [Command Name]

[Brief description of what this command does]

## Steps

1. [First step with specific details]
   - Include file paths, patterns, or constraints
   - Reference existing code if applicable

2. [Second step]
   - Use parallel tool calls when possible
   - Check/verify results

3. [Final steps]
   - Run tests
   - Lint code
   - Commit changes (if appropriate)

## Success Criteria

- [ ] Tests pass
- [ ] Code follows style guide
- [ ] Documentation updated (if needed)

Read the full file on GitHub · 166 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 · 166 lines · 14 tokens per session scan A 16f0fa75424e

Subscribe to this mod's changes

generate_command is a command published in the GitHub repository aegntic/compound-engineering (2 stars, last pushed 2mo ago), licensed MIT. It adds 14 tokens to every session and 1,026 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to generate_command, differing in 14 lines, and is treated as a copy.