Skip to content
Agentmart
Submit a tool

claude-api

Build, debug, and optimize Claude API / Anthropic SDK applications.

Skill by wachawo

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/wachawo-claude-api

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Build, debug, and optimize Claude API / Anthropic SDK applications. Applications built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGERS when: code imports `anthropic`/`@anthropic-ai/sdk`; user asks about the Claude API, Anthropic SDK, or Managed Agents; user adds/modifies/tunes a Claude feature (caching, thinking, compaction, tool use, batch, files, citations, memory) or model (Opus/Sonnet/Haiku) in a file; questions about prompt caching / cache hit rate in an Anthropic SDK project. SKIP: file imports `openai`/another provider's SDK, filename like `*-openai.py`/`*-generic.py`, provider-neutral code, general programming/ML.

Use cases: backend, ml, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/claude-api

What's inside

Skill name
claude-api
Description
Build, debug, and optimize Claude API / Anthropic SDK applications. Applications built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGERS when: code imports `anthropic`/`@anthropic-ai/sdk`; user asks about the Claude API, Anthropic SDK, or Managed Agents; user adds/modifies/tunes a Claude feature (caching, thinking, compaction, tool use, batch, files, citations, memory) or model (Opus/Sonnet/Haiku) in a file; questions about prompt caching / cache hit rate in an Anthropic SDK project. SKIP: file imports `openai`/another provider's SDK, filename like `*-openai.py`/`*-generic.py`, provider-neutral code, general programming/ML.
License
MIT
Instructions
320 lines in SKILL.md · view on GitHub

Files (40)

  • SKILL.md
  • claude-api.md · csharp/
  • examples.md · curl/
  • managed-agents.md · curl/
  • claude-api.md · go/
  • README.md · go/managed-agents/
  • claude-api.md · java/
  • README.md · java/managed-agents/
  • claude-api.md · php/
  • README.md · php/managed-agents/
  • README.md · python/claude-api/
  • batches.md · python/claude-api/
  • files-api.md · python/claude-api/
  • streaming.md · python/claude-api/
  • tool-use.md · python/claude-api/
  • README.md · python/managed-agents/
  • claude-api.md · ruby/
  • README.md · ruby/managed-agents/
  • agent-design.md · shared/
  • error-codes.md · shared/
  • live-sources.md · shared/
  • managed-agents-api-reference.md · shared/
  • managed-agents-client-patterns.md · shared/
  • managed-agents-core.md · shared/
  • managed-agents-environments.md · shared/
  • managed-agents-events.md · shared/
  • managed-agents-memory.md · shared/
  • managed-agents-onboarding.md · shared/
  • managed-agents-overview.md · shared/
  • managed-agents-tools.md · shared/
  • model-migration.md · shared/
  • models.md · shared/
  • prompt-caching.md · shared/
  • tool-use-concepts.md · shared/
  • README.md · typescript/claude-api/
  • batches.md · typescript/claude-api/
  • files-api.md · typescript/claude-api/
  • streaming.md · typescript/claude-api/
  • tool-use.md · typescript/claude-api/
  • README.md · typescript/managed-agents/

SKILL.md (first lines)

# Building LLM Applications on Claude

This skill helps you build LLM applications on Claude. Pick the appropriate surface based on your needs, identify the project language, then read the corresponding language-specific documentation.

## Before You Start

Scan the target file (or, if there is no target file, the prompt and project) for markers of non-Anthropic providers — `import openai`, `from openai`, `langchain_openai`, `OpenAI(`, `gpt-4`, `gpt-5`, filenames like `agent-openai.py` or `*-generic.py`, or any explicit instruction to keep the code provider-neutral. If anything is found, 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.

## Output Requirement

When the user asks you to add, change, or implement a Claude feature, your code must call Claude through one of:

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

Never mix the two — do not reach for `requests`/`fetch` in a Python or TypeScript project just because it seems easier. Never fall back to OpenAI-compatible shims.

**Never guess SDK usage.** Function names, class names, namespaces, method signatures, and import paths must come from explicit documentation — either from the `{lang}/` files in this skill, the official SDK repositories, or the documentation links listed in `shared/live-sources.md`. If a needed binding is not explicitly documented in the skill files, WebFetch the corresponding SDK repository from `shared/live-sources.md` before writing code. Do not infer Ruby/Java/Go/PHP/C# APIs from cURL forms or another language's SDK.

## Defaults

Unless the user requests otherwise:

For the Claude model version, use Claude Opus 4.7, accessible via the exact model string `claude-opus-4-7`. By default, use adaptive thinking (`thinking: {type: "adaptive"}`) for anything even remotely complex. Finally, by default use streaming for any request that may involve long input, long output, or large `max_tokens` — this prevents request timeouts. Use the SDK's `.get_final_message()` / `.finalMessage()` helper to get the full response if you don't need to handle individual stream events.

---

## Subcommands

If the User Request at the bottom of this prompt is a bare subcommand string (no prose), inspect every **Subcommands** table in this document — including any in sections appended below — and follow the action from the Action column directly. This lets users invoke specific flows via `/claude-api <subcommand>`. If no table in the document matches, handle the request as ordinary prose.


---

## Language Detection

Before reading code examples, determine which language the user is working in:

