anthropic-claude
Build production integrations with Anthropic Claude (Claude 4.5 Sonnet, Claude Opus 4, Claude Haiku 4) via the Messages API — system prompts, multi-turn…
Skill by SwapnilPopat
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/swapnilpopat-anthropic-claude
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.
About
Use cases: backend, agent-building
Reviews
Write a reviewNo 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/anthropic-claude
What's inside
- Skill name
anthropic-claude- Description
- Build production integrations with Anthropic Claude (Claude 4.5 Sonnet, Claude Opus 4, Claude Haiku 4) via the Messages API — system prompts, multi-turn conversations, tool use (function calling), prompt caching, extended thinking, vision, batched requests, and streaming. Use when wiring Claude into backends, agentic workflows, or evaluating it against other foundation models. Requires ANTHROPIC_API_KEY.
- License
- MIT
- Instructions
- 193 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Anthropic Claude
Integrate Claude models with first-class patterns for tool use, prompt caching, extended thinking, streaming, and safe production operation.
## Stack Baseline (2026)
| Concern | Choice | Notes |
|---|---|---|
| Default model | `claude-sonnet-4-5` | Best balance of cost / capability for most workloads |
| Frontier model | `claude-opus-4` | Long-horizon agents, complex reasoning |
| Cheap/fast | `claude-haiku-4` | Classification, routing, high-throughput |
| Endpoint | `POST /v1/messages` | Stateless; you supply the conversation each call |
| API version header | `anthropic-version: 2023-06-01` | Required on every request |
| SDKs | `@anthropic-ai/sdk` ≥0.40 (Node), `anthropic` ≥0.40 (Python) | First-party; typed |
| Auth | `x-api-key: $ANTHROPIC_API_KEY` | Workspace-scoped key recommended |
| Tool use | `tools: [...]` + `tool_choice` | Multi-turn; client executes & returns `tool_result` |
| Prompt caching | `cache_control: {type: "ephemeral"}` on stable prefix | 5 min TTL; up to 90% input cost reduction |
| Extended thinking | `thinking: {type: "enabled", budget_tokens: 16000}` | Visible reasoning trace; opus/sonnet only |
| Vision | Image blocks (`image/jpeg`, `png`, `gif`, `webp`) up to 5 MB / 8000×8000 | Base64 or URL |
| Streaming | `stream: true` SSE | Lower TTFT for chat UX |
| Batches | `POST /v1/messages/batches` | 50% cost discount, 24 h SLA |
| Rate limits | Per-org RPM/TPM tiers | Honor `retry-after` header |
| Safety | Built-in safety; you must still validate tool inputs and outputs | |
## When to Use
- Adding LLM features (chat, summarization, extraction, classification) to a backend.
- Building an agent loop that calls tools (search, code exec, internal APIs).
- Cost optimization via prompt caching of large system prompts / docs.
- Bulk document/data processing via the Batches API.
- Evaluating Claude head-to-head with OpenAI/Gemini for a specific task.
## Prerequisites
- `ANTHROPIC_API_KEY` exported (workspace-scoped, never in client bundles).
- Decision on which model tier (Haiku / Sonnet / Opus) and whether streaming is needed.
- Tool schemas defined as JSON Schema if using tool use.
- Logging + redaction strategy for prompts/responses (PII handling).
- Token budget and per-request cost ceiling agreed.
## Instructions
1. **Basic Messages call** (stateless; you pass full history each time):
```python
from anthropic import Anthropic
client = Anthropic() # reads ANTHROPIC_API_KEY
resp = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
system="You are a precise technical writer. Cite sources inline.",
messages=[
{"role": "user", "content": "Summarize the SLSA v1.0 provenance spec in 5 bullets."},
],
)
print(resp.content[0].text)
print(resp.usage) # input_tokens, output_tokens, cache_*_tokens
```
2. **Streaming** for chat UX (lowest TTFT):
```python
with client.messages.stream(
model="claude-sonnet-4-5",
max_tokens=2048,
messages=[{"role": "user", "content": "Explain mTLS in one paragraph."}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
final = stream.get_final_message()
```
3. **Tool use** (function calling) — model proposes a tool call; you execute and return `tool_result`:
```python
tools = [{
"name": "get_weather",
"description": "Current weather for a city.",
"input_schema": {
"type": "object",
"properties": {"city": {"type": "string"}, "unit": {"type": "string", "enum": ["c", "f"]}},
"required": ["city"],
},
}]
messages = [{"role": "user", "content": "What's the weather in Berlin in C?"}]
while True:
resp = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
tools=tools,
messages=messages,
)
if resp.stop_reason != "tool_use":
print(next(b.text for b in resp.content if b.type == "text"))
break
# Execute every tool_use block the model emitted
tool_results = []
for block in resp.content:
if block.type == "tool_use":
result = run_tool(block.name, block.input) # your implementation
tool_results.append({
"type": "tool_result",
"tool_use_id": block.id,
"content": result,
})
messages.append({"role": "assistant", "content": resp.content})
messages.append({"role": "user", "content": tool_results})
```
4. **Prompt caching** for stable, large prefixes (system prompt, docs, tool defs). Mark the *last* block of the cacheable prefix:
```python
resp = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
system=[
{"type": "text", "text": LARGE_STYLE_GUIDE,
"cache_control": {"type": "ephemeral"}},
],
messages=[{"role": "user", "content": user_q}],
)
# resp.usage.cache_creation_input_tokens / cache_read_input_tokens
```
Cache hits cost ~10% of normal input tokens; misses cost ~125%. Worth it when prefix is reused >2×.From SwapnilPopat/ai-assistant-skills, MIT.
More from SwapnilPopat/ai-assistant-skills
- 0.497score
fitness-function-design
SwapnilPopat
Design executable architectural fitness functions per quality attribute.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
netlify-deploy
SwapnilPopat
Deploy static sites, framework apps (Next.js, Astro, Remix, SvelteKit, Nuxt), Edge Functions, and serverless Functions to Netlify with deploy previews, branch…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
openai-transcribe
SwapnilPopat
Transcribe audio with OpenAI speech-to-text models (gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper-1) using prompt-guided terminology, segment-level…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
render-deploy
SwapnilPopat
Deploy Web Services, Private Services, Background Workers, Cron Jobs, Static Sites, PostgreSQL, and Key-Value (Redis-compatible) on Render via Blueprints…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
sentry-observability
SwapnilPopat
Operate Sentry end-to-end — error monitoring, performance tracing, session replay, profiling, release health, source-map upload, ownership routing, alert…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architect-review
SwapnilPopat
Conduct a rigorous architecture review covering scope, drivers, quality attributes, risks, decisions, and action items.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architecture-anti-patterns
SwapnilPopat
Detect and remediate architecture anti-patterns - Big Ball of Mud, Distributed Monolith, Golden Hammer, Vendor Lock-in, Premature Microservices, Lava Flow…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
dependency-governance
SwapnilPopat
Govern third-party and OSS dependencies via SBOM, SLSA, OpenSSF Scorecard, and license policy.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
cloudflare-deploy
SwapnilPopat
Deploy Cloudflare Workers, Pages, and Workers-with-static-assets safely using Wrangler 4.x with versioned uploads, gradual deployments, preview/production…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architecture-patterns-catalog
SwapnilPopat
Select the right macro-architecture pattern by mapping drivers (scale, change rate, team topology, NFRs) to a curated 2026 catalog covering layered…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architecture-review-facilitation
SwapnilPopat
Facilitate effective architecture reviews using ATAM-lite, structured agendas, decision logs, and clear action items.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
interview-prep
SwapnilPopat
Prepare for system-design interviews using a repeatable framework - requirements clarification, capacity estimation, API and data design, deep dives, and…
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 1, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from SwapnilPopat
- 0.497score
netlify-deploy
SwapnilPopat
Deploy static sites, framework apps (Next.js, Astro, Remix, SvelteKit, Nuxt), Edge Functions, and serverless Functions to Netlify with deploy previews, branch…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
openai-transcribe
SwapnilPopat
Transcribe audio with OpenAI speech-to-text models (gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper-1) using prompt-guided terminology, segment-level…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
render-deploy
SwapnilPopat
Deploy Web Services, Private Services, Background Workers, Cron Jobs, Static Sites, PostgreSQL, and Key-Value (Redis-compatible) on Render via Blueprints…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
sentry-observability
SwapnilPopat
Operate Sentry end-to-end — error monitoring, performance tracing, session replay, profiling, release health, source-map upload, ownership routing, alert…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architect-review
SwapnilPopat
Conduct a rigorous architecture review covering scope, drivers, quality attributes, risks, decisions, and action items.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
cloudflare-deploy
SwapnilPopat
Deploy Cloudflare Workers, Pages, and Workers-with-static-assets safely using Wrangler 4.x with versioned uploads, gradual deployments, preview/production…
SkillCFreshness: C★ 1Claude Code +9
Cite this page
anthropic-claude skill. Agent Mart. https://agentmart.dev/skills/swapnilpopat-anthropic-claude (last updated 2026-10-24)