- Home
- Skills
- Basher83
- Lunar Claude
- Claude Agent Sdk
claude-agent-sdk_skill
- Python
13
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill basher83/lunar-claude --skill claude-agent-sdk- SKILL.md16.8 KB
Overview
This skill helps developers build production-ready applications with the Claude Agent SDK for Python. It provides templates, patterns, and concrete examples for orchestrators, subagents, hooks, and permission callbacks. Use it to configure agents programmatically and follow SDK best practices for multi-agent and agentic workflows.
How this skill works
The skill documents when to use the simple query() API versus the persistent ClaudeSDKClient, and shows code patterns for agent definitions, system prompts, tool restrictions, hooks, and permission callbacks. It includes templates for orchestrators that delegate to subagents, guidance for loading agent definitions from files, and examples for interrupts and streaming responses. The material highlights required settings (e.g., claude_code preset for orchestrators) and practical constraints for tools and names.
When to use it
- Building an orchestrator that delegates tasks to specialized subagents
- Creating multi-turn interactive workflows that need session memory
- Implementing hooks or custom tools that require ClaudeSDKClient
- Configuring fine-grained tool permissions and callbacks
- Running one-off analyses or scripts where a simple API is sufficient
Best practices
- Use ClaudeSDKClient for multi-turn conversations, hooks, custom tools, or interrupts
- Set system_prompt to the claude_code preset for orchestrators that use the Task tool
- Register agents programmatically via the agents parameter and match agent names exactly
- Limit each agent's allowed tools to the minimum necessary for its role
- Prefer explicit dict-format system_prompts for clarity when composing presets and appends
Example use cases
- Orchestrator delegates code analysis to an 'analyzer' agent and fixes to a 'fixer' agent
- Interactive debugging session that remembers earlier findings and can be interrupted
- One-shot file or codebase analysis using query() from a scheduled script
- Hook-backed safety checks that intercept Bash commands before execution
- Loading agent prompts from markdown files and registering them at runtime
FAQ
Use query() for simple, independent one-shot tasks. Use ClaudeSDKClient for multi-turn workflows, hooks, custom tools, or when you need session memory and interrupt support.
What system_prompt is required for orchestrators?
Set system_prompt to the claude_code preset (e.g., {"type":"preset","preset":"claude_code"}) so the orchestrator can use the Task tool correctly.