Standardized patterns for how agents discover, reference, and compose skills using progressive disclosure architecture
Provides standardized patterns for agents to discover and reference skills using progressive disclosure architecture. Activates when working with agent prompts, implementing new agents/skills, or optimizing context usage.
/plugin marketplace add akaszubski/autonomous-dev/plugin install autonomous-dev@autonomous-devThis skill is limited to using the following tools:
docs/progressive-disclosure.mddocs/skill-composition.mddocs/skill-discovery.mdexamples/agent-template.mdexamples/composition-example.mdexamples/skill-reference-diagram.mdStandardized patterns for how agents discover, reference, and use skills effectively in Claude Code 2.0+.
The skill-integration skill provides standardized patterns for:
Progressive disclosure is a design pattern where:
Without progressive disclosure:
With progressive disclosure:
┌─────────────────────────────────────────────────────────┐
│ Agent Context │
│ │
│ Agent Prompt: ~500 tokens │
│ Skill Metadata: 20 skills × 50 tokens = 1,000 tokens │
│ Task Description: ~200 tokens │
│ │
│ Total: ~1,700 tokens (efficient!) │
└─────────────────────────────────────────────────────────┘
│
│ Agent encounters keyword
│ matching skill
↓
┌─────────────────────────────────────────────────────────┐
│ Skill Content Loads On-Demand │
│ │
│ Skill Full Content: ~5,000 tokens │
│ Loaded only when needed │
│ │
│ Total context: 1,700 + 5,000 = 6,700 tokens │
│ Still efficient! │
└─────────────────────────────────────────────────────────┘
Skills auto-activate when task keywords match skill keywords:
Example: testing-guide skill
---
name: testing-guide
keywords: test, testing, pytest, tdd, coverage, fixture
auto_activate: true
---
Task triggers skill:
Agents can explicitly reference skills in their prompts:
## Relevant Skills
You have access to these specialized skills:
- **testing-guide**: Pytest patterns, TDD workflow, coverage strategies
- **python-standards**: Code style, type hints, docstring conventions
- **security-patterns**: Input validation, authentication, OWASP compliance
Benefits:
Complex tasks often require multiple skills:
Example: Implementing authenticated API endpoint
Task: "Implement JWT authentication for user API endpoint"
Skills activated:
1. **api-design** - REST API patterns, endpoint structure
2. **security-patterns** - JWT validation, authentication best practices
3. **python-standards** - Code style, type hints
4. **testing-guide** - Security testing patterns
5. **documentation-guide** - API documentation standards
Progressive disclosure:
- All 5 skill metadata in context (~250 tokens)
- Full content loads only as needed (~20,000 tokens total)
- Agent accesses relevant sections progressively
Skills can reference other skills:
## Relevant Skills
- **testing-guide**: Testing patterns (references python-standards for test code style)
- **security-patterns**: Security best practices (references api-design for secure endpoints)
- **documentation-guide**: Documentation standards (references python-standards for docstrings)
Benefits:
Every agent should include a "Relevant Skills" section:
## Relevant Skills
You have access to these specialized skills when [agent task]:
- **[skill-name]**: [Brief description of what guidance this provides]
- **[skill-name]**: [Brief description of what guidance this provides]
- **[skill-name]**: [Brief description of what guidance this provides]
**Note**: Skills load automatically based on task keywords. Consult skills for detailed guidance on specific patterns.
✅ Do's:
name: field)❌ Don'ts:
## Relevant Skills
You have access to these specialized skills when implementing features:
- **python-standards**: Code style, type hints, docstring conventions
- **api-design**: REST API patterns, error handling
- **database-design**: Query optimization, schema patterns
- **testing-guide**: Writing tests alongside implementation
- **security-patterns**: Input validation, secure coding practices
- **observability**: Logging, metrics, tracing
- **error-handling-patterns**: Standardized error handling and recovery
**Note**: Skills load automatically based on task keywords. Consult skills for detailed guidance on specific patterns.
Token impact:
Typical agent with verbose "Relevant Skills" section:
Before (verbose inline guidance):
## Relevant Skills
### Testing Patterns
- Use pytest for all tests
- Follow Arrange-Act-Assert pattern
- Use fixtures for setup
- Aim for 80%+ coverage
- [... 300 more words ...]
### Code Style
- Use black for formatting
- Add type hints to all functions
- Write Google-style docstrings
- [... 200 more words ...]
### Security
- Validate all inputs
- Use parameterized queries
- [... 150 more words ...]
Token count: ~500 tokens
After (skill references):
## Relevant Skills
You have access to these specialized skills when implementing features:
- **testing-guide**: Pytest patterns, TDD workflow, coverage strategies
- **python-standards**: Code style, type hints, docstring conventions
- **security-patterns**: Input validation, secure coding practices
**Note**: Skills load automatically based on task keywords. Consult skills for detailed guidance.
Token count: ~150 tokens
Savings: 350 tokens per agent (70% reduction)
With inline guidance (doesn't scale):
With skill references (scales infinitely):
Before:
## Relevant Skills
### Research Patterns
When researching, follow these best practices:
- Start with official documentation
- Check multiple sources for accuracy
- Document sources with URLs
- Identify common patterns across sources
- Note breaking changes and deprecations
- Verify information is current (check dates)
- Look for code examples and real-world usage
- [... 400 more words ...]
Token count: ~600 tokens
After:
## Relevant Skills
You have access to these specialized skills when researching:
- **research-patterns**: Web research methodology, source evaluation
- **documentation-guide**: Documentation standards for research findings
**Note**: Skills load automatically based on task keywords.
Token count: ~100 tokens
Savings: 500 tokens (83% reduction)
Before:
## Relevant Skills
### Architecture Patterns
Follow these architectural patterns:
- [... 300 words ...]
### API Design
When designing APIs:
- [... 250 words ...]
### Database Design
For database schemas:
- [... 200 words ...]
### Testing Strategy
Plan testing approach:
- [... 200 words ...]
Token count: ~700 tokens
After:
## Relevant Skills
You have access to these specialized skills when planning:
- **architecture-patterns**: Design patterns, SOLID principles
- **api-design**: REST API patterns, versioning strategies
- **database-design**: Schema design, query optimization
- **testing-guide**: Test strategy, coverage planning
**Note**: Skills load automatically based on task keywords.
Token count: ~130 tokens
Savings: 570 tokens (81% reduction)
For comprehensive skill integration guidance:
All 20 agents in the autonomous-dev plugin follow this skill integration pattern:
Result: 20-30% token reduction in agent prompts while maintaining full access to specialized knowledge.
Version: 1.0.0 Type: Knowledge skill (no scripts) See Also: agent-output-formats, documentation-guide, python-standards
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.