Sandbox
@keysersoose/claude-agent-builder

Claude Code skill for building agent files

Claude Agent Builder is a Claude Code skill that turns a natural-language idea into a full agent setup. It scans context, asks only what it needs, researches existing patterns, proposes an architecture, then writes the files for subagents, skills, hooks, commands, and MCP configs.

43 stars6 forksPythonUpdated 6mo ago
Who it's for

Builders who use Claude Code and want their agent setup to be designed and written for them from a short prompt.

What it delivers

You can go from a problem statement to a reviewed, production-ready Claude Code agent setup without starting from blank Markdown files.

What it does

Six-phase build flow

Scans context, discovers missing details, researches best practices, proposes an architecture, builds files, and verifies the result.

Architecture pattern selection

Chooses among patterns like command to agent to skills, research to consolidate to plan to execute, parallel specialists, and hook-guarded agents.

Agent file generation

Writes the needed agent files directly into your project instead of leaving you to assemble them by hand.

Validation script

`agent-builder/scripts/validate_agents.py` checks agent files for common issues.

Scaffold script

`agent-builder/scripts/scaffold_agent.py` creates starter agent files from templates.

Ready-to-use examples

`examples/` includes configurations such as a PR security reviewer, research pipeline, and self-improving onboarder.

How to get it

  1. 1Run
    git clone https://github.com/keysersoose/claude-agent-builder.git && cp -r claude-agent-builder/agent-builder ~/.claude/skills/
  2. 2Run
    git clone https://github.com/keysersoose/claude-agent-builder.git; Copy-Item -Recurse claude-agent-builder\agent-builder "$env:USERPROFILE\.claude\skills\agent-builder"
  3. 3Run
    git clone https://github.com/keysersoose/claude-agent-builder.git && xcopy /E /I claude-agent-builder\agent-builder "%USERPROFILE%\.claude\skills\agent-builder"
  4. 4Run
    # macOS/Linux — install script
    git clone https://github.com/keysersoose/claude-agent-builder.git
    cd claude-agent-builder && ./install.sh
    
    # macOS/Linux — project-level only
    ./install.sh --project
  5. 5Run
    # Windows — install script (PowerShell)
    git clone https://github.com/keysersoose/claude-agent-builder.git
    cd claude-agent-builder; .\install.ps1
    
    # Windows — project-level only
    .\install.ps1 -Project
  6. 6Run
    # Any platform — project-level manual
    git clone https://github.com/keysersoose/claude-agent-builder.git
    cp -r claude-agent-builder/agent-builder .claude/skills/

README

🏗️ Claude Agent Builder

Turn any idea into production-ready AI agents in Claude Code

Stop writing agent files from scratch. Describe your problem → get researched, architected, production-ready agents, skills, hooks, and commands — automatically.

License: MIT Claude Code Agent SDK PRs Welcome

Quick Start · How It Works · Examples · Patterns · Contributing


The Problem

Building agents in Claude Code means juggling 7 different primitives (subagents, skills, hooks, commands, MCP servers, CLAUDE.md, Agent SDK), reading scattered docs, and starting from blank Markdown files every time.

Claude Agent Builder fixes this. It's a skill that acts as your personal agent architect — it interviews you, researches what already exists, designs the optimal system, and generates every file you need.

⚡ Quick Start

macOS / Linux

git clone https://github.com/keysersoose/claude-agent-builder.git && cp -r claude-agent-builder/agent-builder ~/.claude/skills/

Windows (PowerShell)

git clone https://github.com/keysersoose/claude-agent-builder.git; Copy-Item -Recurse claude-agent-builder\agent-builder "$env:USERPROFILE\.claude\skills\agent-builder"

Windows (CMD)

git clone https://github.com/keysersoose/claude-agent-builder.git && xcopy /E /I claude-agent-builder\agent-builder "%USERPROFILE%\.claude\skills\agent-builder"
Other install methods
# macOS/Linux — install script
git clone https://github.com/keysersoose/claude-agent-builder.git
cd claude-agent-builder && ./install.sh

# macOS/Linux — project-level only
./install.sh --project
# Windows — install script (PowerShell)
git clone https://github.com/keysersoose/claude-agent-builder.git
cd claude-agent-builder; .\install.ps1

