Create Claude Code agents following @plugins/meta-work/docs/HOW_TO_PROMPT_ENGINEERING.md principles.
/plugin marketplace add otrebu/agents/plugin install meta-work@otrebu-dev-toolsCreate Claude Code agents following @plugins/meta-work/docs/HOW_TO_PROMPT_ENGINEERING.md principles.
Parse $ARGUMENTS to determine creation mode:
/create-agent for plugin development-lifecycle analyzes deployment logs/create-agent with doc security scan for vulnerabilities/create-agent for doc CODE_REVIEW/create-agent analyzes API response times and generates performance reportNote: Modes can combine: /create-agent for plugin meta-work with doc validates command references
Current state of the codebase:
ls agents/*.md 2>/dev/null | sed 's|.*/||; s|\.md$||' || echo "none"ls docs/HOW_TO_*.md 2>/dev/null | sed 's|.*/||; s|HOW_TO_||; s|\.md$||' || echo "none"cat .claude-plugin/marketplace.json 2>/dev/null | grep '"name"' | cut -d'"' -f4 | paste -sd ',' - || echo "none"From $ARGUMENTS, extract:
Read, Grep, Glob, BashIf plugin-scoped:
cat .claude-plugin/marketplace.json | grep '"name": "{plugin-name}"' && echo "exists" || echo "missing"test -d plugins/{plugin-name} && echo "exists" || echo "missing"/create-plugin firstIf "for doc" mode:
test -f docs/HOW_TO_{DOC_NAME}.md && echo "exists" || echo "missing"/create-docCheck name conflicts:
test -f agents/{name}.md && echo "conflict" || echo "available"test -f plugins/{plugin}/agents/{name}.md && echo "conflict" || echo "available"If mode is "with doc", create the HOW_TO doc first:
Derive doc name from agent name:
Generate HOW_TO structure:
Create docs/HOW_TO_{DOC_NAME}.md following @plugins/meta-work/docs/HOW_TO_PROMPT_ENGINEERING.md.
Use Write tool to create the doc file.
Determine output location:
agents/{name}.mdplugins/{plugin}/agents/{name}.mdGenerate agent file:
For "for doc" or "with doc" modes:
---
name: {name}
description: {One-sentence description}
tools: Read, Grep, Glob, Bash
model: inherit
---
@docs/HOW_TO_{DOC_NAME}.md
Output a {name}-report.md file in the project root, then confirm creation.
For inline mode:
---
name: {name}
description: {One-sentence description}
tools: Read, Grep, Glob, Bash
model: inherit
---
{Follow agent template from @plugins/meta-work/docs/HOW_TO_PROMPT_ENGINEERING.md}
{Include sections: Role, Capabilities/Workflow, Output Format, Constraints}
Follow @plugins/meta-work/docs/HOW_TO_PROMPT_ENGINEERING.md for structure and style.
Before writing, verify:
Use Write tool to create:
docs/HOW_TO_{DOC_NAME}.mdagents/{name}.md or plugins/{plugin}/agents/{name}.mdReport what was created:
Inline mode:
Created agent: {name}
Location: {path to agent file}
This agent has inline instructions and can be invoked with:
@{name}
For doc mode:
Created agent: {name}
Location: {path to agent file}
References: docs/HOW_TO_{DOC_NAME}.md
This agent references existing documentation and can be invoked with:
@{name}
With doc mode:
Created agent with documentation:
✓ docs/HOW_TO_{DOC_NAME}.md (shared instructions)
✓ {path to agent file} (references doc)
This agent can be invoked with:
@{name}
The documentation can also be used by commands with:
@docs/HOW_TO_{DOC_NAME}.md
Plugin-scoped:
Created plugin agent: {name}
Plugin: {plugin-name}
Location: plugins/{plugin}/agents/{name}.md
[Additional info based on mode]
Input: /create-agent analyzes API response times and generates performance report
Output:
analyze-response-timesagents/analyze-response-times.md@analyze-response-timesInput: /create-agent for doc CODE_REVIEW
Prerequisites: docs/HOW_TO_CODE_REVIEW.md must exist
Output:
code-reviewagents/code-review.md@code-reviewInput: /create-agent with doc security scan for vulnerabilities
Output:
docs/HOW_TO_SECURITY_SCAN.md (new)security-scanagents/security-scan.md (references doc)@security-scanInput: /create-agent for plugin development-lifecycle analyzes deployment logs
Output:
analyze-logsplugins/development-lifecycle/agents/analyze-logs.mdInput: /create-agent for plugin meta-work with doc validates command references
Output:
docs/HOW_TO_VALIDATE_REFERENCES.md (new, in project root)plugins/meta-work/agents/validate-references.md (references doc)Input: /create-agent for plugin codebase-explorer for doc DEPENDENCY_ANALYSIS
Prerequisites: Plugin exists, doc exists
Output:
plugins/codebase-explorer/agents/dependency-analysis.mdRead, Grep, Glob, Bash{name}-report.md in project root@docs/HOW_TO_{NAME}.md syntaxExplicitly specify tools for clarity and security.
tools: Read, Grep, Glob, Bash
Read, Grep, Glob, BashWrite if creating filesEdit if modifying filesWebSearch/WebFetch only if external data neededTask only for orchestrator agentsAll agents should output a report file named {agent-name}-report.md in the project root, regardless of whether the agent is project-scoped or plugin-scoped. This ensures:
*-report.md files)