Toolverse
All skills

claude-agent-sdk

by openclaw

Build autonomous AI agents with Claude Agent SDK. Structured outputs guarantee JSON schema validation, with plugins system and hooks for event-driven workflows. Prevents 14 documented errors.\n\nUse when: building coding agents, SRE systems, security auditors, or troubleshooting

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
openclaw
Category
Data Science

About this skill

Build autonomous AI agents with Claude Agent SDK. Structured outputs guarantee JSON schema validation, with plugins system and hooks for event-driven workflows. Prevents 14 documented errors.\n\nUse when: building coding agents, SRE systems, security auditors, or troubleshooting CLI not found, structured output validation, session forking errors, MCP config issues, subagent cleanup.

How to use

  1. Zainstaluj pakiet npm: npm install @anthropic-ai/claude-agent-sdk@0.2.12. 2. Zdefiniuj schemat wyjścia za pomocą Zod lub JSON Schema — na przykład obiekt z polami summary, sentiment i confidence. Jeśli używasz Zod, przekonwertuj schemat na JSON Schema za pomocą biblioteki zod-to-json-schema. 3. Zaimportuj funkcję query z SDK i przygotuj zapytanie do agenta, przekazując prompt oraz opcje zawierające model (np. claude-sonnet-4-5) i parametr outputFormat z definicją schematu. 4. Upewnij się, że używasz beta headera structured-outputs-2025-11-13, aby włączyć walidację strukturyzowanych wyjść. 5. Iteruj po odpowiedziach agenta — gdy otrzymasz wiadomość typu result z polem structured_output, parsuj ją za pomocą zdefiniowanego schematu Zod, aby uzyskać w pełni typizowane dane. 6. Rozwiąż typowe problemy: jeśli napotkasz błędy CLI not found, problemy z konfiguracją MCP lub błędy czyszczenia subagentów, zapoznaj się z dokumentacją SDK dotyczącą systemu pluginów i hooków do obsługi przepływów zdarzeń.

Related skills

pdf-processing

by Ming-Kai-LC

Comprehensive PDF processing techniques for handling large files that exceed Claude Code's reading limits, including chunking strategies, text/table extraction, and OCR for scanned documents. Use when working with PDFs larger than 10-15MB or more than 30-50 pages.

Data Science
23134

market-research-reports

by davila7

Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for

Data Science
16115

arxiv-search

by langchain-ai

Search arXiv preprint repository for papers in physics, mathematics, computer science, quantitative biology, and related fields

Data Science
76172

market-analysis

by xbklairith

Use when analyzing markets or interpreting charts - applies technical indicators (RSI, MACD, Moving Averages), identifies support/resistance, analyzes multi-timeframe trends, checks fundamentals and sentiment. Activates when user says \

Data Science
29144

docx

by anthropics

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content,

Data Science
39142

codex

by Lucklyric

Invoke Codex CLI for complex coding tasks requiring high reasoning capabilities. This skill should be invoked when users explicitly mention \

Data Science
16163