.agents/skills/agent-command-authoring/SKILL.md
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 skillsauth add aspiers/ai-config agent-command-authoringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create commands that delegate to subagents for Claude Code and OpenCode.
Use this skill when:
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):
---
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):
---
description: Brief description of what the command does
agent: <subagent-name>
---
Use the `<subagent-name>` subagent to accomplish this task.
| Field | Required | Description |
|-------|----------|-------------|
| description | Yes | 1-2 sentence description of what the command does |
| allowed-tools | Yes | Task(subagent-name) to invoke the subagent |
| argument-hint | No | Hint for command arguments (e.g., [feature_name [subtask_number]]) |
For commands that delegate to subagents:
Task(subagent-name) - Invoke a subagentExample:
allowed-tools: Task(git-committer)
Command names should use the imperative form of verbs (telling the agent what to do):
commit, stage, lint, test, review, reflectcommitting, git-committer, do-lintingThe imperative form gives commands their characteristic feel:
| Field | Required | Description |
|-------|----------|-------------|
| description | Yes | 1-2 sentence description of what the command does |
| agent | Yes | Name of the subagent to invoke |
Example:
---
description: Create well-formatted commits using conventional commits style
agent: git-committer
---
The command body should be 5-20 lines maximum and contain only:
Use the `<subagent-name>` subagent to accomplish this task.
Do NOT include:
---
description: Create well-formatted commits using conventional commits style
allowed-tools: Task(git-committer)
---
Use the `git-committer` subagent to create a well-formatted commit.
---
description: Create well-formatted commits using conventional commits style
agent: git-committer
---
Use the `git-committer` subagent to create a well-formatted commit.
---
description: Generate a PRP
argument-hint: [feature_name]
allowed-tools: Task(prp-generator)
---
Use the `prp-generator` subagent to create a Product Requirements Prompt.
BAD - Command with full implementation:
---
description: Stage changes
allowed-tools: Bash(git add:*)
---
# Staging Changes
Stage relevant changes via `git add`...
1. Run `git status` to check for already staged changes
2. Verify no staged changes exist...
3. Run `git status` again...
4. Carefully review which files are relevant...
5. Stage only the relevant files...
6. Run `git status` again...
BAD - Command that delegates directly to skill (skipping subagent), for commands that do not need session context:
---
description: Stage changes via git add
allowed-tools: Skill(git-staging)
---
Use the `git-staging` skill to stage relevant changes.
GOOD - Command that delegates to subagent (for context-independent tasks):
---
description: Stage changes via git add
allowed-tools: Task(git-stager)
---
Use the `git-stager` subagent to stage relevant changes.
EXCEPTION - Commands that are inherently session-context-dependent (e.g. "review what I just wrote", "remove duplication I just introduced") should skip the subagent and invoke the skill directly. Subagents start with a fresh context and will not know what was recently worked on unless the parent agent tells them — which defeats the purpose of the command.
---
description: Remove code duplication you just introduced
allowed-tools: Skill(code-refactoring-dry)
---
Use the `code-refactoring-dry` skill to remove duplication in the files you
have worked on in this session.
In OpenCode, omit the agent: field entirely for the same effect (the command
then runs in the primary agent's context).
.claude/agents/<name>.md.config/opencode/agents/<name>.mdsubagent-authoring skill to create it firstallowed-tools: Task(subagent-name)agent: subagent-nameBefore creating a command, always verify the target subagent exists:
# Check Claude Code subagent
ls ~/.claude/agents/<subagent-name>.md
# Check OpenCode subagent
ls ~/.config/opencode/agents/<subagent-name>.md
If either file is missing, ask the user:
"The subagent
<subagent-name>doesn't exist yet. Would you like me to create it using thesubagent-authoringskill before proceeding with the command?"
Do NOT create commands that reference non-existent subagents.
subagent-authoring - For creating subagent definitions that delegate to skillsskill-authoring - For creating skills themselvesdevelopment
Run tests according to repository guidelines. Use after linting passes, before staging changes.
development
Orchestrate the complete development workflow for implementing sub-tasks from a task list. Use for end-to-end feature implementation with quality controls.
development
Implement a single sub-task from a task list. Use when working on feature development with existing task lists.
data-ai
Generate a detailed task list from a PRP. Use after a PRP is created and ready for implementation planning.