Right. Focus on injection mechanics and why it works, not what skills exist.
Not "here's all documentation upfront" - it's pull, not push:
Session starts → Minimal bootstrap injected
Agent encounters task → Agent searches for skill
Agent finds match → Agent reads SKILL.md
Agent uses skill → Follows instructions
Key: Context only loaded when needed. Main context stays clean.
Not documentation. Not guidelines. Executable process:
---
name: Thing To Do
when_to_use: Specific trigger conditions
---
# Overview
Core principle in 1-2 sentences
# Quick Reference
Pattern matching
# Implementation
Step-by-step checklist
# Supporting files
Tools/scripts if neededWhy it works:
- Frontmatter: Machine-parseable metadata
- Checklist: Unambiguous steps (→ TodoWrite)
when_to_use: Clear trigger conditions- Markdown: LLM-native format, easy to read/write
Skills tested against realistic failure modes:
Write skill → Test on subagent → Find ways subagent skips it
→ Strengthen language → Retest → Iterate until bulletproof
Uses persuasion principles not as hack but as reliability mechanism:
- Authority framing makes instructions stick
- Commitment patterns force acknowledgment
- Scarcity/pressure scenarios ensure compliance under stress
Result: Skills that survive adversarial testing actually work in practice.
Bootstrap establishes operating rules:
1. You have skills
2. Skills are discoverable (search tool)
3. If skill exists for task → YOU MUST USE IT
Not "helpful docs" - it's required procedure. Like aviation checklists.
Reinforced by:
- EXTREMELY_IMPORTANT framing
- Mandatory announcement ("I'm using X skill...")
- TodoWrite tracking for checklists
- Tested scenarios where agent tries to skip → fails test → skill strengthened
Two-phase discovery:
Phase 1: Search
find-skills [pattern] # Returns list with when_to_useAgent matches pattern to task.
Phase 2: Read & Execute
Read skill → Announce usage → Follow checklistWhy separation matters:
- Search is cheap (grep/metadata)
- Read is expensive (full file in context)
- Only read what's needed
Meta-skill that writes skills:
Agent learns pattern → Extracts to SKILL.md → Tests on subagents
→ If passes: Add to library → Future agents use it
Genius part: System gets smarter over time. Lessons codified, not lost.
Don't pollute main context with exploration:
Need to search? → Dispatch subagent with query
→ Subagent returns synthesis only
→ Main agent uses result
Principle: Keep main context for active work. Delegate research/search.
- RAG: Retrieves chunks, agent figures out what to do
- Skills: Retrieves instructions, agent executes
- System prompt: Fixed, everything upfront, context bloat
- Skills: Dynamic, loaded on-demand, scales indefinitely
- Docs: Reference material, agent interprets
- Skills: Executable procedures, agent follows
Skills are code for LLMs.
Not data. Not documentation. Executable procedures that:
- Load on-demand (JIT)
- Have clear triggers (
when_to_use) - Provide unambiguous steps (checklists)
- Are tested adversarially (TDD for docs)
- Use persuasion principles for reliability
- Self-improve (meta-skill writes skills)
The injection system:
- Minimal bootstrap (establish rules)
- Search tool (discovery)
- SKILL.md format (standard interface)
- Mandatory compliance (enforcement)
- Adversarial testing (quality gate)
Result: System that scales because context cost is O(1) per task, not O(n) for all knowledge.
Minimal Cookiecutter for Domain-Focused Agent System
Minimal cookiecutter for domain-focused agent system with Skills pattern mechanics:
Architecture
Three repos (like superpowers):
Minimal Essential Structure
1. Plugin (
my-agent/)plugin.json:
{ "name": "my-agent", "description": "Domain-focused agent with skills pattern", "version": "1.0.0" }hooks.json:
{ "hooks": { "SessionStart": [{ "matcher": "startup|resume|clear", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh" }] }] } }session-start.sh:
commands/find-skill:
2. Skills Repo (
my-agent-skills/)3. Core Skills (Minimal Set)
getting-started/SKILL.md (Bootstrap):
skills/meta/writing-skills/SKILL.md (Self-improvement):
skills/data-analysis/spreadsheet-analysis/SKILL.md (Example domain skill):
skills/research/web-research/SKILL.md (Example domain skill):
4. Marketplace (
my-agent-marketplace/)marketplace.json:
{ "name": "my-agent-marketplace", "owner": { "name": "Your Name" }, "plugins": [{ "name": "my-agent", "source": { "source": "github", "repo": "you/my-agent" }, "description": "Domain-focused agent with skills pattern", "strict": true }] }Installation Flow
Growth Pattern
Start with 3 skills:
Then:
Key Differences from Superpowers
Superpowers: Coding-focused (TDD, debugging, git workflows)
This: Domain-focused (research, data analysis, business tasks)
Both share:
Tools Integration
Already in Claude Code:
Add via skills/tools/:
Don't build custom MCP servers unless necessary - use what's built-in first.
Cookiecutter Repos
Need:
cookiecutter-agent-plugin→ Generates my-agent structurecookiecutter-agent-skills→ Generates my-agent-skills structurecookiecutter-agent-marketplace→ Generates marketplace structureOr just one cookiecutter that generates all three with proper git repo setup.