agentleFS
DROOdotFOODROOdotFOO/agent-skills/skills/claude-api/SKILL.md

claude-api

Skill1 starsChanged 3 months agoMITView on GitHub

Build apps with the Claude API or Anthropic SDK. TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`/`claude_agent_sdk`, or user asks to use Claude API, Anthropic SDKs, or Agent SDK. DO NOT TRIGGER when: code imports `openai`/other AI SDK, general programming, or ML/data-science tasks.

59 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use web-artifacts-builder, algorithmic-art and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    web-artifacts-builder

    Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

    Also in 28 projects that use this

  • GoogleSkill

    algorithmic-art

    Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

    Also in 26 projects that use this

  • JetBrainsSkill

    doc-coauthoring

    Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

    Also in 27 projects that use this

  • JetBrainsSkill

    slack-gif-creator

    Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack.

    Also in 26 projects that use this

  • GoogleSkill

    internal-comms

    A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

    Also in 27 projects that use this

  • tpavanipradeepSkill

    documentation-lookup

    Use up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the user names a framework (e.g. React, Next.js, Prisma).

    Also in 3 projects that use this

  • +4 more from JetBrains

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 56 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use Claude Opus 4.6 (claude-opus-4-6) unless the user names a different model.

    line 42
  2. Very specific:

    If ambiguous, ask. If unsupported language, suggest curl/ examples.

    line 56
  3. Very specific:

    Use when user asks for "latest" info, cached data seems wrong, or features aren't covered here.

    line 89

“Common” is measured: kept by at least 6 in 10 of the 56 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Building LLM-Powered Applications with Claude

Choose the right surface, detect the project language, read the relevant docs.

What You Get

  • Language-detected SDK examples (Python, TypeScript, Go, Elixir, Rust, Lua, cURL)
  • Decision tree: single call vs workflow vs agent vs Agent SDK
  • Current model IDs, thinking/effort config, caching patterns
  • Tool use patterns (tool runner, manual loop, code execution)
  • Error taxonomy and live documentation URLs

Top Pitfalls (quick reference)

MistakeFix
Using budget_tokens on Opus 4.6 / Sonnet 4.6Use thinking: {type: "adaptive"} -- budget_tokens is deprecated
Lowballing max_tokensDefault ~16K non-streaming, ~64K streaming. Truncation = wasted retry
Prefilling assistant message on Opus 4.6Returns 400. Use structured outputs or system prompt instead
Silent cache invalidationCheck usage.cache_read_input_tokens. Common culprit: datetime.now() in system prompt
Redefining SDK typesUse Anthropic.MessageParam, Anthropic.Tool, etc. -- don't roll your own

Full list: shared/pitfalls.md

Defaults

Use Claude Opus 4.6 (claude-opus-4-6) unless the user names a different model. Use adaptive thinking (thinking: {type: "adaptive"}) for anything remotely complicated. Use streaming for long input/output -- .get_final_message() / .finalMessage() if you don't need individual events.

Language Detection

Infer from project files:

  • *.py, pyproject.toml, requirements.txt -> Python -- read from python/
  • *.ts, *.tsx, package.json, tsconfig.json -> TypeScript -- read from typescript/
  • *.js, *.jsx (no .ts present) -> TypeScript -- JS uses the same SDK
  • *.go, go.mod -> Go -- read from go/
  • *.ex, *.exs, mix.exs -> Elixir -- read from elixir/
  • *.rs, Cargo.toml -> Rust -- read from rust/
  • *.lua, .luarc.json -> Lua -- read from lua/

If ambiguous, ask. If unsupported language, suggest curl/ examples.

Which Surface?

Use CaseSurface
Single call (classify, summarize)Claude API
Multi-step pipeline, your toolsClaude API + tool use
Agent needing file/web/terminalAgent SDK
Custom agent, your own toolsClaude API agentic loop

Decision tree and "Should I Build an Agent?" criteria: shared/surfaces.md

Reading Guide

TaskRead
Single call (classify/summarize/extract){lang}/claude-api/README.md
Chat UI / streaming+ {lang}/claude-api/streaming.md
Long conversations (context overflow)+ Compaction section; details: shared/thinking-effort.md
Prompt caching / cache optimizationshared/prompt-caching.md + {lang}/claude-api/README.md
Tool use / function calling / agents+ shared/tool-use-concepts.md + {lang}/claude-api/tool-use.md
Batch processing+ {lang}/claude-api/batches.md
File uploads across requests+ {lang}/claude-api/files-api.md
Agent with built-in tools{lang}/agent-sdk/README.md + {lang}/agent-sdk/patterns.md
Model selection / capabilitiesshared/models.md
Thinking, effort, compactionshared/thinking-effort.md
Error handlingshared/error-codes.md

Go, Elixir, Rust, Lua, cURL: single file covers all basics. Read that plus shared/ files as needed.

When to Use WebFetch

Use when user asks for "latest" info, cached data seems wrong, or features aren't covered here. URLs: shared/live-sources.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.