skills/agent-builder/SKILL.md
Build AI agents and automate Claude Code programmatically via the Claude Agent SDK and headless CLI mode. Covers Python SDK, claude -p, SDK MCP servers, hooks, sessions. Triggers on: "build an agent", "agent SDK", "headless mode", "automate Claude", "programmatic agent".
npx skillsauth add mathews-tom/armory agent-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Triggers:
This skill covers Claude Code's headless mode and the Agent SDK — not the raw Anthropic API.
Preferred: Claude Code CLI headless mode (claude -p)
Preferred: Claude Agent SDK (wraps Claude Code CLI)
Avoid: Raw Anthropic API (anthropic.Anthropic())
Avoid: Direct API calls with API keys
Why this matters:
~/.claude/ config — no API keys neededRule: If code uses anthropic.Anthropic(), anthropic.messages.create(), or requires ANTHROPIC_API_KEY, that is the wrong approach. Use claude -p or claude_agent_sdk instead.
claude -p)All use Claude Code's existing authentication from ~/.claude/ — no API keys required.
Load only the reference file relevant to the current task.
| Task | Load |
|---|---|
| Distinguishing raw Anthropic API from Claude Code SDK patterns | references/api-vs-sdk.md |
| Writing a Python agent with the Agent SDK (install, query, client, tools, hooks, errors) | references/sdk-python.md |
| Using headless claude -p mode (basic, JSON schema, streaming, tool approval, sessions, system prompts) | references/headless-cli.md |
| CLI commands, flags table, dynamic subagents, permission rule syntax | references/cli-reference.md |
| Use-case templates: CI/CD pipeline, code review, custom analysis tool, database query agent | references/use-cases.md |
| Agent SDK and CLI/Headless best practices | references/best-practices.md |
| Complete end-to-end agent example (tools + hooks + client) | references/example-agent.md |
| Output format conventions for produced artifacts | references/output-format.md |
--dangerously-skip-permissions in production--max-budget-usdNeed to...
claude -p "query"ClaudeSDKClient@tool decoratorHookMatcher--output-format stream-json--json-schema--continue or --resumeclaude -p with --allowedToolsquery() or ClaudeSDKClientFetch live documentation when:
Use WebFetch tool to pull latest documentation from source URLs.
Before writing code:
claude -p or claude_agent_sdk) — not raw Anthropic API~/.claude/ configwhich claude)uv pip listAfter writing code:
claude_agent_sdk or claude -p — not anthropic.Anthropic()ANTHROPIC_API_KEY or api_key= parameters in codeThis skill provides:
Ask specific questions about building agents, running headless commands, or CLI usage.
~/.claude/ before any SDK or headless usage works.anthropic.Anthropic()); see the Anthropic API docs for that.--resume or session ID capture.testing
Create, review, and restyle data visualizations using Edward Tufte principles: high data-ink ratio, direct labels, range-frame axes, small multiples, accessible color, responsive charts, and honest comparisons. Triggers on: "create a chart", "style this chart", "review this graph", "Tufte chart", "data visualization", "Recharts", "Plotly", "matplotlib", "Chart.js", "ECharts", "D3". Use when generating or critiquing charts, dashboards, sparklines, and data tables.
testing
Manages dependent branch stacks and stacked pull requests using safe Git topology rules. Triggers on: "create stacked PRs", "publish this stack", "sync my PR stack", "rebase this stack", "merge the stack", "retarget child PRs", "split this branch into stacked PRs", "validate this stack", "cleanup stacked branches". Use when local branches or one source branch need to become a dependency-ordered PR stack with correct parent bases, validation, synchronization, merge order, and cleanup.
development
Scaffolds per-repository agent context so coding agents share the same issue tracker rules, triage label vocabulary, domain glossary, ADR layout, and handoff conventions. Triggers on: "set up project context", "configure agent docs", "create CONTEXT.md", "setup agent workflow", "agent issue tracker setup", "triage labels", "domain glossary for agents". Use when a repo needs durable context files before planning, triage, debugging, TDD, architecture review, or multi-agent implementation.
testing
Produces phased task boards from feature requests: dependency-mapped work items, parallelization flags, risk flags, edge cases, test matrices. Triggers on: "decompose this feature", "task breakdown with dependencies", "phased implementation plan", "work breakdown structure". NOT for effort estimates, use estimate-calibrator.