Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add alivirgo/Major-AI-Skills --skill anthropic-apigit clone --depth 1 https://github.com/alivirgo/Major-AI-SkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alivirgo/major-ai-skills/anthropic-api)<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/anthropic-api"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/anthropic-api/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/anthropic-api"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/anthropic-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.02063 |
| Opus 5.5 | $0.00013 | $0.00825 |
| Sonnet 5.5 | $0.00007 | $0.00413 |
| Haiku 4.5 | $0.00003 | $0.00206 |
Grade A, and why
anthropic-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Anthropic API Client AI Skill Guide (Claude)
Overview & Engine Architecture
The Anthropic SDK talks to the Messages API (messages.create / stream). Requests require model and max_tokens; optional system, alternating user/assistant turns, tools, and cache_control breakpoints. Tool use returns tool_use content blocks; the client must execute allowlisted tools and continue with tool_result. Prompt caching prefixes follow tools → system → messages. Pin current model ids (verify deprecations); never invent keys.
┌─────────────────────────────────────────────────────────────┐
│ Anthropic Messages runtime │
│ │
│ messages.create / messages.stream │
│ ├── system (+ optional cache_control) │
│ ├── tools[] (cache breakpoint on last tool) │
│ └── messages[] (user / assistant / tool_result) │
│ │
│ Response │
│ ├── content blocks: text | tool_use | ... │
│ ├── stop_reason: end_turn | tool_use | max_tokens | ... │
│ └── usage: input/output + cache_creation/read tokens │
└─────────────────────────────────────────────────────────────┘
When to use / when not to
Use when
- Direct Claude integrations in backends, CLIs, and workers.
- Tool-calling assistants with JSON Schema tool definitions.
- Streaming UX or long stable system/tool prefixes that benefit from prompt caching.
Do not use when
- OpenAI-only stack is mandated →
@openai-api. - Full RAG ingestion product →
@llamaindex(still use this skill for Claude calls). - User wants unrestricted computer/shell tools without review → refuse; allowlist + human approval.
Operational Capabilities & Agent Directives
ANTHROPIC_API_KEYfrom environment only — never commit or hardcode.- Always set
max_tokensexplicitly for production; treatstop_reason=max_tokensas a bug until raised or input trimmed. - Pin model ids (e.g.
claude-sonnet-4-6for balanced prod;claude-haiku-4-5for high-volume). Check deprecation tables before copying old tutorial ids (claude-sonnet-4-5EOL paths exist). - System vs user: durable instructions in
system; never put secrets in user turns that get logged. - Tool loop correctness: on
tool_use, execute only allowlisted tools with schema-validated input; appendtool_resultand continue untilend_turn. - Prompt caching: place
cache_control: {"type": "ephemeral"}on the last tool and/or large system blocks; confirm hits viacache_read_input_tokens(short prompts below model minimum silently skip cache). - Record
message.id+ usage for cost and debugging; redact PII in logs.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +113 lines · +8 tokens per session 94df6031f342
- 2mo ago Changed · -3 tokens per session c90c89af5b8a
- 2mo ago First seen · 101 lines · 28 tokens per session scan A eecf326949f5
anthropic-api is a skill published in the GitHub repository alivirgo/Major-AI-Skills (6 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 2,063 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
anthropic-api compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| anthropic-apialivirgo/Major-AI-Skills | Skill | 6 | today | MIT | A | 33 | Claude Code |
| django-expertzacklecon/claude-skills | Skill | 3 | 1mo ago | MIT | A | 37 | Claude Code, Codex |
| fastapi-patternschandrudp29/skillhub | Skill | 14 | 5mo ago | MIT | A | 36 | Claude Code, Codex |
| fastapi-expertzacklecon/claude-skills | Skill | 3 | 1mo ago | MIT | A | 39 | Claude Code, Codex |
| django-patternsaffaan-m/ECC | Skill | 313k | 7d ago | MIT | A | 32 | Claude Code, Kiro |
| fastapi-patternsaffaan-m/ECC | Skill | 313k | 7d ago | MIT | A | 35 | Claude Code, Kiro |
| pydantic-models-pysickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 23 | Claude Code |