본문으로 건너뛰기
cccskills
무료GitHub에 공개

claude-agent-sdk

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(22)

  • SKILL.md7.4 KB
  • README.md7.0 KB
  • references/best-practices.md10.4 KB
  • references/browser-control.md10.5 KB
  • references/built-in-tools.md7.0 KB
  • references/custom-tools.md6.1 KB
  • references/hooks.md6.3 KB
  • references/message-types.md4.6 KB
  • references/permissions.md5.8 KB
  • references/python-sdk.md10.3 KB
  • references/subagents.md11.5 KB
  • references/troubleshooting.md5.8 KB
  • templates/agent-with-tracking-python.py10.3 KB
  • templates/continuous-chat-python.py1.9 KB
  • templates/custom-tool-python.py3.4 KB
  • templates/hook-example-python.py4.1 KB
  • templates/research-agent-python.py7.5 KB
  • templates/session-api-typescript.ts7.1 KB
  • templates/simple-agent-python.py1.3 KB
  • workflows/add-custom-tools.md5.4 KB
  • workflows/add-hooks.md7.3 KB
  • workflows/create-agent.md4.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<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

FunctionSessionBest For
query()New each timeOne-off tasks, automation
ClaudeSDKClientContinuousConversations, 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:

uv add claude-agent-sdk

TypeScript:

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

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. Add custom tools - Create tools with @tool decorator or MCP servers
  3. Add hooks - Intercept tool calls for logging, validation, or modification
  4. Configure permissions - Control what tools can do
  5. Create subagents - Define specialized agents for parallel work
  6. Control browsers - Chrome extension, dev-browser skill
  7. Get API reference - Python or TypeScript SDK details

Wait for response before proceeding.

</intake> <routing>
ResponseLoad
1, "create", "new", "build"workflows/create-agent.md
2, "tools", "custom", "@tool"references/custom-tools.md
3, "hooks", "intercept"references/hooks.md
4, "permissions", "can_use_tool"references/permissions.md
5, "subagent", "parallel"references/subagents.md
6, "browser", "chrome", "automation"references/browser-control.md
7, "python", "reference"references/python-sdk.md
7, "typescript", "reference"references/typescript-sdk.md
"built-in", "tools"references/built-in-tools.md
"message", "types"references/message-types.md
"best practices", "patterns"references/best-practices.md
"error", "troubleshoot"references/troubleshooting.md
</routing>

<quick_reference>

ClaudeAgentOptions (Key Fields)

ClaudeAgentOptions(
    # Tools
    allowed_tools=["Read", "Write", "Bash"],  # Built-in tools to enable
    disallowed_tools=["WebSearch"],           # Tools to block

    # Prompts
    system_prompt="You are...",               # Custom system prompt
    # Or use preset: {"type": "preset", "preset": "claude_code", "append": "..."}

    # MCP Servers
    mcp_servers={"calc": my_server},          # MCP server configs

    # Permissions
    permission_mode="acceptEdits",            # default | acceptEdits | plan | bypassPermissions
    can_use_tool=my_handler,                  # Custom permission callback

    # Execution
    cwd="/path/to/project",                   # Working directory
    max_turns=10,                             # Limit iterations
    env={"API_KEY": "..."},                   # Environment variables

    # Advanced
    hooks={"PreToolUse": [...]},              # Behavior hooks
    agents={"researcher": AgentDef(...)},     # Subagents
    sandbox={"enabled": True},                # Sandbox settings
    setting_sources=["project"],              # Load .claude settings
)

Built-in Tools

