expertise-file-design
Design YAML expertise file structures for agent experts. Use when creating mental models for domain-specific agents, defining expertise schema, or structuring knowledge for Act-Learn-Reuse workflows.
What this skill does
# Expertise File Design
Guide for designing YAML expertise files that serve as mental models for agent experts.
## MANDATORY: Act-Learn-Reuse Context
Expertise files are **mental models**, NOT sources of truth. They:
- Accelerate agent execution by pre-loading domain knowledge
- Are maintained by self-improve prompts, not humans
- Validate against the actual codebase (source of truth)
- Have enforced line limits to protect context windows
## When to Use
- Creating mental models for new domain-specific agents
- Defining expertise schema structures (YAML)
- Structuring knowledge for Act-Learn-Reuse workflows
- Reviewing or auditing existing expertise file designs
- Setting up line limits and section priorities
## Expertise File Structure
### Core Template
```yaml
# {domain}/expertise.yaml
# Mental model for {domain} agent expert
# Last updated: {timestamp}
# Lines: {current}/{max}
overview:
description: "Brief description of this domain"
primary_technology: "Main tech/framework"
architecture_pattern: "Key pattern used"
core_implementation:
main_module:
file: "path/to/main/file.ext"
lines: approximate_line_count
purpose: "What this module does"
key_exports:
- name: "FunctionOrClass"
type: "function|class|constant"
purpose: "Brief description"
supporting_modules:
- file: "path/to/support.ext"
purpose: "Supporting functionality"
schema_structure: # For database/API domains
entities:
entity_name:
fields:
- name: "field_name"
type: "data_type"
constraints: "nullable, unique, etc."
relationships:
- target: "other_entity"
type: "one-to-many|many-to-many"
key_operations:
operation_category:
operation_name:
function: "function_name"
file: "path/to/file.ext"
signature: "func(param: Type) -> ReturnType"
logic: "Brief description of what it does"
edge_cases:
- "Important edge case 1"
- "Important edge case 2"
patterns_and_conventions:
naming:
- "Convention description"
error_handling:
- "How errors are handled"
data_flow:
- "How data moves through system"
best_practices:
- "Practice 1: Explanation"
- "Practice 2: Explanation"
known_issues:
- issue: "Issue description"
workaround: "How to handle it"
status: "open|resolved|wontfix"
integration_points:
- system: "External system name"
method: "How integration works"
considerations: "Important notes"
testing_notes:
- "How to test this domain"
- "Key test scenarios"
```
## Line Limits
| Domain Complexity | Max Lines | Guidance |
| --- | --- | --- |
| Small/Focused | 300 | Single module, simple operations |
| Medium | 500-600 | Multiple modules, moderate complexity |
| Large/Complex | 800-1000 | Full subsystem, many operations |
| **Absolute Max** | 1000 | Never exceed - split into sub-experts |
## Section Priority
When approaching line limits, prioritize sections in this order:
1. **core_implementation** - Essential for navigation
2. **key_operations** - Critical for task execution
3. **best_practices** - Prevents mistakes
4. **known_issues** - Avoids wasted effort
5. **patterns_and_conventions** - Nice to have
6. **testing_notes** - Can reference external docs
## Domain-Specific Templates
### Database Domain
```yaml
overview:
database_system: "PostgreSQL|MySQL|MongoDB|etc"
orm_pattern: "Raw SQL|ORM name|Query builder"
connection_strategy: "Pooling|Single|Per-request"
schema_structure:
tables:
table_name:
purpose: "What this table stores"
primary_key: "id (UUID|INT)"
fields: [...]
indexes: [...]
foreign_keys: [...]
key_operations:
crud:
create: {function: "", file: "", logic: ""}
read: {function: "", file: "", logic: ""}
update: {function: "", file: "", logic: ""}
delete: {function: "", file: "", logic: ""}
specialized:
bulk_insert: {...}
transaction_handling: {...}
```
### API/Service Domain
```yaml
overview:
api_style: "REST|GraphQL|gRPC"
auth_method: "JWT|OAuth|API Key"
versioning: "URL|Header|None"
endpoints:
resource_name:
base_path: "/api/v1/resource"
operations:
list: {method: "GET", auth: "required", pagination: "cursor"}
create: {method: "POST", auth: "required", validation: "..."}
request_response_patterns:
success_format: {...}
error_format: {...}
```
### Frontend/UI Domain
```yaml
overview:
framework: "React|Vue|Angular|etc"
state_management: "Redux|Zustand|Context|etc"
styling: "CSS Modules|Tailwind|Styled Components"
component_hierarchy:
pages:
- name: "PageName"
route: "/path"
children: [...]
shared:
- name: "ComponentName"
purpose: "Reusable for X"
state_structure:
stores:
store_name:
shape: {...}
actions: [...]
```
## Seeding Strategy
When creating a new expertise file:
1. **Start minimal** - Begin with overview and core_implementation only
2. **Let agent discover** - Run self-improve to populate
3. **Iterate** - Run self-improve until stable (no changes)
4. **Review** - Human validates accuracy
5. **Maintain** - Self-improve after every ACT
## Anti-Patterns
| Pattern | Problem | Solution |
| --- | --- | --- |
| Copy-pasting docs | Duplicates source of truth | Reference files, don't copy |
| Including code | Bloats file, goes stale | Reference by function name |
| No line limits | Context window overflow | Enforce max lines strictly |
| Manual updates | Human time wasted | Self-improve prompt only |
| Flat structure | Hard to navigate | Use nested YAML sections |
## Validation Checklist
Before considering an expertise file complete:
- [ ] Valid YAML syntax (no parse errors)
- [ ] Under line limit for domain complexity
- [ ] All file paths verified to exist
- [ ] All function names verified accurate
- [ ] Overview section complete
- [ ] Key operations documented
- [ ] Best practices included
- [ ] Known issues captured
## Related Skills
- `agent-expert-creation`: Full agent expert workflow
- `self-improve-prompt-design`: Maintaining expertise accuracy
- `meta-agentic-creation`: Building experts that build experts
---
**Last Updated:** 2025-12-15
## Version History
- **v1.0.0** (2025-12-26): Initial release
---
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.