Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计未展示

agent-sdk-definitionsAgent SDK definitions 搜索

Agent Skill

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

总安装

349

周安装

15

GitHub Stars

6

下载量

122
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/mgd34msu/goodvibes-plugin --skill agent-sdk-definitions

简介

该技能展示如何通过 TypeScript 编程方式定义 Claude Agent SDK 代理。

  • 适用于需要动态加载代理、集成自定义工具或构建分层代理体系的项目。
  • 支持设置 allowed_tools、子代理引用和细粒度权限控制。
  • 代码示例仅供参考,实际部署前应测试权限边界与错误处理机制。
  • agent-sdk-definitions 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Agent SDK Definitions

For SDK-based applications, agents can be defined programmatically instead of as markdown files.

TypeScript Definition

import { query, ClaudeAgentOptions, AgentDefinition } from "@anthropic-ai/claude-agent-sdk";

const options: ClaudeAgentOptions = {
  // Parent agent needs Task tool to invoke subagents
  allowed_tools: ["Read", "Grep", "Glob", "Edit", "Write", "Bash", "Task"],

  agents: {
    "code-reviewer": {
      description: "Security-focused code reviewer. Use PROACTIVELY for auth code.",
      prompt: `You are a security code reviewer specializing in authentication
and authorization code. You identify vulnerabilities, suggest fixes,
and ensure best practices are followed.

## Focus Areas
- Authentication flows
- Session management
- Input validation
- Access control

## Output Format
Provide findings as:
1. Severity (Critical/High/Medium/Low)
2. Location (file:line)
3. Issue description
4. Recommended fix`,
      tools: ["Read", "Grep", "Glob"],  // Read-only access
      model: "opus"
    },

    "test-runner": {
      description: "Runs tests and analyzes failures. Use when tests need to be executed.",
      prompt: `You run test suites and analyze failures. You identify root causes
and suggest fixes for failing tests.`,
      // Omit tools to inherit all from parent
      model: "sonnet"
    }
  }
};

// Execute with agents
for await (const message of query({
  prompt: "Review the authentication module for security issues",
  options
})) {
  console.log(message);
}

Python Definition

import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions, AgentDefinition

options = ClaudeAgentOptions(
    allowed_tools=["Read", "Grep", "Glob", "Edit", "Write", "Bash", "Task"],

    agents={
        "code-reviewer": AgentDefinition(
            description="Security-focused code reviewer. Use PROACTIVELY for auth code.",
            prompt="""You are a security code reviewer specializing in authentication
and authorization code. You identify vulnerabilities, suggest fixes,
and ensure best practices are followed.

## Focus Areas
- Authentication flows
- Session management
- Input validation
- Access control""",
            tools=["Read", "Grep", "Glob"],
            model="opus"
        ),

        "test-runner": AgentDefinition(
            description="Runs tests and analyzes failures. Use when tests need to be executed.",
            prompt="You run test suites and analyze failures.",
            # tools omitted = inherit all
            model="sonnet"
        )
    }
)

async def main():
    async for message in query(
        prompt="Review the authentication module",
        options=options
    ):
        print(message)

asyncio.run(main())

AgentDefinition Schema

type AgentDefinition = {
  description: string;   // Required: When to invoke (routing key)
  prompt: string;        // Required: System prompt content
  tools?: string[];      // Optional: Allowed tools (omit = inherit all)
  model?: 'sonnet' | 'opus' | 'haiku' | 'inherit';  // Optional: Model override
}

Key Differences from Filesystem Agents

AspectFilesystem (.claude/agents/)SDK (programmatic)
FormatMarkdown with YAML frontmatterTypeScript/Python objects
LoadingAutomatic from directoryPassed in options
PromptMarkdown bodyString in prompt field
Use caseClaude Code CLICustom SDK applications

When to Use SDK Format

  • Building custom agent harnesses
  • Programmatic agent orchestration
  • Dynamic agent creation at runtime
  • CI/CD pipelines with agent tasks
  • Applications embedding Claude agents

Providing Both Formats

When a user may use either approach, provide both:

  1. Markdown file for .claude/agents/{name}.md
  2. SDK definition for programmatic use

This ensures compatibility with both Claude Code CLI and custom SDK applications.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

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

平台分布

Claude Code

29.03%
按下载量换算35

Codex

24.27%
按下载量换算30

Cursor

18.18%
按下载量换算22

Antigravity

11.74%
按下载量换算14

windsurf

8.05%
按下载量换算10

github-copilot

4.04%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills