Логотип Claude Agent Sdk Expert

Claude Agent Sdk Expert

Сообщество
raroque
claude-agent-sdk-expert

Use when reviewing, debugging, or building AI agents with the Claude Agent SDK (TypeScript or Python). Covers the Agent class, query(), agent.stream(), tool_use, tool schemas, maxIterations, subagents, hooks (PreToolCall, PostToolCall, StopHook), MCP integration, multi-agent coordination, structured output, context window management, stop_reason handling, and agentic loop architecture. Do NOT activate for general Claude API usage without agents, simple messages.create() calls, or non-agent Anthropic SDK usage — use the claude-api skill for those.

Обзор

Издательraroque
Репозиторийclaude-agent-sdk-skill
Название навыкаclaude-agent-sdk-expert
Звёзды
28
Форки
2
Файлы в комплекте
12
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 12

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — raroque. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Claude Agent Sdk Expert в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/raroque/claude-agent-sdk-skill/tree/main/claude-agent-sdk-expert
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/raroque/claude-agent-sdk-skill.git /tmp/claude-agent-sdk-skill
mkdir -p .claude/skills
cp -r /tmp/claude-agent-sdk-skill/claude-agent-sdk-expert .claude/skills/claude-agent-sdk-expert
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Claude Agent Sdk Expert в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Claude Agent Sdk Expert, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Claude Agent Sdk Expert не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Claude Agent SDK Expert

Why This Skill Exists

AI-assisted agent development introduces characteristic failure modes that traditional code review misses. Agents fail silently — they hallucinate tool calls, lose context mid-conversation, swallow errors into infinite retry loops, and produce outputs that look correct but aren't grounded in actual tool results. This skill encodes hard-won patterns from building production Claude agents so you catch these issues before they ship.

Core Principle

An agent is only as good as its tools and instructions. The SDK handles the loop — your job is to give it clear tools, clear prompts, and clear boundaries.

Process

Work through each step below. Step 0 is always loaded. For remaining steps, load the referenced file only if relevant to the current task. Skip steps that don't apply.

Step 0: Known Gotchas (Always Load)

Before any deep review or build, scan for the top 10 most common agent mistakes. These are fast to check and catch the majority of production incidents.

Read file: references/gotchas.md

Quick Scan (Review Mode)

For code reviews, run the static analysis script first to surface mechanical anti-patterns before doing a manual review. This catches issues like missing maxIterations, tool_choice: "any", silent catch blocks, and missing additionalProperties: false.

bash
bash scripts/scan-agent-patterns.sh <target-directory>

Review the output, then proceed with the manual steps below for deeper analysis.

Step 1: Agentic Loop Architecture

Evaluate the core agent loop structure, stop condition handling, and iteration guards.

Read file: references/agentic-loop.md

Step 2: Tool Design & Scoping

Review tool definitions for clarity, scope, and schema quality. Ensure descriptions serve as the primary selection mechanism.

Read file: references/tool-design.md

Step 3: Prompt Engineering for Agents

Assess system prompts, instruction clarity, and few-shot example usage.

Read file: references/prompt-engineering.md

Step 4: Structured Output & Schema Design

Check extraction patterns, schema strictness, and field design.

Read file: references/structured-output.md

Step 5: Context Management

Evaluate context window usage, session management, and information retention strategies.

Read file: references/context-management.md

Step 6: MCP Integration

Review MCP server configuration, tool namespacing, and integration patterns.

Read file: references/mcp-integration.md

Step 7: Error Handling & Reliability

Assess error propagation, validation loops, retry strategies, and escalation triggers.

Read file: references/error-handling.md

Step 8: Hooks & Lifecycle

Review PreToolCall, PostToolCall, and StopHook implementations for correctness and safety.

Read file: references/hooks-lifecycle.md

Step 9: Multi-Agent Patterns

Evaluate coordinator-subagent architecture, context passing, and handoff patterns.

Read file: references/multi-agent.md

Core Instructions

  1. Report genuine issues only. Do not fabricate problems. If the code is solid, say so.
  2. Prioritize by impact. Critical issues (crashes, infinite loops, data loss) first, style nits last.
  3. Skip irrelevant sections. If the agent doesn't use MCP, skip Step 6. If it's single-agent, skip Step 9.
  4. Dual mode — review and build.
    • Review mode: Audit existing agent code. Output severity-ranked findings with concrete fixes.
    • Build mode: Help write new agent code. Follow the process steps as a checklist to ensure nothing is missed.
  5. Show, don't tell. Every finding or recommendation must include a concrete code example — before/after for reviews, working snippets for builds.
  6. Ground in SDK reality. Reference actual SDK APIs (query(), tool_use, stop_reason, hooks, etc.). Do not invent APIs that don't exist.
  7. Maintain the review log. After completing a review or build session, append a one-line JSON entry to data/review-log.jsonl:
    json
    {"date":"YYYY-MM-DD","mode":"review|build","project":"project-name","sdk":"ts|py","findings":["finding1","finding2"],"severity_counts":{"critical":0,"high":0,"medium":0,"low":0}}
    At session start, if data/review-log.jsonl exists, read it and note recurring patterns across past sessions to inform the current review.

Output Format

Review Mode

Rank findings by severity:

## [CRITICAL] Issue title
**What**: Description of the problem
**Why it matters**: Impact (crashes, data loss, infinite loops, etc.)
**Where**: File and line reference
**Fix**:
// Before (BAD)
<problematic code>

// After (GOOD)
<fixed code>
## [HIGH] Issue title
...

## [MEDIUM] Issue title
...

## [LOW] Issue title
...

Build Mode

Structure output as:

  1. Architecture Decision — Which pattern to use and why
  2. Implementation — Working code following all best practices
  3. Checklist — Verification points from the relevant process steps

References

#TopicFile
0Gotchas (Always Load)references/gotchas.md
1Agentic Loop Architecturereferences/agentic-loop.md
2Tool Design & Scopingreferences/tool-design.md
3Prompt Engineeringreferences/prompt-engineering.md
4Structured Outputreferences/structured-output.md
5Context Managementreferences/context-management.md
6MCP Integrationreferences/mcp-integration.md
7Error Handlingreferences/error-handling.md
8Hooks & Lifecyclereferences/hooks-lifecycle.md
9Multi-Agent Patternsreferences/multi-agent.md

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Claude Agent Sdk Expert?

Use when reviewing, debugging, or building AI agents with the Claude Agent SDK (TypeScript or Python). Covers the Agent class, query(), agent.stream(), tool_use, tool schemas, maxIterations, subagents, hooks (PreToolCall, PostToolCall, StopHook), MCP integration, multi-agent coordination, structured output, context window management, stop_reason handling, and agentic loop architecture. Do NOT activate for general Claude API usage without agents, simple messages.create() calls, or non-agent Anthropic SDK usage — use the claude-api skill for those.

Зачем использовать Claude Agent Sdk Expert в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Claude Agent Sdk Expert — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Claude Agent Sdk Expert в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/raroque/claude-agent-sdk-skill/tree/main/claude-agent-sdk-expert. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Claude Agent Sdk Expert?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Claude Agent Sdk Expert?

С любым количеством. В TypingMind вы можете использовать Claude Agent Sdk Expert с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Claude Agent Sdk Expert?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — raroque. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