# Windows — project-level only
.\install.ps1 -Project
# Any platform — project-level manual
git clone https://github.com/keysersoose/claude-agent-builder.git
cp -r claude-agent-builder/agent-builder .claude/skills/

Open Claude Code and say:

Build me an agent that reviews my PRs for security issues and posts comments on GitHub

The skill triggers automatically. That's it.

🧠 How It Works

Agent Builder operates in 6 phases, adapting to how much context you provide:

  🔍 CONTEXT SCAN →  Reads your project files + conversation history automatically
  📋 DISCOVERY    →  Only asks what it can't figure out itself
  🌐 RESEARCH     →  Parallel search (GitHub + blogs + docs + community) → consolidated brief
  📐 ARCHITECTURE →  Proposes agents, gets your explicit approval before building
  🔨 BUILD        →  Writes all agent files directly into your project
  ✅ VERIFY       →  Self-checks everything, shows you what was built, asks for final OK

Why not just ask Claude directly?

Without Agent BuilderWith Agent Builder
You need to know all 7 primitivesIt picks the right ones for you
You write from blank .md filesIt writes production-ready files directly into your project
You guess at descriptions and toolsIt optimizes for auto-triggering
You explain your project from scratchIt scans your codebase and conversation history first
You don't know what exists alreadyIt searches GitHub, blogs, docs, and community in parallel — then consolidates
Trial and errorProposes → you approve → it builds → it verifies

📦 What's Inside

agent-builder/
├── SKILL.md                       # Core skill — 6-phase agent building workflow
├── references/
│   ├── primitives-guide.md        # Complete guide to all Claude Code building blocks
│   └── agent-patterns.md          # 7 battle-tested multi-agent architecture patterns
└── scripts/
    ├── validate_agents.py         # Lint agent files for common issues
    └── scaffold_agent.py          # Generate starter files from templates

🗺️ Architecture Patterns

The skill knows 7 proven patterns and selects the right one for your use case:

PatternBest ForExample
Command → Agent → SkillsMulti-step pipelinesFull-stack feature builder
Research → Consolidate → Plan → ExecuteUnderstanding before actingCodebase migration
Parallel SpecialistsIndependent analysesSecurity + perf + style review
Self-Evolving AgentLearning over timeProject onboarding guide
Hook-Guarded AgentSafety-critical workflowsRead-only database analyst
Slash Command + HandoffQuick entry → complex flowBug investigation
MCP-Powered AgentExternal service integrationGitHub PR review bot

🎯 Real-World Examples

PR Security Reviewer — subagent with GitHub MCP, PreToolUse safety hooks, slash command trigger, and persistent memory.

Research Pipeline/research command spawning 3 parallel subagents (web, codebase, Stack Overflow) with synthesis and markdown report output.

Self-Improving Onboarder — subagent with memory: project that builds institutional knowledge across conversations.

See examples/ for complete, ready-to-use configurations.

🔧 Utility Scripts

# Install dependency for validation script
pip install pyyaml

# Validate your agents for common issues
python agent-builder/scripts/validate_agents.py .claude/agents/

# Scaffold new agents from templates
python agent-builder/scripts/scaffold_agent.py my-agent .claude --type subagent
python agent-builder/scripts/scaffold_agent.py deploy-pipe .claude --type full-stack

Requirements: Claude Code installed. Python 3.7+ for utility scripts.

🧩 Primitives Decision Tree

Your need
├── "Auto-do X when Y happens"
│   ├── During a tool call?           → Hook
│   ├── Based on context?             → Skill
│   └── Based on task type?           → Subagent
├── "Trigger a workflow"
│   ├── Simple command?               → Slash command
│   └── Multi-step?                   → Command + subagents
├── "Connect external services"       → MCP server
├── "Remember across conversations"   → CLAUDE.md / memory
└── "Production app"                  → Agent SDK

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md.

Add examples · Improve patterns · Enhance the skill · Fix bugs · Share feedback

📄 License

MIT — use it, modify it, share it. See LICENSE.


Built by keysersoose · Powered by Claude Code

If this saved you time, give it a star. It helps others find it.

Star History ChartStar History Chart

Files in the repo

Repository payload12 top-level entries
  • .github
  • agent-builder
  • examples
  • .gitignore
  • CHANGELOG.md
  • CONTRIBUTING.md
  • install.ps1
  • install.sh
  • LICENSE
  • README.md
  • repository-settings.md
  • SECURITY.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k