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.00025 | $0.00764 |
| Opus 5 | $0.00013 | $0.00382 |
| Sonnet 5 | $0.00005 | $0.00153 |
| Haiku 4.5 | $0.00003 | $0.00076 |
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 today.
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 — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Anthropic API Client AI Skill Guide
Overview & Engine Architecture
The Anthropic SDK talks to the Messages API for Claude models. Requests include model, max_tokens, optional system, and alternating user/assistant messages; tool use returns tool_use blocks the client must execute and continue with tool_result. Agents pin model ids, always set max_tokens, stream when UX needs tokens early, and keep tools allowlisted.
messages.create
-> content blocks (text / tool_use)
-> client executes tools
-> messages continues with tool_result
When to use this skill
- Direct Claude integrations in apps/backends
- Tool-calling workflows with strict schemas
- Streaming assistants and batch analysis jobs
Operational directives
- Use
ANTHROPIC_API_KEYfrom the environment only. - Always pass
max_tokens; do not rely on implicit defaults for prod. - Put durable instructions in
system; keep user turns free of secret keys. - On
tool_use, execute only allowlisted tools with validated input. - Record
message.id/ usage for debugging and cost attribution.
Messages example
import os
from anthropic import Anthropic
client = Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
msg = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=512,
system="Answer briefly. If context is missing, say what you need.",
messages=[
{"role": "user", "content": "Give two risks of skipping data validation in ETL."},
],
)
for block in msg.content:
if block.type == "text":
print(block.text)
print(msg.usage)
Streaming
with client.messages.stream(
model="claude-sonnet-4-20250514",
max_tokens=256,
messages=[{"role": "user", "content": "Outline a dbt testing plan."}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
Common failures
| Symptom | Cause | Fix |
|---|---|---|
| 401/403 | key/permission | check env + workspace |
| stop_reason=max_tokens | cap too low | raise max_tokens |
| Tool loop errors | missing tool_result | continue conversation correctly |
| High latency | huge context | trim; cache prompts when available |
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.
- today Changed · -3 tokens per session c90c89af5b8a
- 6d 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 (1 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 764 once invoked, about $0.0001 per session on Opus 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.
Other skills, from other repositories
python-api
Professional Python API Expert skill. Build performant, secure, and scalable backend logic and RESTful or GraphQL APIs.
api-rate-limit-handler
Implement bounded, idempotency-aware API throttling, backoff, and retry handling for 429 and transient 5xx responses.
api-endpoint-builder-v2
API Endpoint Builder workflow skill. Use this skill when the user needs Builds production-ready REST API endpoints with validation, error handling, authentication, and documentation. Follows best practices for security and scalability and the operator should preserve the upstream workflow, copied support files, and…
api-endpoint-builder
API Endpoint Builder workflow skill. Use this skill when the user needs Builds production-ready REST API endpoints with validation, error handling, authentication, and documentation. Follows best practices for security and scalability and the operator should preserve the upstream workflow, copied support files, and…
laravel-api
Build production-ready RESTful APIs with Laravel. Covers authentication (Sanctum/Passport), versioning, resources, rate limiting, and API testing.
api-contract-tester
Implement consumer-driven contract testing with Pact to ensure API compatibility.