hive-skills 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.md +235 -0
- package/assets/LICENSE +32 -0
- package/assets/THIRD_PARTY_NOTICES.md +72 -0
- package/assets/manifest.json +1290 -0
- package/assets/skills/authored/code-review/composable/BUNDLE.md +192 -0
- package/assets/skills/authored/code-review/composable/INDEX.md +13 -0
- package/assets/skills/authored/code-review/composable/VERSION +1 -0
- package/assets/skills/authored/code-review/composable/mini/01-review-method.md +34 -0
- package/assets/skills/authored/code-review/composable/mini/02-security-review.md +20 -0
- package/assets/skills/authored/code-review/composable/mini/03-correctness-bugs.md +19 -0
- package/assets/skills/authored/code-review/composable/mini/04-concurrency.md +16 -0
- package/assets/skills/authored/code-review/composable/mini/05-error-handling.md +12 -0
- package/assets/skills/authored/code-review/composable/mini/06-performance.md +11 -0
- package/assets/skills/authored/code-review/composable/mini/07-api-design.md +20 -0
- package/assets/skills/authored/code-review/composable/mini/08-missing-tests.md +25 -0
- package/assets/skills/authored/code-review/composable/mini/09-refactoring-and-communication.md +32 -0
- package/assets/skills/authored/data-analysis/composable/BUNDLE.md +186 -0
- package/assets/skills/authored/data-analysis/composable/INDEX.md +13 -0
- package/assets/skills/authored/data-analysis/composable/VERSION +1 -0
- package/assets/skills/authored/data-analysis/composable/mini/01-data-quality-profiling.md +26 -0
- package/assets/skills/authored/data-analysis/composable/mini/02-aggregation-pitfalls.md +21 -0
- package/assets/skills/authored/data-analysis/composable/mini/03-time-series.md +19 -0
- package/assets/skills/authored/data-analysis/composable/mini/04-segmentation.md +23 -0
- package/assets/skills/authored/data-analysis/composable/mini/05-discount-pricing.md +17 -0
- package/assets/skills/authored/data-analysis/composable/mini/06-insight-generation.md +25 -0
- package/assets/skills/authored/data-analysis/composable/mini/07-executive-writing.md +26 -0
- package/assets/skills/authored/data-analysis/composable/mini/08-recommendations.md +20 -0
- package/assets/skills/authored/data-analysis/composable/mini/09-reproducibility-assumptions.md +20 -0
- package/assets/skills/authored/financial-analysis/composable/BUNDLE.md +1293 -0
- package/assets/skills/authored/financial-analysis/composable/INDEX.md +17 -0
- package/assets/skills/authored/financial-analysis/composable/VERSION +1 -0
- package/assets/skills/authored/financial-analysis/composable/mini/00-core.md +69 -0
- package/assets/skills/authored/financial-analysis/composable/mini/01-profitability-efficiency-ratios.md +173 -0
- package/assets/skills/authored/financial-analysis/composable/mini/02-liquidity-leverage-ratios.md +120 -0
- package/assets/skills/authored/financial-analysis/composable/mini/03-valuation-ratios-interpretation.md +107 -0
- package/assets/skills/authored/financial-analysis/composable/mini/04-dcf-projection-wacc.md +122 -0
- package/assets/skills/authored/financial-analysis/composable/mini/05-dcf-terminal-value-sensitivity.md +75 -0
- package/assets/skills/authored/financial-analysis/composable/mini/06-comparables-precedents.md +78 -0
- package/assets/skills/authored/financial-analysis/composable/mini/07-budget-variance-analysis.md +47 -0
- package/assets/skills/authored/financial-analysis/composable/mini/08-driver-based-forecasting-scenarios.md +111 -0
- package/assets/skills/authored/financial-analysis/composable/mini/09-rolling-forecasts-accuracy.md +114 -0
- package/assets/skills/authored/financial-analysis/composable/mini/10-reporting-exec-summary.md +58 -0
- package/assets/skills/authored/financial-analysis/composable/mini/11-industry-adaptations.md +130 -0
- package/assets/skills/authored/financial-analysis/composable/mini/12-toolkit-scripts-io.md +102 -0
- package/assets/skills/authored/python-api/composable/BUNDLE.md +389 -0
- package/assets/skills/authored/python-api/composable/INDEX.md +13 -0
- package/assets/skills/authored/python-api/composable/VERSION +1 -0
- package/assets/skills/authored/python-api/composable/mini/01-project-structure.md +44 -0
- package/assets/skills/authored/python-api/composable/mini/02-routing-and-app.md +38 -0
- package/assets/skills/authored/python-api/composable/mini/03-pydantic-models.md +45 -0
- package/assets/skills/authored/python-api/composable/mini/04-validation-and-errors.md +59 -0
- package/assets/skills/authored/python-api/composable/mini/05-dependencies-and-auth.md +60 -0
- package/assets/skills/authored/python-api/composable/mini/06-pagination-filtering.md +44 -0
- package/assets/skills/authored/python-api/composable/mini/07-async-performance.md +30 -0
- package/assets/skills/authored/python-api/composable/mini/08-testing.md +45 -0
- package/assets/skills/authored/python-api/composable/mini/09-middleware-observability.md +29 -0
- package/assets/skills/authored/tech-writing/composable/BUNDLE.md +220 -0
- package/assets/skills/authored/tech-writing/composable/INDEX.md +12 -0
- package/assets/skills/authored/tech-writing/composable/VERSION +1 -0
- package/assets/skills/authored/tech-writing/composable/mini/01-audience-analysis.md +26 -0
- package/assets/skills/authored/tech-writing/composable/mini/02-document-types.md +27 -0
- package/assets/skills/authored/tech-writing/composable/mini/03-readme-quickstart-changelog.md +22 -0
- package/assets/skills/authored/tech-writing/composable/mini/04-information-architecture.md +21 -0
- package/assets/skills/authored/tech-writing/composable/mini/05-style-clarity.md +29 -0
- package/assets/skills/authored/tech-writing/composable/mini/06-breaking-changes-migrations.md +33 -0
- package/assets/skills/authored/tech-writing/composable/mini/07-troubleshooting-security.md +30 -0
- package/assets/skills/authored/tech-writing/composable/mini/08-faq-voice-tone.md +32 -0
- package/assets/skills/converted/claude-api/composable/BUNDLE.md +14996 -0
- package/assets/skills/converted/claude-api/composable/INDEX.md +98 -0
- package/assets/skills/converted/claude-api/composable/VERSION +1 -0
- package/assets/skills/converted/claude-api/composable/mini/00-core.md +235 -0
- package/assets/skills/converted/claude-api/composable/mini/01-model-api-quick-reference.md +258 -0
- package/assets/skills/converted/claude-api/composable/mini/02-common-pitfalls.md +42 -0
- package/assets/skills/converted/claude-api/composable/mini/10-models.md +135 -0
- package/assets/skills/converted/claude-api/composable/mini/11-platform-availability.md +96 -0
- package/assets/skills/converted/claude-api/composable/mini/12-claude-platform-on-aws.md +59 -0
- package/assets/skills/converted/claude-api/composable/mini/13-live-sources.md +143 -0
- package/assets/skills/converted/claude-api/composable/mini/14-error-codes.md +256 -0
- package/assets/skills/converted/claude-api/composable/mini/15-prompt-caching.md +223 -0
- package/assets/skills/converted/claude-api/composable/mini/16-token-counting.md +56 -0
- package/assets/skills/converted/claude-api/composable/mini/17-tool-use-concepts.md +444 -0
- package/assets/skills/converted/claude-api/composable/mini/18-agent-design.md +101 -0
- package/assets/skills/converted/claude-api/composable/mini/19-anthropic-cli.md +246 -0
- package/assets/skills/converted/claude-api/composable/mini/20-model-migration.md +1301 -0
- package/assets/skills/converted/claude-api/composable/mini/30-managed-agents-overview.md +71 -0
- package/assets/skills/converted/claude-api/composable/mini/31-managed-agents-core.md +278 -0
- package/assets/skills/converted/claude-api/composable/mini/32-managed-agents-environments.md +219 -0
- package/assets/skills/converted/claude-api/composable/mini/33-managed-agents-tools.md +366 -0
- package/assets/skills/converted/claude-api/composable/mini/34-managed-agents-events.md +252 -0
- package/assets/skills/converted/claude-api/composable/mini/35-managed-agents-outcomes.md +106 -0
- package/assets/skills/converted/claude-api/composable/mini/36-managed-agents-multiagent.md +101 -0
- package/assets/skills/converted/claude-api/composable/mini/37-managed-agents-webhooks.md +123 -0
- package/assets/skills/converted/claude-api/composable/mini/38-managed-agents-memory.md +197 -0
- package/assets/skills/converted/claude-api/composable/mini/39-managed-agents-scheduled-deployments.md +146 -0
- package/assets/skills/converted/claude-api/composable/mini/40-managed-agents-client-patterns.md +211 -0
- package/assets/skills/converted/claude-api/composable/mini/41-managed-agents-onboarding.md +82 -0
- package/assets/skills/converted/claude-api/composable/mini/42-managed-agents-api-reference.md +441 -0
- package/assets/skills/converted/claude-api/composable/mini/43-managed-agents-self-hosted-sandboxes.md +174 -0
- package/assets/skills/converted/claude-api/composable/mini/50-python-readme.md +564 -0
- package/assets/skills/converted/claude-api/composable/mini/51-python-tool-use.md +590 -0
- package/assets/skills/converted/claude-api/composable/mini/52-python-streaming-batches-files.md +549 -0
- package/assets/skills/converted/claude-api/composable/mini/53-python-managed-agents.md +335 -0
- package/assets/skills/converted/claude-api/composable/mini/55-typescript-readme.md +404 -0
- package/assets/skills/converted/claude-api/composable/mini/56-typescript-tool-use.md +548 -0
- package/assets/skills/converted/claude-api/composable/mini/57-typescript-streaming-batches-files.md +384 -0
- package/assets/skills/converted/claude-api/composable/mini/58-typescript-managed-agents.md +358 -0
- package/assets/skills/converted/claude-api/composable/mini/60-csharp-readme.md +361 -0
- package/assets/skills/converted/claude-api/composable/mini/61-csharp-tool-use.md +163 -0
- package/assets/skills/converted/claude-api/composable/mini/62-csharp-streaming-batches-files.md +64 -0
- package/assets/skills/converted/claude-api/composable/mini/65-go-readme.md +185 -0
- package/assets/skills/converted/claude-api/composable/mini/66-go-tool-use.md +219 -0
- package/assets/skills/converted/claude-api/composable/mini/67-go-streaming-files.md +63 -0
- package/assets/skills/converted/claude-api/composable/mini/68-go-managed-agents.md +564 -0
- package/assets/skills/converted/claude-api/composable/mini/70-java-readme.md +237 -0
- package/assets/skills/converted/claude-api/composable/mini/71-java-tool-use.md +227 -0
- package/assets/skills/converted/claude-api/composable/mini/72-java-streaming-files.md +49 -0
- package/assets/skills/converted/claude-api/composable/mini/73-java-managed-agents.md +443 -0
- package/assets/skills/converted/claude-api/composable/mini/75-php-readme.md +173 -0
- package/assets/skills/converted/claude-api/composable/mini/76-php-tool-use.md +252 -0
- package/assets/skills/converted/claude-api/composable/mini/77-php-streaming-batches-files.md +53 -0
- package/assets/skills/converted/claude-api/composable/mini/78-php-managed-agents.md +443 -0
- package/assets/skills/converted/claude-api/composable/mini/80-ruby-readme.md +133 -0
- package/assets/skills/converted/claude-api/composable/mini/81-ruby-tool-use-streaming.md +56 -0
- package/assets/skills/converted/claude-api/composable/mini/82-ruby-managed-agents.md +394 -0
- package/assets/skills/converted/claude-api/composable/mini/85-curl-examples.md +255 -0
- package/assets/skills/converted/claude-api/composable/mini/86-curl-managed-agents.md +340 -0
- package/assets/skills/converted/claude-api/composable/presets/csharp.md +1151 -0
- package/assets/skills/converted/claude-api/composable/presets/curl.md +1154 -0
- package/assets/skills/converted/claude-api/composable/presets/go.md +1598 -0
- package/assets/skills/converted/claude-api/composable/presets/java.md +1523 -0
- package/assets/skills/converted/claude-api/composable/presets/php.md +1488 -0
- package/assets/skills/converted/claude-api/composable/presets/python.md +2605 -0
- package/assets/skills/converted/claude-api/composable/presets/ruby.md +1146 -0
- package/assets/skills/converted/claude-api/composable/presets/shared.md +6478 -0
- package/assets/skills/converted/claude-api/composable/presets/typescript.md +2261 -0
- package/assets/skills/converted/docx/composable/BUNDLE.md +617 -0
- package/assets/skills/converted/docx/composable/INDEX.md +12 -0
- package/assets/skills/converted/docx/composable/VERSION +1 -0
- package/assets/skills/converted/docx/composable/mini/00-core.md +26 -0
- package/assets/skills/converted/docx/composable/mini/01-reading-converting.md +36 -0
- package/assets/skills/converted/docx/composable/mini/02-creating-setup-layout.md +85 -0
- package/assets/skills/converted/docx/composable/mini/03-creating-elements.md +257 -0
- package/assets/skills/converted/docx/composable/mini/04-editing-existing.md +57 -0
- package/assets/skills/converted/docx/composable/mini/05-xml-reference.md +128 -0
- package/assets/skills/converted/internal-comms/composable/BUNDLE.md +220 -0
- package/assets/skills/converted/internal-comms/composable/INDEX.md +11 -0
- package/assets/skills/converted/internal-comms/composable/VERSION +1 -0
- package/assets/skills/converted/internal-comms/composable/mini/00-core.md +30 -0
- package/assets/skills/converted/internal-comms/composable/mini/01-3p-updates.md +49 -0
- package/assets/skills/converted/internal-comms/composable/mini/02-company-newsletter.md +67 -0
- package/assets/skills/converted/internal-comms/composable/mini/03-faq-answers.md +32 -0
- package/assets/skills/converted/internal-comms/composable/mini/04-general-comms.md +18 -0
- package/assets/skills/converted/mcp-builder/composable/BUNDLE.md +2460 -0
- package/assets/skills/converted/mcp-builder/composable/INDEX.md +23 -0
- package/assets/skills/converted/mcp-builder/composable/VERSION +1 -0
- package/assets/skills/converted/mcp-builder/composable/mini/00-core.md +43 -0
- package/assets/skills/converted/mcp-builder/composable/mini/01-workflow-research-planning.md +54 -0
- package/assets/skills/converted/mcp-builder/composable/mini/02-implementation-process.md +78 -0
- package/assets/skills/converted/mcp-builder/composable/mini/03-naming-conventions.md +33 -0
- package/assets/skills/converted/mcp-builder/composable/mini/04-response-formats.md +21 -0
- package/assets/skills/converted/mcp-builder/composable/mini/05-pagination.md +24 -0
- package/assets/skills/converted/mcp-builder/composable/mini/06-transport.md +47 -0
- package/assets/skills/converted/mcp-builder/composable/mini/07-annotations.md +20 -0
- package/assets/skills/converted/mcp-builder/composable/mini/08-security.md +35 -0
- package/assets/skills/converted/mcp-builder/composable/mini/09-error-handling.md +32 -0
- package/assets/skills/converted/mcp-builder/composable/mini/10-testing-and-documentation.md +21 -0
- package/assets/skills/converted/mcp-builder/composable/mini/11-python-implementation.md +432 -0
- package/assets/skills/converted/mcp-builder/composable/mini/12-python-advanced-and-checklist.md +233 -0
- package/assets/skills/converted/mcp-builder/composable/mini/13-node-implementation.md +717 -0
- package/assets/skills/converted/mcp-builder/composable/mini/14-node-advanced-and-checklist.md +200 -0
- package/assets/skills/converted/mcp-builder/composable/mini/15-evaluation-design.md +200 -0
- package/assets/skills/converted/mcp-builder/composable/mini/16-evaluation-running.md +198 -0
- package/assets/skills/converted/mcp-builder/composable/presets/node-server.md +1381 -0
- package/assets/skills/converted/mcp-builder/composable/presets/python-server.md +1129 -0
- package/assets/skills/converted/pdf/composable/BUNDLE.md +1284 -0
- package/assets/skills/converted/pdf/composable/INDEX.md +14 -0
- package/assets/skills/converted/pdf/composable/VERSION +1 -0
- package/assets/skills/converted/pdf/composable/mini/00-core.md +46 -0
- package/assets/skills/converted/pdf/composable/mini/01-creation.md +176 -0
- package/assets/skills/converted/pdf/composable/mini/02-extraction.md +178 -0
- package/assets/skills/converted/pdf/composable/mini/03-merge-split-manipulate.md +240 -0
- package/assets/skills/converted/pdf/composable/mini/04-images-ocr.md +168 -0
- package/assets/skills/converted/pdf/composable/mini/05-encryption.md +51 -0
- package/assets/skills/converted/pdf/composable/mini/06-forms.md +300 -0
- package/assets/skills/converted/pdf/composable/mini/07-libraries-reference.md +89 -0
- package/assets/skills/converted/pptx/composable/BUNDLE.md +911 -0
- package/assets/skills/converted/pptx/composable/INDEX.md +12 -0
- package/assets/skills/converted/pptx/composable/VERSION +1 -0
- package/assets/skills/converted/pptx/composable/mini/00-core.md +37 -0
- package/assets/skills/converted/pptx/composable/mini/01-reading.md +37 -0
- package/assets/skills/converted/pptx/composable/mini/02-creating-from-scratch.md +422 -0
- package/assets/skills/converted/pptx/composable/mini/03-editing-templates.md +207 -0
- package/assets/skills/converted/pptx/composable/mini/04-design.md +89 -0
- package/assets/skills/converted/pptx/composable/mini/05-qa-and-rendering.md +91 -0
- package/assets/skills/converted/pptx/composable/presets/creating.md +659 -0
- package/assets/skills/converted/pptx/composable/presets/editing.md +485 -0
- package/assets/skills/converted/skill-creator/composable/BUNDLE.md +1681 -0
- package/assets/skills/converted/skill-creator/composable/INDEX.md +21 -0
- package/assets/skills/converted/skill-creator/composable/VERSION +1 -0
- package/assets/skills/converted/skill-creator/composable/mini/00-core.md +59 -0
- package/assets/skills/converted/skill-creator/composable/mini/01-creating-a-skill.md +27 -0
- package/assets/skills/converted/skill-creator/composable/mini/02-skill-writing-guide.md +71 -0
- package/assets/skills/converted/skill-creator/composable/mini/03-test-cases.md +21 -0
- package/assets/skills/converted/skill-creator/composable/mini/04-running-and-evaluating.md +128 -0
- package/assets/skills/converted/skill-creator/composable/mini/05-improving-the-skill.md +30 -0
- package/assets/skills/converted/skill-creator/composable/mini/06-blind-comparison.md +5 -0
- package/assets/skills/converted/skill-creator/composable/mini/07-description-optimization.md +74 -0
- package/assets/skills/converted/skill-creator/composable/mini/08-packaging.md +11 -0
- package/assets/skills/converted/skill-creator/composable/mini/09-environment-specific.md +38 -0
- package/assets/skills/converted/skill-creator/composable/mini/10-scripts-and-references.md +34 -0
- package/assets/skills/converted/skill-creator/composable/mini/11-json-schemas.md +414 -0
- package/assets/skills/converted/skill-creator/composable/mini/12-agent-grader.md +225 -0
- package/assets/skills/converted/skill-creator/composable/mini/13-agent-comparator.md +204 -0
- package/assets/skills/converted/skill-creator/composable/mini/14-agent-analyzer.md +276 -0
- package/assets/skills/converted/skill-creator/composable/presets/authoring.md +198 -0
- package/assets/skills/converted/skill-creator/composable/presets/evaluating.md +1334 -0
- package/assets/skills/converted/skill-creator/composable/presets/optimizing.md +160 -0
- package/assets/skills/converted/skill-creator/composable/presets.json +5 -0
- package/assets/skills/meta/ccs-skill-creator/composable/BUNDLE.md +465 -0
- package/assets/skills/meta/ccs-skill-creator/composable/INDEX.md +8 -0
- package/assets/skills/meta/ccs-skill-creator/composable/VERSION +1 -0
- package/assets/skills/meta/ccs-skill-creator/composable/mini/00-core.md +46 -0
- package/assets/skills/meta/ccs-skill-creator/composable/mini/01-create-new-skill.md +167 -0
- package/assets/skills/meta/ccs-skill-creator/composable/mini/02-convert-existing-skill.md +120 -0
- package/assets/skills/meta/ccs-skill-creator/composable/mini/03-review-and-maintain.md +112 -0
- package/assets/skills/sources/anthropic/PROVENANCE.md +3 -0
- package/assets/skills/sources/anthropic/claude-api/LICENSE.txt +202 -0
- package/assets/skills/sources/anthropic/docx/LICENSE.txt +30 -0
- package/assets/skills/sources/anthropic/internal-comms/LICENSE.txt +202 -0
- package/assets/skills/sources/anthropic/mcp-builder/LICENSE.txt +202 -0
- package/assets/skills/sources/anthropic/pdf/LICENSE.txt +30 -0
- package/assets/skills/sources/anthropic/pptx/LICENSE.txt +30 -0
- package/assets/skills/sources/anthropic/skill-creator/LICENSE.txt +202 -0
- package/assets/skills/sources/financial-analyst/PROVENANCE.md +1 -0
- package/assets/tools/hive.py +728 -0
- package/dist/cli.js +7494 -0
- package/package.json +40 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Claude API: Loading Menu
|
|
2
|
+
|
|
3
|
+
Reference for the Claude API / Anthropic SDK. Detect the language first; 56 minis total. Use a preset when most of a track applies.
|
|
4
|
+
|
|
5
|
+
Loading policy: read this menu, then load 00-core (if present) plus the minis relevant to your task. If most of this skill is relevant, load BUNDLE.md (or a matching presets/*.md) in one read instead.
|
|
6
|
+
|
|
7
|
+
## Core (load first)
|
|
8
|
+
|
|
9
|
+
- `mini/00-core.md` - routing, language detection, surface/decision tree, reading guide - **always load**
|
|
10
|
+
- `mini/01-model-api-quick-reference.md` - model ids/pricing, auth, thinking/effort, caching, fast mode, provider clients, server tools, all cross-language QRs - Load for model choice, params, or any quick lookup.
|
|
11
|
+
- `mini/02-common-pitfalls.md` - cross-cutting gotchas (thinking, prefill, refusal, tokenizer, tool JSON) - Load when writing or debugging any Claude call.
|
|
12
|
+
|
|
13
|
+
## Shared platform topics
|
|
14
|
+
|
|
15
|
+
- `mini/10-models.md` - Models API, capability lookup, older model ids - Load for "which model/context window/does X support Y".
|
|
16
|
+
- `mini/11-platform-availability.md` - per-feature support on Bedrock/Vertex/Foundry/AWS - Load when targeting a cloud provider.
|
|
17
|
+
- `mini/12-claude-platform-on-aws.md` - Claude Platform on AWS client setup - Load when using Claude on AWS.
|
|
18
|
+
- `mini/13-live-sources.md` - WebFetch URLs for latest SDK/API docs - Load when docs are missing or "latest" is asked.
|
|
19
|
+
- `mini/14-error-codes.md` - HTTP errors, per-SDK typed exception classes - Load when handling or debugging errors.
|
|
20
|
+
- `mini/15-prompt-caching.md` - prefix design, breakpoints, invalidator audit - Load when adding/optimizing caching.
|
|
21
|
+
- `mini/16-token-counting.md` - count_tokens usage - Load for "how many tokens is X".
|
|
22
|
+
- `mini/17-tool-use-concepts.md` - tool use, code execution, memory, structured outputs concepts - Load for any tool/agent work.
|
|
23
|
+
- `mini/18-agent-design.md` - tool surface, context management, caching strategy - Load when designing an agent.
|
|
24
|
+
- `mini/19-anthropic-cli.md` - `ant` CLI, auth profiles, scopes - Load for auth/profiles or CLI-driven setup.
|
|
25
|
+
- `mini/20-model-migration.md` - full migration guide (Fable 5 / Opus / Sonnet), breaking changes - Load for `migrate` or model upgrades.
|
|
26
|
+
|
|
27
|
+
## Managed Agents (shared concepts)
|
|
28
|
+
|
|
29
|
+
- `mini/30-managed-agents-overview.md` - reading guide, beta headers, pitfalls - Load first for Managed Agents.
|
|
30
|
+
- `mini/31-managed-agents-core.md` - agent/session lifecycle, mandatory flow - Load when building Managed Agents.
|
|
31
|
+
- `mini/32-managed-agents-environments.md` - environments, containers, file mounts - Load when configuring workspaces.
|
|
32
|
+
- `mini/33-managed-agents-tools.md` - tools, Skills, MCP on agents - Load when wiring agent tools.
|
|
33
|
+
- `mini/34-managed-agents-events.md` - SSE event stream reference - Load when consuming session events.
|
|
34
|
+
- `mini/35-managed-agents-outcomes.md` - outcomes/results handling - Load for terminal state handling.
|
|
35
|
+
- `mini/36-managed-agents-multiagent.md` - multi-agent orchestration - Load for multi-agent setups.
|
|
36
|
+
- `mini/37-managed-agents-webhooks.md` - webhooks - Load when using webhook callbacks.
|
|
37
|
+
- `mini/38-managed-agents-memory.md` - memory stores - Load when using agent memory.
|
|
38
|
+
- `mini/39-managed-agents-scheduled-deployments.md` - cron deployments - Load for scheduled/autonomous runs.
|
|
39
|
+
- `mini/40-managed-agents-client-patterns.md` - stream reconnect, interrupt, tool-confirmation, gotchas - Load when writing agent client code.
|
|
40
|
+
- `mini/41-managed-agents-onboarding.md` - interview script for setup from scratch - Load for `managed-agents-onboard` or new-agent walkthrough.
|
|
41
|
+
- `mini/42-managed-agents-api-reference.md` - full Managed Agents API reference - Load for endpoint/field details.
|
|
42
|
+
- `mini/43-managed-agents-self-hosted-sandboxes.md` - self-hosted sandboxes, monitoring/control - Load for self-hosted tool runtimes.
|
|
43
|
+
|
|
44
|
+
## Python
|
|
45
|
+
|
|
46
|
+
- `mini/50-python-readme.md` - install, client init, requests, thinking, caching - Load first for Python.
|
|
47
|
+
- `mini/51-python-tool-use.md` - tool runner, manual loop, code execution, structured outputs - Load for Python tools/agents.
|
|
48
|
+
- `mini/52-python-streaming-batches-files.md` - streaming, batches, files API - Load for Python streaming/batch/files.
|
|
49
|
+
- `mini/53-python-managed-agents.md` - Managed Agents code - Load for Python Managed Agents.
|
|
50
|
+
|
|
51
|
+
## TypeScript
|
|
52
|
+
|
|
53
|
+
- `mini/55-typescript-readme.md` - install, client init, requests, thinking, caching - Load first for TypeScript/JS.
|
|
54
|
+
- `mini/56-typescript-tool-use.md` - betaZodTool, tool runner, structured outputs - Load for TS tools/agents.
|
|
55
|
+
- `mini/57-typescript-streaming-batches-files.md` - streaming, batches, files API - Load for TS streaming/batch/files.
|
|
56
|
+
- `mini/58-typescript-managed-agents.md` - Managed Agents code - Load for TS Managed Agents.
|
|
57
|
+
|
|
58
|
+
## C#
|
|
59
|
+
|
|
60
|
+
- `mini/60-csharp-readme.md` - install, client init, requests, thinking, caching - Load first for C#.
|
|
61
|
+
- `mini/61-csharp-tool-use.md` - BetaToolRunner, raw JSON schema tools - Load for C# tools/agents.
|
|
62
|
+
- `mini/62-csharp-streaming-batches-files.md` - streaming, batches, files API - Load for C# streaming/batch/files.
|
|
63
|
+
|
|
64
|
+
## Go
|
|
65
|
+
|
|
66
|
+
- `mini/65-go-readme.md` - install, client init, requests, thinking, caching - Load first for Go.
|
|
67
|
+
- `mini/66-go-tool-use.md` - BetaToolRunner, code execution, structured outputs - Load for Go tools/agents.
|
|
68
|
+
- `mini/67-go-streaming-files.md` - streaming, files API - Load for Go streaming/files.
|
|
69
|
+
- `mini/68-go-managed-agents.md` - Managed Agents code - Load for Go Managed Agents.
|
|
70
|
+
|
|
71
|
+
## Java
|
|
72
|
+
|
|
73
|
+
- `mini/70-java-readme.md` - install, client init, requests, thinking, caching - Load first for Java/Kotlin/Scala.
|
|
74
|
+
- `mini/71-java-tool-use.md` - annotated tool classes, tool runner - Load for Java tools/agents.
|
|
75
|
+
- `mini/72-java-streaming-files.md` - streaming, files API - Load for Java streaming/files.
|
|
76
|
+
- `mini/73-java-managed-agents.md` - Managed Agents code - Load for Java Managed Agents.
|
|
77
|
+
|
|
78
|
+
## PHP
|
|
79
|
+
|
|
80
|
+
- `mini/75-php-readme.md` - install, client init, requests, thinking, caching - Load first for PHP.
|
|
81
|
+
- `mini/76-php-tool-use.md` - BetaRunnableTool, toolRunner - Load for PHP tools/agents.
|
|
82
|
+
- `mini/77-php-streaming-batches-files.md` - streaming, batches, files API - Load for PHP streaming/batch/files.
|
|
83
|
+
- `mini/78-php-managed-agents.md` - Managed Agents code - Load for PHP Managed Agents.
|
|
84
|
+
|
|
85
|
+
## Ruby
|
|
86
|
+
|
|
87
|
+
- `mini/80-ruby-readme.md` - install, client init, requests, thinking, caching - Load first for Ruby.
|
|
88
|
+
- `mini/81-ruby-tool-use-streaming.md` - BaseTool/tool_runner, streaming - Load for Ruby tools/streaming.
|
|
89
|
+
- `mini/82-ruby-managed-agents.md` - Managed Agents code - Load for Ruby Managed Agents.
|
|
90
|
+
|
|
91
|
+
## cURL / raw HTTP
|
|
92
|
+
|
|
93
|
+
- `mini/85-curl-examples.md` - raw HTTP request/streaming/tool-use shapes - Load for cURL/REST.
|
|
94
|
+
- `mini/86-curl-managed-agents.md` - Managed Agents over raw HTTP - Load for cURL Managed Agents.
|
|
95
|
+
|
|
96
|
+
## Presets
|
|
97
|
+
|
|
98
|
+
Per-track bundles (each = core + that track): `presets/shared.md`, `presets/python.md`, `presets/typescript.md`, `presets/csharp.md`, `presets/go.md`, `presets/java.md`, `presets/php.md`, `presets/ruby.md`, `presets/curl.md`. BUNDLE.md holds all minis (~192k tokens) - prefer a preset.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.0
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Building LLM-Powered Applications with Claude
|
|
2
|
+
|
|
3
|
+
This skill helps you build LLM-powered applications with Claude. Choose the right surface based on your needs, detect the project language, then read the relevant language-specific documentation.
|
|
4
|
+
|
|
5
|
+
## Before You Start
|
|
6
|
+
|
|
7
|
+
Scan the target file (or, if no target file, the prompt and project) for non-Anthropic provider markers — `import openai`, `from openai`, `langchain_openai`, `OpenAI(`, `gpt-4`, `gpt-5`, file names like `agent-openai.py` or `*-generic.py`, or any explicit instruction to keep the code provider-neutral. If you find any, stop and tell the user that this skill produces Claude/Anthropic SDK code; ask whether they want to switch the file to Claude or want a non-Claude implementation. Do not edit a non-Anthropic file with Anthropic SDK calls.
|
|
8
|
+
|
|
9
|
+
## Output Requirement
|
|
10
|
+
|
|
11
|
+
When the user asks you to add, modify, or implement a Claude feature, your code must call Claude through one of:
|
|
12
|
+
|
|
13
|
+
1. **The official Anthropic SDK** for the project's language (`anthropic`, `@anthropic-ai/sdk`, `com.anthropic.*`, etc.). This is the default whenever a supported SDK exists for the project.
|
|
14
|
+
2. **Raw HTTP** (`curl`, `requests`, `fetch`, `httpx`, etc.) — only when the user explicitly asks for cURL/REST/raw HTTP, the project is a shell/cURL project, or the language has no official SDK.
|
|
15
|
+
|
|
16
|
+
Never mix the two — don't reach for `requests`/`fetch` in a Python or TypeScript project just because it feels lighter. Never fall back to OpenAI-compatible shims.
|
|
17
|
+
|
|
18
|
+
**Never guess SDK usage.** Function names, class names, namespaces, method signatures, and import paths must come from explicit documentation — either the `{lang}/` files in this skill or the official SDK repositories or documentation links listed in `shared/live-sources.md`. If the binding you need is not explicitly documented in the skill files, WebFetch the relevant SDK repo from `shared/live-sources.md` before writing code. Do not infer Ruby/Java/Go/PHP/C# APIs from cURL shapes or from another language's SDK.
|
|
19
|
+
|
|
20
|
+
**If WebFetch or repository access fails** (network restricted, timeouts, clone blocked): do not keep retrying — write code from the patterns and namespace/package tables in the `{lang}/` file, run the compiler or interpreter on it, and iterate on the error output. For statically-typed SDKs (C#, Java, Go) a compile-fix loop against local errors reaches working code faster than blocked network research.
|
|
21
|
+
|
|
22
|
+
## Defaults
|
|
23
|
+
|
|
24
|
+
Unless the user requests otherwise:
|
|
25
|
+
|
|
26
|
+
For the Claude model version, please use Claude Opus 4.8, which you can access via the exact model string `claude-opus-4-8`. Please default to using adaptive thinking (`thinking: {type: "adaptive"}`) for anything remotely complicated. And finally, please default to streaming for any request that may involve long input, long output, or high `max_tokens` — it prevents hitting request timeouts. Use the SDK's `.get_final_message()` / `.finalMessage()` helper to get the complete response if you don't need to handle individual stream events
|
|
27
|
+
|
|
28
|
+
## ⚠️ API Drift — Your Training Prior May Be Stale
|
|
29
|
+
|
|
30
|
+
Several common Claude API shapes changed in 2025–2026. If you recall a pattern from training, verify it against the `{lang}/` files in this skill before writing — the rows below are the most frequent drift points:
|
|
31
|
+
|
|
32
|
+
| Area | Stale prior | Current API |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| Extended thinking | `thinking: {type: "enabled", budget_tokens: N}` | On Claude 4.6+ models: `thinking: {type: "adaptive"}`. `budget_tokens` is deprecated on Opus 4.6 / Sonnet 4.6 and **rejected with a 400** on Fable 5 / Sonnet 5 / Opus 4.8 / 4.7. Pre-4.6 models still use `budget_tokens`. |
|
|
35
|
+
| Web search / web fetch tool type | `web_search_20250305`, `web_fetch_20250910` | `web_search_20260209`, `web_fetch_20260209` (dynamic filtering) on Opus 4.8/4.7/4.6, Sonnet 5, and Sonnet 4.6. Older models keep the basic variants; on Vertex AI only basic `web_search_20250305` is available (web fetch is not on Vertex) — see the Server Tools QR below. |
|
|
36
|
+
| PHP parameter names | snake_case wire names as named args (`max_tokens`) | Top-level named args are camelCase (`maxTokens`). Nested array keys vary by feature (e.g. `'taskBudget'`, `'skillID'`, `'mcp_server_name'`) — copy the exact key from the documented example; do not bulk-convert. |
|
|
37
|
+
|
|
38
|
+
The `{lang}/` files in this skill are authoritative over recalled patterns.
|
|
39
|
+
|
|
40
|
+
## Subcommands
|
|
41
|
+
|
|
42
|
+
If the User Request at the bottom of this prompt is a bare subcommand string (no prose), search every **Subcommands** table in this document — including any in sections appended below — and follow the matching Action column directly. This lets users invoke specific flows via `/claude-api <subcommand>`. If no table in the document matches, treat the request as normal prose.
|
|
43
|
+
|
|
44
|
+
| Subcommand | Action |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `migrate` | Migrate existing Claude API code to a newer model. **Read `shared/model-migration.md` immediately** and follow it in order: Step 0 (confirm scope — ask which files/directories before any edit), Step 1 (classify each file), then the per-target breaking-changes section. Do not summarize the guide — execute it. If the user did not name a target model, ask which model to migrate to in the same turn as the scope question. |
|
|
47
|
+
|
|
48
|
+
## Language Detection
|
|
49
|
+
|
|
50
|
+
Before reading code examples, determine which language the user is working in:
|
|
51
|
+
|
|
52
|
+
1. **Look at project files** to infer the language:
|
|
53
|
+
|
|
54
|
+
- `*.py`, `requirements.txt`, `pyproject.toml`, `setup.py`, `Pipfile` → **Python** — read from `python/`
|
|
55
|
+
- `*.ts`, `*.tsx`, `package.json`, `tsconfig.json` → **TypeScript** — read from `typescript/`
|
|
56
|
+
- `*.js`, `*.jsx` (no `.ts` files present) → **TypeScript** — JS uses the same SDK, read from `typescript/`
|
|
57
|
+
- `*.java`, `pom.xml`, `build.gradle` → **Java** — read from `java/`
|
|
58
|
+
- `*.kt`, `*.kts`, `build.gradle.kts` → **Java** — Kotlin uses the Java SDK, read from `java/`
|
|
59
|
+
- `*.scala`, `build.sbt` → **Java** — Scala uses the Java SDK, read from `java/`
|
|
60
|
+
- `*.go`, `go.mod` → **Go** — read from `go/`
|
|
61
|
+
- `*.rb`, `Gemfile` → **Ruby** — read from `ruby/`
|
|
62
|
+
- `*.cs`, `*.csproj` → **C#** — read from `csharp/`
|
|
63
|
+
- `*.php`, `composer.json` → **PHP** — read from `php/`
|
|
64
|
+
|
|
65
|
+
2. **If multiple languages detected** (e.g., both Python and TypeScript files):
|
|
66
|
+
|
|
67
|
+
- Check which language the user's current file or question relates to
|
|
68
|
+
- If still ambiguous, ask: "I detected both Python and TypeScript files. Which language are you using for the Claude API integration?"
|
|
69
|
+
|
|
70
|
+
3. **If language can't be inferred** (empty project, no source files, or unsupported language):
|
|
71
|
+
|
|
72
|
+
- Use AskUserQuestion with options: Python, TypeScript, Java, Go, Ruby, cURL/raw HTTP, C#, PHP
|
|
73
|
+
- If AskUserQuestion is unavailable, default to Python examples and note: "Showing Python examples. Let me know if you need a different language."
|
|
74
|
+
|
|
75
|
+
4. **If unsupported language detected** (Rust, Swift, C++, Elixir, etc.):
|
|
76
|
+
|
|
77
|
+
- Suggest cURL/raw HTTP examples from `curl/` and note that community SDKs may exist
|
|
78
|
+
- Offer to show Python or TypeScript examples as reference implementations
|
|
79
|
+
|
|
80
|
+
5. **If user needs cURL/raw HTTP examples**, read from `curl/`.
|
|
81
|
+
|
|
82
|
+
### Language-Specific Feature Support
|
|
83
|
+
|
|
84
|
+
| Language | Tool Runner | Managed Agents | Notes |
|
|
85
|
+
| ---------- | ----------- | -------------- | ------------------------------------- |
|
|
86
|
+
| Python | Yes (beta) | Yes (beta) | Full support — `@beta_tool` decorator |
|
|
87
|
+
| TypeScript | Yes (beta) | Yes (beta) | Full support — `betaZodTool` + Zod |
|
|
88
|
+
| Java | Yes (beta) | Yes (beta) | Beta tool use with annotated classes |
|
|
89
|
+
| Go | Yes (beta) | Yes (beta) | `BetaToolRunner` in `toolrunner` pkg |
|
|
90
|
+
| Ruby | Yes (beta) | Yes (beta) | `BaseTool` + `tool_runner` in beta |
|
|
91
|
+
| C# | Yes (beta) | Yes (beta) | `BetaToolRunner` + raw JSON schema |
|
|
92
|
+
| PHP | Yes (beta) | Yes (beta) | `BetaRunnableTool` + `toolRunner()` |
|
|
93
|
+
| cURL | N/A | Yes (beta) | Raw HTTP, no SDK features |
|
|
94
|
+
|
|
95
|
+
> **Managed Agents code examples**: dedicated language-specific READMEs are provided for Python, TypeScript, Go, Ruby, PHP, Java, and cURL (`{lang}/managed-agents/README.md`, `curl/managed-agents.md`). Read your language's README plus the language-agnostic `shared/managed-agents-*.md` concept files. **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. The Anthropic CLI (`ant`) is one convenient way to create agents and environments from version-controlled YAML — see `shared/anthropic-cli.md`. If a binding you need isn't shown in the README, WebFetch the relevant entry from `shared/live-sources.md` rather than guess. C# has beta Managed Agents support via `client.Beta.Agents` and related namespaces.
|
|
96
|
+
|
|
97
|
+
## Which Surface Should I Use?
|
|
98
|
+
|
|
99
|
+
> **Start simple.** Default to the simplest tier that meets your needs. Single API calls and workflows handle most use cases — only reach for agents when the task genuinely requires open-ended, model-driven exploration.
|
|
100
|
+
|
|
101
|
+
| Use Case | Tier | Recommended Surface | Why |
|
|
102
|
+
| ----------------------------------------------- | --------------- | ------------------------- | ------------------------------------------------------------ |
|
|
103
|
+
| Classification, summarization, extraction, Q&A | Single LLM call | **Claude API** | One request, one response |
|
|
104
|
+
| Batch processing or embeddings | Single LLM call | **Claude API** | Specialized endpoints |
|
|
105
|
+
| Multi-step pipelines with code-controlled logic | Workflow | **Claude API + tool use** | You orchestrate the loop |
|
|
106
|
+
| Custom agent with your own tools | Agent | **Claude API + tool use** | Maximum flexibility |
|
|
107
|
+
| Server-managed stateful agent with workspace | Agent | **Managed Agents** | Anthropic runs the loop and hosts the tool-execution sandbox |
|
|
108
|
+
| Persisted, versioned agent configs | Agent | **Managed Agents** | Agents are stored objects; sessions pin to a version |
|
|
109
|
+
| Long-running multi-turn agent with file mounts | Agent | **Managed Agents** | Per-session containers, SSE event stream, Skills + MCP |
|
|
110
|
+
|
|
111
|
+
> **Note:** Managed Agents is the right choice when you want Anthropic to run the agent loop *and* host the container where tools execute — file ops, bash, code execution all run in the per-session workspace. If you want to host the compute yourself or run your own custom tool runtime, Claude API + tool use is the right choice — use the tool runner for automatic loop handling, or the manual loop for fine-grained control (approval gates, custom logging, conditional execution).
|
|
112
|
+
|
|
113
|
+
> **Cloud-provider access.** **Claude Platform on AWS** is Anthropic-operated with same-day API parity — see `shared/claude-platform-on-aws.md` for client setup. For per-feature availability on **Claude Platform on AWS**, **Amazon Bedrock**, **Google Vertex AI**, and **Microsoft Foundry**, see `shared/platform-availability.md` — that table is the single source of truth in this skill; do not infer availability from anywhere else.
|
|
114
|
+
|
|
115
|
+
### Decision Tree
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
What does your application need?
|
|
119
|
+
|
|
120
|
+
0. Which provider?
|
|
121
|
+
├── First-party API or Claude Platform on AWS → continue (full surface available; per-feature exceptions in shared/platform-availability.md).
|
|
122
|
+
└── Amazon Bedrock, Google Vertex AI, or Microsoft Foundry → Claude API (+ tool use for agents); see shared/platform-availability.md for per-feature support.
|
|
123
|
+
|
|
124
|
+
1. Single LLM call (classification, summarization, extraction, Q&A)
|
|
125
|
+
└── Claude API — one request, one response
|
|
126
|
+
|
|
127
|
+
2. Do you want Anthropic to run the agent loop and host a per-session
|
|
128
|
+
container where Claude executes tools (bash, file ops, code)?
|
|
129
|
+
└── Yes → Managed Agents — server-managed sessions, persisted agent configs,
|
|
130
|
+
SSE event stream, Skills + MCP, file mounts.
|
|
131
|
+
Examples: "stateful coding agent with a workspace per task",
|
|
132
|
+
"long-running research agent that streams events to a UI",
|
|
133
|
+
"agent with persisted, versioned config used across many sessions"
|
|
134
|
+
|
|
135
|
+
3. Workflow (multi-step, code-orchestrated, with your own tools)
|
|
136
|
+
└── Claude API with tool use — you control the loop
|
|
137
|
+
|
|
138
|
+
4. Open-ended agent (model decides its own trajectory, your own tools, you host the compute)
|
|
139
|
+
└── Claude API agentic loop (maximum flexibility)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Should I Build an Agent?
|
|
143
|
+
|
|
144
|
+
Before choosing the agent tier, check all four criteria:
|
|
145
|
+
|
|
146
|
+
- **Complexity** — Is the task multi-step and hard to fully specify in advance? (e.g., "turn this design doc into a PR" vs. "extract the title from this PDF")
|
|
147
|
+
- **Value** — Does the outcome justify higher cost and latency?
|
|
148
|
+
- **Viability** — Is Claude capable at this task type?
|
|
149
|
+
- **Cost of error** — Can errors be caught and recovered from? (tests, review, rollback)
|
|
150
|
+
|
|
151
|
+
If the answer is "no" to any of these, stay at a simpler tier (single call or workflow).
|
|
152
|
+
|
|
153
|
+
## Architecture
|
|
154
|
+
|
|
155
|
+
Everything goes through `POST /v1/messages`. Tools and output constraints are features of this single endpoint — not separate APIs.
|
|
156
|
+
|
|
157
|
+
**User-defined tools** — You define tools (via decorators, Zod schemas, or raw JSON), and the SDK's tool runner handles calling the API, executing your functions, and looping until Claude is done. For full control, you can write the loop manually.
|
|
158
|
+
|
|
159
|
+
**Server-side tools** — Anthropic-hosted tools that run on Anthropic's infrastructure. Code execution is fully server-side (declare it in `tools`, Claude runs code automatically). Computer use can be server-hosted or self-hosted.
|
|
160
|
+
|
|
161
|
+
**Structured outputs** — Constrains the Messages API response format (`output_config.format`) and/or tool parameter validation (`strict: true`). The recommended approach is `client.messages.parse()` which validates responses against your schema automatically. Note: the old `output_format` parameter is deprecated; use `output_config: {format: {...}}` on `messages.create()`.
|
|
162
|
+
|
|
163
|
+
**Supporting endpoints** — Batches (`POST /v1/messages/batches`), Files (`POST /v1/files`), Token Counting (`POST /v1/messages/count_tokens` — see `shared/token-counting.md`), and Models (`GET /v1/models`, `GET /v1/models/{id}` — live capability/context-window discovery) feed into or support Messages API requests.
|
|
164
|
+
|
|
165
|
+
## Reading Guide
|
|
166
|
+
|
|
167
|
+
After detecting the language, read the relevant files based on what the user needs.
|
|
168
|
+
|
|
169
|
+
**All SDK languages use the same multi-file layout** — directory `{lang}/claude-api/` containing `README.md` (install, client init, basic request, thinking, caching, stop details, misc), `tool-use.md` (tool definitions, agentic loop, Anthropic-defined tools, structured outputs), `streaming.md`, `batches.md`, `files-api.md`. Not every language has every file (e.g., Ruby has no `batches.md`); if a file is absent, that feature's example is not yet documented for that language — fall back to the cURL shape or WebFetch the SDK repo from `shared/live-sources.md`. **cURL** → `curl/examples.md`.
|
|
170
|
+
|
|
171
|
+
The Quick Task Reference below uses the `{lang}/claude-api/FILE.md` path notation for all languages.
|
|
172
|
+
|
|
173
|
+
### Quick Task Reference
|
|
174
|
+
|
|
175
|
+
**Single text classification/summarization/extraction/Q&A:**
|
|
176
|
+
→ Read only `{lang}/claude-api/README.md`
|
|
177
|
+
|
|
178
|
+
**Chat UI or real-time response display:**
|
|
179
|
+
→ Read `{lang}/claude-api/README.md` + `{lang}/claude-api/streaming.md`
|
|
180
|
+
|
|
181
|
+
**Long-running conversations (may exceed context window):**
|
|
182
|
+
→ Read `{lang}/claude-api/README.md` — see Compaction section
|
|
183
|
+
**Migrating to a newer model (Fable 5 / Opus 4.8 / Opus 4.7 / Opus 4.6 / Sonnet 5 / Sonnet 4.6) or replacing a retired model:**
|
|
184
|
+
→ Read `shared/model-migration.md`
|
|
185
|
+
**Prompting or tuning Fable 5 (long turns, effort, verbosity, autonomous runs, sub-agents):**
|
|
186
|
+
→ Read `shared/model-migration.md` → Migrating to Fable 5 → Behavioral shifts (prompt-tunable) + Long-running agent recommendations
|
|
187
|
+
**Prompt caching / optimize caching / "why is my cache hit rate low":**
|
|
188
|
+
→ Read `shared/prompt-caching.md` + `{lang}/claude-api/README.md` (Prompt Caching section)
|
|
189
|
+
**Count tokens in a file / prompt / diff ("how many tokens is X"):**
|
|
190
|
+
→ Read `shared/token-counting.md` — use `messages.count_tokens`, never `tiktoken`
|
|
191
|
+
|
|
192
|
+
**Function calling / tool use / agents:**
|
|
193
|
+
→ Read `{lang}/claude-api/README.md` + `shared/tool-use-concepts.md` + `{lang}/claude-api/tool-use.md`
|
|
194
|
+
|
|
195
|
+
**Agent design (tool surface, context management, caching strategy):**
|
|
196
|
+
→ Read `shared/agent-design.md`
|
|
197
|
+
|
|
198
|
+
**Batch processing (non-latency-sensitive):**
|
|
199
|
+
→ Read `{lang}/claude-api/README.md` + `{lang}/claude-api/batches.md`
|
|
200
|
+
|
|
201
|
+
**File uploads across multiple requests:**
|
|
202
|
+
→ Read `{lang}/claude-api/README.md` + `{lang}/claude-api/files-api.md`
|
|
203
|
+
|
|
204
|
+
**Managed Agents (server-managed stateful agents with workspace):**
|
|
205
|
+
→ Read `shared/managed-agents-overview.md` + the rest of the `shared/managed-agents-*.md` files. For Python, TypeScript, Go, Ruby, PHP, and Java, read `{lang}/managed-agents/README.md` for code examples. For cURL, read `curl/managed-agents.md`. **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. The Anthropic CLI (`ant`) is one convenient way to create agents and environments from version-controlled YAML — see `shared/anthropic-cli.md`. If a binding you need isn't shown in the language README, WebFetch the relevant entry from `shared/live-sources.md` rather than guess. C# has beta Managed Agents support — see `csharp/claude-api/README.md` for details, or `curl/managed-agents.md` for raw HTTP reference.
|
|
206
|
+
|
|
207
|
+
### Claude API (Full File Reference)
|
|
208
|
+
|
|
209
|
+
Read the **language-specific Claude API source** — `{language}/claude-api/` for every SDK language, `curl/examples.md` for cURL:
|
|
210
|
+
|
|
211
|
+
1. **`{language}/claude-api/README.md`** — **Read this first.** Installation, quick start, common patterns, error handling.
|
|
212
|
+
2. **`shared/tool-use-concepts.md`** — Read when the user needs function calling, code execution, memory, or structured outputs. Covers conceptual foundations.
|
|
213
|
+
3. **`shared/agent-design.md`** — Read when designing an agent: bash vs. dedicated tools, programmatic tool calling, tool search/skills, context editing vs. compaction vs. memory, caching principles.
|
|
214
|
+
4. **`{language}/claude-api/tool-use.md`** — Read for language-specific tool use code examples (tool runner, manual loop, code execution, memory, structured outputs).
|
|
215
|
+
5. **`{language}/claude-api/streaming.md`** — Read when building chat UIs or interfaces that display responses incrementally.
|
|
216
|
+
6. **`{language}/claude-api/batches.md`** — Read when processing many requests offline (not latency-sensitive). Runs asynchronously at 50% cost.
|
|
217
|
+
7. **`{language}/claude-api/files-api.md`** — Read when sending the same file across multiple requests without re-uploading.
|
|
218
|
+
8. **`shared/prompt-caching.md`** — Read when adding or optimizing prompt caching. Covers prefix-stability design, breakpoint placement, and anti-patterns that silently invalidate cache.
|
|
219
|
+
9. **`shared/error-codes.md`** — Read when debugging HTTP errors or implementing error handling. Includes the per-SDK typed exception class table and the Go `errors.As` pattern.
|
|
220
|
+
10. **`shared/model-migration.md`** — Read when upgrading to newer models, replacing retired models, or translating `budget_tokens` / prefill patterns to the current API.
|
|
221
|
+
11. **`shared/live-sources.md`** — WebFetch URLs for fetching the latest official documentation.
|
|
222
|
+
|
|
223
|
+
Not every language has every file (e.g., Ruby has no `batches.md`); if a file is absent, that feature's example is not yet documented for that language.
|
|
224
|
+
|
|
225
|
+
> **Note:** For the Managed Agents file reference, see the `## Managed Agents (Beta)` section above — it lists every `shared/managed-agents-*.md` file and the language-specific READMEs.
|
|
226
|
+
|
|
227
|
+
## When to Use WebFetch
|
|
228
|
+
|
|
229
|
+
Use WebFetch to get the latest documentation when:
|
|
230
|
+
|
|
231
|
+
- User asks for "latest" or "current" information
|
|
232
|
+
- Cached data seems incorrect
|
|
233
|
+
- User asks about features not covered here
|
|
234
|
+
|
|
235
|
+
Live documentation URLs are in `shared/live-sources.md`.
|