|
| 1 | +# Atomic Agents Plugin for Claude Code |
| 2 | + |
| 3 | +A comprehensive Claude Code plugin for building well-organized [Atomic Agents](https://github.com/BrainBlend-AI/atomic-agents) applications. This plugin provides specialized sub-agents, guided workflows, and progressive-disclosure skills to help you create production-ready AI agent systems. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The Atomic Agents framework is a lightweight, modular system for building AI agents using Pydantic schemas and the Instructor library. This plugin brings that power into Claude Code with: |
| 8 | + |
| 9 | +- **4 Specialized Agents** for analysis, design, review, and schema generation |
| 10 | +- **3 Workflow Commands** from guided creation to quick scaffolding |
| 11 | +- **6 Progressive-Disclosure Skills** for just-in-time knowledge |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +### From a Marketplace |
| 16 | + |
| 17 | +```bash |
| 18 | +# If published to a marketplace |
| 19 | +/plugin install atomic-agents@marketplace-name |
| 20 | +``` |
| 21 | + |
| 22 | +### Local Installation |
| 23 | + |
| 24 | +```bash |
| 25 | +# Clone or copy the plugin to a directory |
| 26 | +claude --plugin-dir /path/to/atomic-agents |
| 27 | +``` |
| 28 | + |
| 29 | +### Validate Installation |
| 30 | + |
| 31 | +```bash |
| 32 | +# Check that the plugin loads correctly |
| 33 | +/plugin validate /path/to/atomic-agents |
| 34 | +``` |
| 35 | + |
| 36 | +## Commands |
| 37 | + |
| 38 | +### `/atomic-create` - Guided Application Workflow |
| 39 | + |
| 40 | +The master command for building complete Atomic Agents applications through a 7-phase workflow: |
| 41 | + |
| 42 | +```bash |
| 43 | +/atomic-create A research agent that summarizes academic papers |
| 44 | +``` |
| 45 | + |
| 46 | +**Phases:** |
| 47 | +1. **Discovery** - Understand requirements |
| 48 | +2. **Exploration** - Analyze existing code (if applicable) |
| 49 | +3. **Clarification** - Resolve ambiguities |
| 50 | +4. **Architecture** - Design the application |
| 51 | +5. **Implementation** - Build components |
| 52 | +6. **Review** - Validate against best practices |
| 53 | +7. **Summary** - Document what was created |
| 54 | + |
| 55 | +### `/atomic-agent` - Quick Agent Creation |
| 56 | + |
| 57 | +Rapidly scaffold a new agent with proper configuration: |
| 58 | + |
| 59 | +```bash |
| 60 | +/atomic-agent A customer support agent that handles refund requests |
| 61 | +``` |
| 62 | + |
| 63 | +Creates: |
| 64 | +- Input/output schemas |
| 65 | +- Agent configuration with SystemPromptGenerator |
| 66 | +- Usage examples |
| 67 | + |
| 68 | +### `/atomic-tool` - Quick Tool Creation |
| 69 | + |
| 70 | +Scaffold a new tool for external integrations: |
| 71 | + |
| 72 | +```bash |
| 73 | +/atomic-tool A weather API tool that fetches current conditions |
| 74 | +``` |
| 75 | + |
| 76 | +Creates: |
| 77 | +- Input/output/error schemas |
| 78 | +- Tool configuration with environment variables |
| 79 | +- Error handling patterns |
| 80 | +- Usage examples |
| 81 | + |
| 82 | +## Agents |
| 83 | + |
| 84 | +### atomic-explorer (Yellow) |
| 85 | + |
| 86 | +Deeply analyzes existing Atomic Agents applications: |
| 87 | +- Maps agent configurations and purposes |
| 88 | +- Catalogs schemas, tools, and context providers |
| 89 | +- Traces orchestration patterns and data flow |
| 90 | +- Identifies architecture patterns |
| 91 | + |
| 92 | +**Triggered by:** Exploring codebases, understanding existing implementations |
| 93 | + |
| 94 | +### atomic-architect (Green) |
| 95 | + |
| 96 | +Designs application architectures: |
| 97 | +- Analyzes requirements |
| 98 | +- Selects appropriate orchestration patterns |
| 99 | +- Creates implementation blueprints |
| 100 | +- Specifies component designs |
| 101 | + |
| 102 | +**Triggered by:** Planning new applications, designing multi-agent systems |
| 103 | + |
| 104 | +### atomic-reviewer (Red) |
| 105 | + |
| 106 | +Reviews code for quality and best practices: |
| 107 | +- Schema quality and type safety |
| 108 | +- Agent configuration correctness |
| 109 | +- Security and error handling |
| 110 | +- Performance considerations |
| 111 | + |
| 112 | +**Triggered by:** Code review, pre-commit validation, quality audits |
| 113 | + |
| 114 | +### schema-designer (Blue) |
| 115 | + |
| 116 | +Generates well-structured Pydantic schemas: |
| 117 | +- Input/output schemas for agents |
| 118 | +- Tool parameter schemas |
| 119 | +- Complex nested structures |
| 120 | +- Validators for business rules |
| 121 | + |
| 122 | +**Triggered by:** Schema design, data contract definition |
| 123 | + |
| 124 | +## Skills |
| 125 | + |
| 126 | +Skills provide progressive-disclosure knowledge, loading only when needed to keep context lean: |
| 127 | + |
| 128 | +| Skill | Trigger Phrases | Purpose | |
| 129 | +|-------|----------------|---------| |
| 130 | +| `atomic-schemas` | "create schema", "BaseIOSchema", "field validation" | Pydantic schema patterns | |
| 131 | +| `atomic-agents` | "create agent", "AgentConfig", "ChatHistory" | Agent configuration | |
| 132 | +| `atomic-tools` | "create tool", "BaseTool", "tool orchestration" | Tool development | |
| 133 | +| `atomic-context` | "context provider", "dynamic context", "share data" | Context providers | |
| 134 | +| `atomic-prompts` | "system prompt", "SystemPromptGenerator" | Prompt engineering | |
| 135 | +| `atomic-structure` | "project structure", "pyproject.toml" | Project organization | |
| 136 | + |
| 137 | +## Usage Examples |
| 138 | + |
| 139 | +### Create a Complete Application |
| 140 | + |
| 141 | +``` |
| 142 | +You: /atomic-create A RAG chatbot that answers questions from PDF documents |
| 143 | +
|
| 144 | +Claude: I'll guide you through creating this application... |
| 145 | +[7-phase workflow begins] |
| 146 | +``` |
| 147 | + |
| 148 | +### Quick Agent Scaffolding |
| 149 | + |
| 150 | +``` |
| 151 | +You: /atomic-agent A sentiment analysis agent |
| 152 | +
|
| 153 | +Claude: [Creates schemas and agent configuration] |
| 154 | +``` |
| 155 | + |
| 156 | +### Explore Existing Code |
| 157 | + |
| 158 | +``` |
| 159 | +You: Help me understand how the agents in this project work |
| 160 | +
|
| 161 | +Claude: [Deploys atomic-explorer to analyze the codebase] |
| 162 | +``` |
| 163 | + |
| 164 | +### Review Implementation |
| 165 | + |
| 166 | +``` |
| 167 | +You: Review my Atomic Agents code for issues |
| 168 | +
|
| 169 | +Claude: [Deploys atomic-reviewer with confidence-based filtering] |
| 170 | +``` |
| 171 | + |
| 172 | +## Framework Reference |
| 173 | + |
| 174 | +This plugin targets the [Atomic Agents](https://github.com/BrainBlend-AI/atomic-agents) framework: |
| 175 | + |
| 176 | +### Core Components |
| 177 | + |
| 178 | +- **AtomicAgent** - Main agent class with structured I/O |
| 179 | +- **AgentConfig** - Configuration for model, history, prompts |
| 180 | +- **BaseIOSchema** - Base class for Pydantic schemas |
| 181 | +- **SystemPromptGenerator** - Structured prompt builder |
| 182 | +- **BaseTool** - Base class for tools |
| 183 | +- **BaseDynamicContextProvider** - Dynamic context injection |
| 184 | +- **ChatHistory** - Conversation state management |
| 185 | + |
| 186 | +### Supported Providers |
| 187 | + |
| 188 | +- OpenAI (GPT-4, GPT-4o, etc.) |
| 189 | +- Anthropic (Claude) |
| 190 | +- Groq |
| 191 | +- Ollama (local models) |
| 192 | +- OpenRouter |
| 193 | +- Any OpenAI-compatible API |
| 194 | + |
| 195 | +## Best Practices |
| 196 | + |
| 197 | +### When Using This Plugin |
| 198 | + |
| 199 | +1. **Start with /atomic-create** for new projects - it ensures proper structure |
| 200 | +2. **Use skills for quick reference** - they load just-in-time knowledge |
| 201 | +3. **Let agents do deep analysis** - atomic-explorer for understanding, atomic-reviewer for validation |
| 202 | +4. **Follow the workflow** - the 7-phase process prevents common mistakes |
| 203 | + |
| 204 | +### Atomic Agents Best Practices |
| 205 | + |
| 206 | +1. **Always use BaseIOSchema** - never plain Pydantic BaseModel |
| 207 | +2. **Describe all fields** - descriptions are used in prompt generation |
| 208 | +3. **Use environment variables** - never hardcode API keys |
| 209 | +4. **Wrap with instructor** - required for structured outputs |
| 210 | +5. **Handle errors gracefully** - tools should return error schemas, not raise |
| 211 | + |
| 212 | +## Troubleshooting |
| 213 | + |
| 214 | +### Plugin Not Loading |
| 215 | + |
| 216 | +1. Verify plugin structure: `.claude-plugin/plugin.json` exists |
| 217 | +2. Run validation: `/plugin validate /path/to/plugin` |
| 218 | +3. Check for JSON syntax errors in plugin.json |
| 219 | + |
| 220 | +### Skills Not Triggering |
| 221 | + |
| 222 | +1. Use explicit trigger phrases from skill descriptions |
| 223 | +2. Manually load: "Load the atomic-schemas skill" |
| 224 | + |
| 225 | +### Agents Not Found |
| 226 | + |
| 227 | +1. Check agents/ directory exists with .md files |
| 228 | +2. Verify YAML frontmatter is valid in agent files |
| 229 | + |
| 230 | +## Contributing |
| 231 | + |
| 232 | +Contributions are welcome! Please: |
| 233 | + |
| 234 | +1. Follow the existing plugin structure |
| 235 | +2. Add tests for new components |
| 236 | +3. Update documentation |
| 237 | +4. Follow semantic versioning |
| 238 | + |
| 239 | +## License |
| 240 | + |
| 241 | +MIT License - See [LICENSE](LICENSE) file. |
| 242 | + |
| 243 | +## Links |
| 244 | + |
| 245 | +- **Atomic Agents Framework**: https://github.com/BrainBlend-AI/atomic-agents |
| 246 | +- **Documentation**: https://github.com/BrainBlend-AI/atomic-agents/tree/main/docs |
| 247 | +- **Examples**: https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples |
| 248 | + |
| 249 | +--- |
| 250 | + |
| 251 | +Built with care for the Atomic Agents community by [BrainBlend AI](https://github.com/BrainBlend-AI). |
0 commit comments