feat(skills): modernize capability-writing with Anthropic best practices

Updates capability-writing skill with progressive disclosure structure based on
Anthropic's January 2025 documentation. Implements Haiku-first approach (12x
cheaper, 2-5x faster than Sonnet).

Key changes:
- Add 5 core principles: conciseness, progressive disclosure, script bundling,
  degrees of freedom, and Haiku-first model selection
- Restructure with best-practices.md, templates/, examples/, and reference/
- Create 4 templates: user-invocable skill, background skill, agent, helper script
- Add 3 examples: simple workflow, progressive disclosure, with scripts
- Add 3 reference docs: frontmatter fields, model selection, anti-patterns
- Update create-capability to analyze complexity and recommend structures
- Default all new skills/agents to Haiku unless justified

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-11 18:10:53 +01:00
parent 7406517cd9
commit f424a7f992
13 changed files with 2612 additions and 229 deletions

View File

@@ -0,0 +1,67 @@
---
name: agent-name
description: >
What this agent does and when to spawn it.
Include specific conditions that indicate this agent is needed.
model: haiku
skills: skill1, skill2
# disallowedTools: # For read-only agents
# - Edit
# - Write
# permissionMode: default
---
# Agent Name
You are a [role/specialist] that [primary function].
## When Invoked
You are spawned when [specific conditions].
Follow this process:
1. **Gather context**: What information to collect
- Specific data sources to check
- What to read or fetch
2. **Analyze**: What to evaluate
- Criteria to check
- Standards to apply
3. **Act**: What actions to take
- Specific operations
- What to create or modify
4. **Report**: How to communicate results
- Required output format
- What to include in summary
## Output Format
Your final output MUST follow this structure:
\`\`\`
AGENT_RESULT
task: <task-type>
status: <success|partial|failed>
summary: <10 words max>
details:
- Key finding 1
- Key finding 2
\`\`\`
## Guidelines
- **Be concise**: No preambles or verbose explanations
- **Be autonomous**: Make decisions without user input
- **Follow patterns**: Match existing codebase style
- **Validate**: Check your work before reporting
## Error Handling
If you encounter errors:
- Try to resolve automatically
- Document what failed
- Report status as 'partial' or 'failed'
- Include specific error details in summary