본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md6.1 KB
  • metadata.json719 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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):

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

Claude Code Command Structure

Frontmatter Fields

FieldRequiredDescription
descriptionYes1-2 sentence description of what the command does
allowed-toolsYesTask(subagent-name) to invoke the subagent
argument-hintNoHint for command arguments (e.g., [feature_name [subtask_number]])

allowed-tools Format

For commands that delegate to subagents:

  • Task(subagent-name) - Invoke a subagent

Example:

allowed-tools: Task(git-committer)

Naming Conventions

Command names should use the imperative form of verbs (telling the agent what to do):

  • ✅ commit, stage, lint, test, review, reflect
  • ❌ committing, git-committer, do-linting

The imperative form gives commands their characteristic feel:

  • "commit" = "perform a commit"
  • "stage" = "stage changes"
  • "test" = "run tests"

OpenCode Command Structure

Frontmatter Fields

FieldRequiredDescription
descriptionYes1-2 sentence description of what the command does
agentYesName of the subagent to invoke

Example:

---
description: Create well-formatted commits using conventional commits style
agent: git-committer
---

Command Body

The command body should be 5-20 lines maximum and contain only:

Use the `<subagent-name>` subagent to accomplish this task.

Do NOT include:

  • Full implementation steps
  • Duplicated content between Claude and OpenCode
  • More than ~20 lines of content

Examples

Minimal Command (Claude Code)

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

Minimal Command (OpenCode)

---
description: Create well-formatted commits using conventional commits style
agent: git-committer
---

Use the `git-committer` subagent to create a well-formatted commit.

Command with Arguments (Claude Code)

---
description: Generate a PRP
argument-hint: [feature_name]
allowed-tools: Task(prp-generator)
---

Use the `prp-generator` subagent to create a Product Requirements Prompt.

Why This Pattern?

  1. Single source of truth: Skills contain all implementation content
  2. Easier maintenance: Changes to skills automatically propagate
  3. Platform consistency: Commands are thin wrappers with platform-specific frontmatter
  4. Token efficiency: Subagents load skills progressively via progressive disclosure
  5. No duplication: Implementation lives in one place (the skill)
  6. Isolation: Subagents run in their own context with appropriate permissions

Anti-Pattern to Avoid

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):

---
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:

---
description: Stage changes via git add
allowed-tools: Task(git-stager)
---

Use the `git-stager` subagent to stage relevant changes.

Workflow

  1. Check for existing skill: Identify the skill the command should use
  2. Check for existing subagent: Look for a subagent that delegates to that skill
    • Claude Code: .claude/agents/<name>.md
    • OpenCode: .config/opencode/agent/<name>.md
  3. If no subagent exists: Ask the user if they want one created
    • If yes, use the subagent-authoring skill to create it first
    • If no, stop and explain the command cannot be created without a subagent
  4. Create/refactor Claude Code command with allowed-tools: Task(subagent-name)
  5. Create/refactor OpenCode command with agent: subagent-name
  6. Verify the full chain works: command → subagent → skill

Missing Subagent Handling

Before 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/agent/<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 the subagent-authoring skill before proceeding with the command?"

Do NOT create commands that reference non-existent subagents.

Related Skills

  • subagent-authoring - For creating subagent definitions that delegate to skills
  • skill-authoring - For creating skills themselves

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when you need to install the embedded robot agents into either .cursor/agents or .claude/agents, selecting the destination interactively and copying the embedded agent definitions from project assets. This should trigger for requests such as Install embedded agents; Bootstrap .cursor/agents; Bootstrap .claude/agents; Copy robot agents. Part of cursor-rules-java project

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

majiayu000/claude-skill-registry-data272026년 10월 20일 업데이트

Use when you need to generate an AGENTS.md file for a Java repository — covering project conventions, tech stack, file structure, commands, Git workflow, and contributor boundaries — through a modular, step-based interactive process that adapts to your specific project needs. This should trigger for requests such as Create AGENTS.md; Update AGENTS.md file; Add agent instructions. Part of cursor-rules-java project

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

majiayu000/claude-skill-registry-data272026년 10월 20일 업데이트

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape. Activate on "find expungement data", "scrape state laws", "legal research", "court URLs", "statute sources", "Clean Slate laws", "automatic expungement research". NOT for interpreting laws (use national-expungement-expert), building UI, or legal advice.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

majiayu000/claude-skill-registry-data272026년 10월 20일 업데이트

Generated by Gremlin Forge Meta-Agent 🍆👾⚡

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

majiayu000/claude-skill-registry-data272026년 10월 20일 업데이트

Work autonomously without waiting for hand-holding — complete tasks end-to-end without asking for permission at every step.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

majiayu000/claude-skill-registry-data272026년 10월 20일 업데이트

abmahnung

무료

Entwurf einer BAG-konformen Abmahnung im Arbeitsrecht – konkrete Schilderung der Pflichtverletzung, klare Verhaltenserwartung, ausdrückliche Sanktionsandrohung. Use when AG eine verhaltensbedingte Sanktion vor einer Kündigung dokumentieren muss oder AN die Wirksamkeit einer empfangenen Abmahnung prüft.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

majiayu000/claude-skill-registry-data272026년 10월 20일 업데이트

majiayu000의 스킬 모두 보기

이 스킬의 문제 신고