Agent skill · Backend & API

claude-api

Anthropic Messages API (Claude API) for integrations, streaming, prompt caching, tool use, vision. Use for chatbots, assistants, or encountering rate limits, 429 errors.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill claude-api-secondsky-claude-skills --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 13 KB
Bundled scripts: none
Version: 2.0.0
Path: skills/ai-llm/claude-api-secondsky-claude-skills/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Claude API (Anthropic Messages API) **Status**: Production Ready | **SDK**: @anthropic-ai/sdk@0.70.1 --- ## Quick Start (5 Minutes) ### Node.js ```typescript import Anthropic from '@anthropic-ai/sdk'; const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, }); const message = await client.messages.create({ model: 'claude-sonnet-4-5-20250929', max_tokens: 1024, messages: [ { role: 'user', content: 'Hello, Claude!' }, ], }); console.log(message.content[0].text); ``` ### Cloudflare Workers ```typescript const response = await fetch('https://api.anthropic.com/v1/messages', { method: 'POST', headers: { 'x-api-key': env.ANTHROPIC_API_KEY, 'anthropic-version': '2023-06-01', 'content-type': 'application/json', }, body: JSON.stringify({ model: 'claude-sonnet-4-5-20250929', max_tokens: 1024, messages: [{ role: 'user', content: 'Hello!' }], }), }); const data = await response.json(); console.log(data.content[0].text); ``` **Load `references/setup-guide.md` for complete setup with streaming, caching, and tools.** --- ## Critical Rules ### Always Do ✅ 1. **Use environment variables** for API keys (NEVER hardcode) 2. **Set max_tokens** explicitly (required parameter) 3. **Pin mod

What's inside
Steps it walks through
  1. Quick Start (5 Minutes)
  2. Node.js
  3. Cloudflare Workers
  4. Critical Rules
  5. Always Do ✅
  6. Never Do ❌
  7. Top 3 Errors (Prevent 80% of Issues)
  8. Error #1: Rate Limit 429
  9. Error #2: Prompt Caching Not Activating
  10. Error #3: Tool Use Response Format Errors
  11. Common Use Cases (Quick Patterns)
  12. Streaming Responses
  13. Prompt Caching (90% Cost Savings)
  14. Tool Use (Function Calling)
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the claude-api skill do?

Anthropic Messages API (Claude API) for integrations, streaming, prompt caching, tool use, vision. Use for chatbots, assistants, or encountering rate limits, 429 errors.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill claude-api-secondsky-claude-skills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going