← ClaudeAtlas

claude-agent-sdklisted

Build AI agents using the Claude Agent SDK. Covers query functions, ClaudeSDKClient, custom tools, MCP servers, hooks, permissions, subagents, and browser control (Chrome extension, dev-browser skill). Use when creating agents, adding tools, configuring agent behavior, or automating browser tasks.
tdimino/claude-code-minoan · ★ 32 · AI & Automation · score 85
Install: claude install-skill tdimino/claude-code-minoan
<essential_principles> ## Claude Agent SDK Overview The Claude Agent SDK gives agents the same tools that power Claude Code: file operations, bash commands, web search, and more. Build autonomous agents that read files, run commands, search the web, edit code, and verify their work. ### Two Ways to Query | Function | Session | Best For | |----------|---------|----------| | `query()` | New each time | One-off tasks, automation | | `ClaudeSDKClient` | Continuous | Conversations, follow-ups, hooks | **Key Difference:** `query()` is simpler but doesn't support hooks, interrupts, or custom tools. Use `ClaudeSDKClient` for advanced features. ### Agent Loop Pattern Agents operate in a feedback loop: ``` gather context → take action → verify work → repeat ``` ### Installation **Python:** ```bash uv add claude-agent-sdk ``` **TypeScript:** ```bash npm install @anthropic-ai/claude-agent-sdk ``` **Requirements:** - Claude Code CLI installed (`npm install -g @anthropic-ai/claude-code`) - `ANTHROPIC_API_KEY` environment variable set ### Quick Start ```python import asyncio from claude_agent_sdk import query, ClaudeAgentOptions async def main(): async for message in query( prompt="Find and fix bugs in auth.py", options=ClaudeAgentOptions(allowed_tools=["Read", "Edit", "Bash"]) ): print(message) asyncio.run(main()) ``` </essential_principles> <intake> ## What would you like to do? 1. **Create a new agent** - Build an agent from scratch 2. *