skills/agent-development/SKILL.md
Use when creating Claude Code plugin agents (.md files in agents/ directory), writing agent descriptions for reliable triggering, designing agent system prompts, choosing agent tool sets, selecting agent models (haiku/sonnet/opus), or debugging why an agent doesn't trigger or triggers incorrectly. Use when the question is about Claude Code PLUGIN agents specifically. NEVER for general AI agent architecture (use ai-agents-architect). NEVER for agent memory design (use agent-memory-systems). NEVER for agent evaluation (use agent-evaluation).
npx skillsauth add sharkitect-solutions/sharkitect-claude-toolkit agent-developmentInstall 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.
Think like someone who has built 50 plugin agents and learned that 80% of agent problems are description problems — the agent exists, the system prompt is good, but it never triggers because the description doesn't match how users actually phrase requests.
Before building, decide which you need:
Does the user explicitly invoke this?
│
├─ YES, with a slash command → Build a COMMAND
│ (User types /review, /test, /deploy)
│
└─ NO, Claude should decide when to use it → Build an AGENT
│
├─ Should it trigger PROACTIVELY?
│ (After code is written, after tests pass, etc.)
│ └─ Agent with proactive examples in description
│
└─ Should it trigger REACTIVELY?
(When user asks "review this", "check for bugs", etc.)
└─ Agent with reactive examples in description
Most common mistake: Building an agent for something that should be a command. If the user will always explicitly ask for it with a known phrase, a command is simpler and more reliable.
The description determines whether your agent ever gets used. Claude sees ALL agent descriptions for every message and decides which to trigger. A perfect system prompt behind a bad description is invisible.
Too narrow ◄──────────────────────────────────► Too broad
"Use when user says 'review PR'" "Use when user needs help with code"
- Misses "check my changes" - Triggers on everything
- Misses "look over this PR" - Conflicts with other agents
- Agent almost never fires - Agent fires when it shouldn't
Sweet spot: Specific trigger conditions + varied example phrasings.
description: |
Use this agent when [2-3 specific trigger conditions].
[1 sentence on what it does, not how]. Examples:
<example>
Context: [Realistic scenario that LED to this request]
user: "[Natural phrasing A]"
assistant: "[Brief response showing agent use]"
<commentary>[WHY this agent fits]</commentary>
</example>
<example>
Context: [DIFFERENT scenario]
user: "[Natural phrasing B — different words, same intent]"
assistant: "[Response]"
<commentary>[WHY — different reasoning than example 1]</commentary>
</example>
| Quality Factor | Bad | Good | |---------------|-----|------| | Phrasing variety | Same words in all examples | Different phrasings for same intent | | Context specificity | "User needs help" | "User just implemented auth with JWT" | | Commentary | "Triggers the agent" | "Auth code written, proactively check for security patterns" | | Proactive coverage | Only reactive examples | Mix of reactive + proactive triggers | | Negative boundaries | No exclusions | "Do NOT use for general code questions" |
Reactive (user asks): Easy to get right. Match user phrasing in examples.
Proactive (Claude decides): Hard to get right. Requires:
The proactive triggering trap: If your proactive examples are too vague, the agent fires constantly and annoys users. Be specific about what conditions warrant proactive use.
The body of the agent .md file IS the system prompt. What makes it effective:
Most agents need this: tell the agent what to THINK ABOUT, not just what to DO.
You are [role] specializing in [domain].
Before starting, assess:
- What is the scope? (single file, module, entire project?)
- What matters most? (security, performance, correctness, style?)
- What context do I have? (CLAUDE.md conventions, recent changes?)
[Then provide process steps...]
| Failure | Symptom | Fix | |---------|---------|-----| | Too vague | Agent produces generic output | Add specific criteria, examples of good/bad output | | Too rigid | Agent can't handle variations | Use principles ("prioritize security") not scripts ("check line 42") | | No output format | Inconsistent results | Define exact section headings and content expectations | | No scope control | Agent tries to do everything | Add "Focus on X. Do NOT attempt Y." | | No edge cases | Agent crashes on unusual input | Add "If [unusual case], then [specific handling]" |
| Agent Purpose | Pattern | Key Elements | |--------------|---------|--------------| | Analyze/review code | Analysis | Severity tiers, file:line references, actionable recommendations | | Generate code/tests | Generation | Convention matching, quality standards, completeness checks | | Validate/check rules | Validation | Pass/fail criteria, violation details, fix suggestions | | Coordinate multi-step | Orchestration | Phase tracking, progress reporting, failure handling |
Load references/system-prompt-design.md for full pattern templates when implementing.
What does the agent need to DO?
│
├─ Read-only analysis → ["Read", "Grep", "Glob"]
│ (Code review, security scan, documentation check)
│
├─ Code generation → ["Read", "Write", "Grep", "Glob"]
│ (Test generation, docs generation, code scaffolding)
│
├─ System interaction → ["Read", "Write", "Bash", "Grep", "Glob"]
│ (Build verification, deployment, test execution)
│
└─ Full autonomy → omit tools field (gets all tools)
(Only for orchestration agents that need everything)
Principle of least privilege: Start with minimum tools. Add more only when the agent demonstrably needs them. An agent with Bash access that doesn't need it is a risk.
| Model | Cost | Best For | Avoid For |
|-------|------|----------|-----------|
| haiku | Lowest | Simple classification, formatting, quick checks | Complex reasoning, nuanced analysis |
| sonnet | Medium | Most agents — good balance of speed and quality | When you need maximum reasoning depth |
| opus | Highest | Complex multi-step reasoning, architecture decisions | Simple tasks (waste of money) |
| inherit | Parent's | Default — matches caller's model | When you specifically need different capability |
Default to inherit unless you have a reason. Common reasons to override:
| File | Purpose | When to Load | |------|---------|-------------| | SKILL.md | Decision frameworks, description engineering, anti-patterns | Always (auto-loaded) | | references/system-prompt-design.md | System prompt pattern templates (analysis, generation, validation, orchestration) | When writing a system prompt for a specific agent type | | references/triggering-examples.md | Example block format guide and template library | When writing agent description examples | | references/agent-creation-system-prompt.md | The exact prompt used by Claude Code for AI-assisted generation | When using AI-assisted agent creation | | examples/agent-creation-prompt.md | Complete agent generation template | When creating agents via prompt | | examples/complete-agent-examples.md | Full working agent examples | When you need a reference implementation |
Do NOT load reference files when making decisions about whether to build an agent, choosing between agent and command, or debugging triggering issues. The SKILL.md body covers those decisions.
| Rationalization | When It Appears | Why It's Wrong | |----------------|-----------------|----------------| | "The description just needs to say what it does" | Writing agent description | Description must say WHEN to trigger with varied example phrasings. "What it does" doesn't help Claude decide when to use it. | | "One example is enough" | Writing description examples | Different phrasings catch different user patterns. 2-4 examples with varied wording dramatically improve trigger reliability. | | "Give it all tools so it can handle anything" | Choosing agent tools | More tools = more ways for the agent to do something unexpected. Least privilege prevents unintended side effects. | | "I'll just use opus for everything" | Choosing model | Opus costs 10-15x more than haiku. Most agents work fine on inherit/sonnet. Use opus only for complex reasoning tasks. | | "The system prompt can be short, the agent will figure it out" | Writing system prompt | Agents without output format specs produce inconsistent results. Without edge case handling, they crash on unusual input. |
<example> blocks — triggering will be unreliabledevelopment
When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ad copy,' 'ad creative,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' or 'audience targeting.' This skill covers campaign strategy, ad creation, audience targeting, and optimization.
testing
--- name: using-sharkitect-methodology description: Use when starting any conversation in a Sharkitect workspace OR before any task involving NEW pricing, positioning, proposal, strategy, plan-execution, or schema-design work — mandates invocation of Sharkitect-specific methodology skills (pricing-strategy, marketing-strategy-pmm, smb-cfo, hq-revenue-ops, executing-plans, brainstorming) under the same anti-rationalization discipline as using-superpowers. Documentation has failed 4 times across H
testing
Use when user says 'end session', 'wrap up', 'stop for the day', 'done for today', 'close out', 'save session', 'wrapping up', or invokes /end-session. Runs the full 9-step end-of-session protocol: resource audit, MEMORY.md update, lessons capture, plan status, pending items, workspace checklist, .tmp/ audit, git commit+push, Supabase brain sync, session brief, summary. Final step schedules a detached self-kill of the current session ONLY (3s delay) so the window closes cleanly. Other claude.exe processes (active workspaces) are NOT touched -- orphan cleanup is handled separately by Claude-Orphan-Cleanup-Hourly with proper age safeguards. Do NOT use for: mid-session quick saves (use session-checkpoint), skill syncing (use sync-skills.py), brain memory queries (use supabase-sync.py pull), document freshness reviews (use document-lifecycle), resource gap detection (use resource-auditor).
testing
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, passive voice, negative parallelisms, and filler phrases.