agent-command-authoring
Create Claude Code slash commands and OpenCode command files that delegate to subagents. Use when creating new commands or refactoring existing ones to follow the delegation pattern.
npx skills add majiayu000/claude-skill-registry --skill agent-command-authoring --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Agent Command Authoring Create commands that delegate to subagents for Claude Code and OpenCode. ## When to Use This Skill Use this skill when: - Creating a new custom command - Refactoring an existing command to delegate to a subagent - Ensuring consistency between Claude Code and OpenCode command implementations ## The Delegation Pattern Commands should be **thin wrappers** that delegate to subagents (which in turn delegate to skills): ``` command → subagent → skill ``` **Claude Code command** (`.claude/commands/<name>.md`): ```yaml --- description: Brief description of what the command does allowed-tools: Task(subagent-name) --- Use the `<subagent-name>` subagent to accomplish this task. ``` **OpenCode command** (`.config/opencode/command/<name>.md`): ```yaml --- description: Brief description of what the command does agent: <subagent-name> --- Use the `<subagent-name>` subagent to accomplish this task. ``` ## Claude Code Command Structure ### Frontmatter Fields | Field | Required | Description | |-------|----------|-------------| | `description` | Yes | 1-2 sentence description of what the command does | | `allowed-tools` | Yes | `Task(subagent-name)` to invoke the subagent |
- When to Use This Skill
- The Delegation Pattern
- Claude Code Command Structure
- Frontmatter Fields
- allowed-tools Format
- Naming Conventions
- OpenCode Command Structure
- Command Body
- Examples
- Minimal Command (Claude Code)
- Minimal Command (OpenCode)
- Command with Arguments (Claude Code)
- Why This Pattern?
- Anti-Pattern to Avoid
Check Claude Code subagent ls ~/.claude/agents/<subagent-name>.md Check OpenCode subagent ls ~/.config/opencode/agent/<subagent-name>.md
What does the agent-command-authoring skill do?
Create Claude Code slash commands and OpenCode command files that delegate to subagents. Use when creating new commands or refactoring existing ones to follow the delegation pattern.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill agent-command-authoring --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