ToolPurpose
ReadRead files (text, images, PDFs, notebooks)
WriteCreate new files
EditModify existing files with search/replace
BashRun terminal commands
GlobFind files by pattern (**/*.ts)
GrepSearch file contents with regex
WebSearchSearch the web
WebFetchFetch and parse web pages
TaskSpawn subagents
NotebookEditEdit Jupyter notebooks
TodoWriteManage task lists
KillShellKill background shells
ExitPlanModeExit planning mode

Message Types

# All messages
Message = UserMessage | AssistantMessage | SystemMessage | ResultMessage

# Content blocks in AssistantMessage
ContentBlock = TextBlock | ThinkingBlock | ToolUseBlock | ToolResultBlock

Error Types

from claude_agent_sdk import (
    CLINotFoundError,      # Claude Code CLI not installed
    CLIConnectionError,    # Connection failed
    ProcessError,          # CLI process failed
    CLIJSONDecodeError,    # JSON parsing failed
)

</quick_reference>

<thinking_config>

Thinking & Effort Configuration

Control agent thinking depth via the effort parameter rather than prompt-level instructions like "think carefully":

Use CaseEffortNotes
Quick lookups, simple editslowMinimal thinking overhead
Standard developmentmediumDefault for most agents
Complex architecture, securityhighDeeper reasoning
Deep research, long-horizonmaxMaximum thinking budget
# Adaptive thinking (recommended for Claude 4.6)
options = ClaudeAgentOptions(
    model="claude-opus-4-6",  # or claude-sonnet-4-6
    # Effort is controlled at the API level, not in the agent options
)

Avoid adding "think carefully" or "be thorough" to agent system prompts—Claude 4.6 calibrates thinking depth automatically based on task complexity.

</thinking_config>

<examples>

Common Patterns

File Operations Agent

options = ClaudeAgentOptions(
    allowed_tools=["Read", "Write", "Edit", "Glob", "Grep"],
    permission_mode="acceptEdits",
    cwd="/path/to/project"
)

Code Review Agent

options = ClaudeAgentOptions(
    allowed_tools=["Read", "Glob", "Grep"],  # Read-only
    system_prompt="Review code for bugs, security issues, and style"
)

Research Agent

options = ClaudeAgentOptions(
    allowed_tools=["WebSearch", "WebFetch", "Write"],
    max_turns=20  # Allow more iterations for research
)

Interactive Chat with Tools

async with ClaudeSDKClient(options) as client:
    await client.query("What files are in this directory?")
    async for msg in client.receive_response():
        print(msg)

    # Follow-up - Claude remembers context
    await client.query("Show me the largest one")
    async for msg in client.receive_response():
        print(msg)
</examples>

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Search academic papers, build literature reviews, and synthesize research findings — combines Exa search (publication category, domain and date filters) with arxiv-mcp-server for paper discovery, download, and deep analysis. Triggers on academic paper, literature review, research synthesis, arxiv, find papers, scholarly search.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tdimino/claude-code-minoan412026년 10월 20일 업데이트

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tdimino/claude-code-minoan412026년 10월 20일 업데이트

This skill should be used when creating, auditing, or maintaining AGENTS.md files and Codex CLI configuration for any project—including initializing AGENTS.md for cross-agent compatibility (Codex, Cursor, Copilot, Devin, Jules, Amp, Gemini CLI), generating config.toml or .rules files, scaffolding .agents/skills/, converting CLAUDE.md to AGENTS.md, or auditing existing agent configs for bloat and staleness. Complementary to codex-orchestrator (which executes subagents; this skill creates the config files they consume).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tdimino/claude-code-minoan412026년 10월 20일 업데이트

Academic research skill for Biblical Hebrew, Semitic linguistics, cuneiform studies, and comparative Ancient Near Eastern research. Provides Sefaria API for Hebrew Bible, CDLI/ORACC for cuneiform databases, and web discovery via Omnisearch, Exa, Firecrawl, and Obscura for finding scholarly sources across JSTOR, Perseus, Persée, Google Scholar, and academia.edu. Triggers on Hebrew quotes, cuneiform, Sefaria, ANE research, Minoan, search for scholarship, find papers, literature review, scholarly search, academic search, Genesis/Tehom, Ugaritic, Talmudic sources, extract from PDF, OCR academic.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tdimino/claude-code-minoan412026년 10월 20일 업데이트

Build comprehensive ARCHITECTURE.md files following matklad's canonical guidelines — bird's-eye views, ASCII/Mermaid diagrams, codemaps, invariants, and layer boundaries. Triggers on document the architecture, create ARCHITECTURE.md, map this codebase, architectural overview.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tdimino/claude-code-minoan412026년 10월 20일 업데이트

Generate physically-based atmospheric scattering shaders — sky domes, planetary atmospheres, LUT-optimized pipelines, depth-aware post-processing. Four modes — sky-dome, atmosphere-post, planet, lut. Triggers on atmospheric scattering, sky shader, sunset rendering, planet atmosphere, Rayleigh scattering, Mie scattering, volumetric sky, sky dome, atmosphere post-processing, aerial perspective, transmittance LUT, sky rendering, realistic sky, planetary rendering.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tdimino/claude-code-minoan412026년 10월 20일 업데이트

tdimino의 스킬 모두 보기

이 스킬의 문제 신고