1. **Look at project files** to infer the language:

   - `*.py`, `requirements.txt`, `pyproject.toml`, `setup.py`, `Pipfile` → **Python** — read from `python/`
   - `*.ts`, `*.tsx`, `package.json`, `tsconfig.json` → **TypeScript** — read from `typescript/`
   - `*.js`, `*.jsx` (no `.ts` files) → **TypeScript** — JS uses the same SDK, read from `typescript/`
   - `*.java`, `pom.xml`, `build.gradle` → **Java** — read from `java/`
   - `*.kt`, `*.kts`, `build.gradle.kts` → **Java** — Kotlin uses the Java SDK, read from `java/`
   - `*.scala`, `build.sbt` → **Java** — Scala uses the Java SDK, read from `java/`
   - `*.go`, `go.mod` → **Go** — read from `go/`
   - `*.rb`, `Gemfile` → **Ruby** — read from `ruby/`
   - `*.cs`, `*.csproj` → **C#** — read from `csharp/`
   - `*.php`, `composer.json` → **PHP** — read from `php/`

2. **If multiple languages are detected** (e.g., both Python and TypeScript files):

   - Check which language the current file or the user's question relates to
   - If still ambiguous, ask: "I detected both Python and TypeScript files. Which language are you using for the Claude API integration?"

3. **If the language cannot be inferred** (empty project, no source files, or unsupported language):

   - Use AskUserQuestion with options: Python, TypeScript, Java, Go, Ruby, cURL/raw HTTP, C#, PHP
   - If AskUserQuestion is unavailable, default to Python examples and note: "Showing Python examples. Let me know if you need a different language."

4. **If an unsupported language is detected** (Rust, Swift, C++, Elixir, etc.):

   - Offer cURL/raw HTTP examples from `curl/` and note that community SDKs may exist
   - Offer to show Python or TypeScript examples as reference implementations

5. **If the user wants cURL/raw HTTP examples**, read from `curl/`.

### Feature Support by Language

| Language   | Tool Runner | Managed Agents | Notes                                  |
| ---------- | ----------- | -------------- | -------------------------------------- |
| Python     | Yes (beta)  | Yes (beta)     | Full support — `@beta_tool` decorator  |
| TypeScript | Yes (beta)  | Yes (beta)     | Full support — `betaZodTool` + Zod     |
| Java       | Yes (beta)  | Yes (beta)     | Beta tool use with annotated classes   |
| Go         | Yes (beta)  | Yes (beta)     | `BetaToolRunner` in `toolrunner` package |
| Ruby       | Yes (beta)  | Yes (beta)     | `BaseTool` + `tool_runner` in beta     |
| C#         | No          | No             | Official SDK                           |
| PHP        | Yes (beta)  | Yes (beta)     | `BetaRunnableTool` + `toolRunner()`    |
| cURL       | N/A         | Yes (beta)     | Raw HTTP, no SDK features              |

> **Managed Agents code examples**: separate 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 conceptual files `shared/managed-agents-*.md`. **Agents are persistent — create once, reference by ID.** Save 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 is one convenient way to create agents and environments from version-controlled YAML — its URL is in `shared/live-sources.md`. If a needed binding is not shown in the README, WebFetch the corresponding entry from `shared/live-sources.md` rather than guessing. C# does not currently support Managed Agents; use raw cURL-style HTTP requests to the API.

---

## Which Surface to Use?

> **Start simple.** Default to the simplest level that meets your needs. Single API calls and workflows cover most cases — move to agents only when the task truly requires open-ended, model-driven exploration.

| Use Case                                                | Level           | Recommended surface       | Why                                                          |
| ------------------------------------------------------- | --------------- | ------------------------- | ------------------------------------------------------------ |
| Classification, summarization, extraction, Q&A          | Single LLM call | **Claude API**            | One request, one response                                    |
| Batch processing or embeddings                          | Single LLM call | **Claude API**            | Specialized endpoints                                        |
| Multi-step pipelines with code-controlled logic         | Workflow        | **Claude API + tool use** | You orchestrate the loop                                     |
| Custom agent with your own tools                        | Agent           | **Claude API + tool use** | Maximum flexibility                                          |
| Server-managed stateful agent with workspace            | Agent           | **Managed Agents**        | Anthropic runs the loop and hosts a sandbox for tool execution |
| Persistent, versionable agent configs                   | Agent           | **Managed Agents**        | Agents are stored objects; sessions are pinned to a version  |
| Long-running multi-step agent with file mounts          | Agent           | **Managed Agents**        | Per-session containers, SSE event stream, Skills + MCP       |

> **Note:** Managed Agents is the right choice when you want Anthropic to run the agent loop *and* host the container in which tools execute — file ops, bash, code execution all run in a per-session workspace. If you want to host the compute yourself or run your own custom tool runtime, the right choice is Claude API + tool use — use the tool runner for automatic loop handling or a manual loop for fine-grained control (approval gates, custom logging, conditional execution).

> **Third-party providers (Amazon Bedrock, Google Vertex AI, Microsoft Foundry):** Managed Agents are **not available** on Bedrock, Vertex, or Foundry. If you deploy through any third-party provider, use **Claude API + tool use** for all use cases — including those for which Managed Agents would otherwise be the recommended surface.

### Decision Tree

```
What does your application need?

0. Are you deploying through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry?
   └── Yes → Claude API (+ tool use for agents) — Managed Agents is 1P only.
   No → continue.

1. Single LLM call (classification, summarization, extraction, Q&A)
   └── Claude API — one request, one response

2. Want Anthropic to run the agent loop and host a per-session container
   where Claude executes tools (bash, file ops, code)?
   └── Yes → Managed Agents — server-managed sessions, persistent agent configs,
       SSE event stream, Skills + MCP, file mounts.

From wachawo/claude-skills, MIT.

More from wachawo/claude-skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
May 5, 2026 (5 months ago)
Last release
May 5, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from wachawo

Cite this page

claude-api skill. Agent Mart. https://agentmart.dev/skills/wachawo-claude-api (last updated 2026-10-24)