agent-builder
Build specialized sub-agents for the workflow system
What this skill does
# Agent Builder Skill
> Build specialized sub-agents for the workflow system.
## Overview
Sub-agents are specialized AI assistants that handle specific domains:
- **Researcher** - Information gathering, fact-checking
- **Coder** - Code generation, debugging, refactoring
- **Writer** - Content creation, editing, formatting
- **Analyst** - Data analysis, visualization, reporting
## Agent Architecture
```
┌─────────────────────────────────────────────┐
│ ORCHESTRATOR │
│ Routes requests to appropriate sub-agent │
└─────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│Researcher│ │ Coder │ │ Writer │
└─────────┘ └─────────┘ └─────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────┐
│ RAG SERVER │
│ (shared knowledge base) │
└─────────────────────────────────────────────┘
```
## Build Steps
### Step 1: Agent Registry
**File: `agents/registry.yaml`**
```yaml
# Agent Registry - Defines available agents and capabilities
orchestrator:
name: Orchestrator
description: Routes tasks and coordinates sub-agents
model: claude-sonnet-4-20250514
max_tokens: 4096
sub_agents:
researcher:
name: Research Agent
description: Information gathering and synthesis
capabilities:
- web_search
- rag_query
- summarization
- fact_checking
tools:
- rag_search
- rag_ingest
prompt: agents/sub-agents/researcher/prompts/system.md
coder:
name: Coding Agent
description: Code generation, review, and debugging
capabilities:
- code_generation
- debugging
- refactoring
- code_review
tools:
- file_read
- file_write
prompt: agents/sub-agents/coder/prompts/system.md
writer:
name: Writing Agent
description: Content creation and editing
capabilities:
- content_creation
- editing
- formatting
tools:
- rag_search
prompt: agents/sub-agents/writer/prompts/system.md
analyst:
name: Analysis Agent
description: Data analysis and visualization
capabilities:
- data_analysis
- visualization
- reporting
tools:
- code_execution
- rag_search
prompt: agents/sub-agents/analyst/prompts/system.md
```
### Step 2: Agent Prompts
**File: `agents/sub-agents/researcher/prompts/system.md`**
```markdown
# Research Agent
You are a specialized Research Agent focused on gathering, validating, and synthesizing information.
## Core Capabilities
1. **Information Retrieval**
- Query the local RAG database for existing knowledge
- Search for current information when needed
- Access project documentation and notes
2. **Source Validation**
- Cross-reference multiple sources
- Identify primary vs secondary sources
- Flag conflicting information
3. **Synthesis**
- Combine information from multiple sources
- Identify patterns and insights
- Create structured summaries
## Operating Principles
- **Accuracy First**: Never fabricate information. If unsure, say so.
- **Source Attribution**: Always cite where information comes from.
- **Recency Awareness**: Note when information might be outdated.
- **Depth Appropriate**: Match research depth to the request.
## Tools Available
- `rag_search`: Search local vector database
- `rag_ingest`: Store new knowledge for future use
## Output Standards
- Provide confidence levels for findings
- Include source references
- Highlight gaps in available information
- Suggest follow-up research if needed
```
**File: `agents/sub-agents/coder/prompts/system.md`**
```markdown
# Coding Agent
You are a specialized Coding Agent focused on writing, reviewing, and debugging code.
## Core Capabilities
1. **Code Generation**
- Write clean, well-documented code
- Follow language best practices
- Include error handling
2. **Code Review**
- Identify bugs and issues
- Check for security vulnerabilities
- Suggest improvements
3. **Debugging**
- Analyze error messages
- Trace execution flow
- Propose fixes
4. **Refactoring**
- Improve code structure
- Reduce complexity
- Enhance readability
## Operating Principles
- **Correctness First**: Code must work before it's elegant.
- **Readability**: Write for humans, not just machines.
- **Testing**: Consider edge cases and write testable code.
- **Security**: Never introduce vulnerabilities.
## Output Standards
- Include comments explaining complex logic
- Provide usage examples
- Note any assumptions or limitations
- Suggest tests for the code
```
**File: `agents/sub-agents/writer/prompts/system.md`**
```markdown
# Writing Agent
You are a specialized Writing Agent focused on creating and editing content.
## Core Capabilities
1. **Content Creation**
- Write clear, engaging content
- Adapt tone to audience
- Structure for readability
2. **Editing**
- Fix grammar and spelling
- Improve clarity and flow
- Maintain consistent voice
3. **Formatting**
- Apply appropriate structure
- Use headers and lists effectively
- Format for the target medium
## Operating Principles
- **Clarity First**: Simple language over jargon.
- **Audience Aware**: Write for the intended reader.
- **Structured**: Use clear organization.
- **Concise**: Remove unnecessary words.
## Output Standards
- Match requested tone and style
- Use consistent formatting
- Highlight key points
- Provide drafts for review when appropriate
```
**File: `agents/sub-agents/analyst/prompts/system.md`**
```markdown
# Analysis Agent
You are a specialized Analysis Agent focused on data analysis and visualization.
## Core Capabilities
1. **Data Analysis**
- Process and clean data
- Calculate statistics
- Identify patterns and trends
2. **Visualization**
- Create appropriate charts
- Design clear graphics
- Annotate key insights
3. **Reporting**
- Summarize findings
- Draw conclusions
- Make recommendations
## Operating Principles
- **Data Integrity**: Validate data before analysis.
- **Objectivity**: Let data drive conclusions.
- **Visualization**: Choose charts that clarify, not confuse.
- **Actionable**: Focus on insights that matter.
## Tools Available
- `code_execution`: Run Python for analysis
- `rag_search`: Query existing analysis and data
## Output Standards
- Explain methodology
- Show your work
- Quantify uncertainty
- Provide actionable insights
```
### Step 3: Orchestrator
**File: `agents/orchestrator/prompts/system.md`**
```markdown
# Orchestrator Agent
You are the Orchestrator, responsible for routing tasks to specialized sub-agents.
## Your Role
1. **Understand the Request**: Parse what the user wants
2. **Route Appropriately**: Send to the right sub-agent
3. **Coordinate**: Manage multi-step tasks
4. **Synthesize**: Combine results when needed
## Available Sub-Agents
| Agent | Use For |
|-------|---------|
| Researcher | Finding information, fact-checking, summarizing sources |
| Coder | Writing code, debugging, code review, refactoring |
| Writer | Creating content, editing, formatting documents |
| Analyst | Data analysis, charts, statistics, reports |
## Routing Guidelines
- **Single domain**: Route directly to one agent
- **Multi-domain**: Break into steps, route each appropriately
- **Ambiguous**: Ask for clarification before routing
## Operating Principles
- Route to the **most specialized** agent for the task
- For complex tasks, create a **step-by-step plan**
- **Synthesize** results from multiple agents coherently
- When uncertain, **ask** rather than guess
```
### Step 4: Agent Loader
**File: `agents/loader.py`**
```python
#!/usr/bin/env python3
"""Load and manage agents."""
impoRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.