Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

claude-agent-sdkClaude Agent SDK 搜索

Agent Skill

claude-agent-sdk 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

685

周安装

28

GitHub Stars

22

下载量

220
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:claude-agent-sdk(Claude Agent SDK 搜索)
来源仓库:https://github.com/tdimino/claude-code-minoan
仓库路径:skills/claude-agent-sdk
安装命令:
npx skills add https://github.com/tdimino/claude-code-minoan --skill claude-agent-sdk
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tdimino/claude-code-minoan --skill claude-agent-sdk

简介

claude-agent-sdk 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 当前无额外底部简介,可参考来源仓库获取完整功能说明。

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>

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.

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

<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>

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)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.67%
按下载量换算76

Claude

30.3%
按下载量换算67

Cursor

18.03%
按下载量换算40

Gemini CLI

9.95%
按下载量换算22

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills