Create subagent definitions for Claude Code and OpenCode that delegate to skills. Use when creating new subagents or refactoring existing ones to follow the delegation pattern.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Create subagent definitions for Claude Code and OpenCode that delegate to skills. Use when creating new subagents or refactoring existing ones to follow the delegation pattern.
Subagent Authoring
Create subagents that delegate to skills for Claude Code and OpenCode.
When to Use This Skill
Use this skill when:
Creating a new subagent definition
Refactoring an existing agent to delegate to a skill
Ensuring consistency between Claude Code and OpenCode agent implementations
The Delegation Pattern
Agents should be thin wrappers that delegate all implementation to skills:
Bash(command:*) - Allow bash command with any arguments (note the colon)
Bash permission syntax (Claude Code uses colons, not spaces):
# Allow git commit with any argumentsBash(gitcommit:*)# Allow all git commandsBash(git:*)# Allow specific scriptBash(~/.agents/skills/my-skill/scripts/helper.py:*)
Single source of truth: Skills contain all implementation content
Easier maintenance: Changes to skills automatically propagate
Platform consistency: Agents are thin wrappers with platform-specific config
Token efficiency: Skills load progressively via progressive disclosure
No duplication: Implementation lives in one place
Anti-Pattern to Avoid
BAD - Agent with full implementation:
---name:code-linterdescription:Codelintingspecialisttools:Read,Grep,Glob,Bash---
Youareaseniorcodereviewerresponsibleforensuringthatcodechangespassalllinters...## When to Use This Agent PROACTIVELYAlways use immediately after:-Creatingnewsourcecodefiles-Modifyingexistingcode...## What This Agent Does1.**Discovers**allappropriatelinters...2.**Runs**formattingchecks...3.**Auto-fixes**issues...4.**Reports**remainingissues...## Linting ProcessRunlintersaccordingtorepositoryguidelines.Firstlookforlintingcommands in the following order:...