claude-api-patterns

claude-api-patterns is a skill for Claude Code, Codex from PIXARTSeu/Synapse. It costs 113 tokens per session (4,400 once invoked), scanned A, original, no licence file.

A guide to building software that calls Anthropic’s Claude AI through its official programming library. It covers model choice, streaming responses, prompt caching, tool use, structured output, images, batch requests, retries, and cost control.

In plain words
What is it for?
Use it to add Claude features to Next.js route handlers or server actions and configure requests, responses, retries, and spending limits.
Why use it?
It helps developers handle the practical details of connecting an application to Claude reliably.

Skill for Claude CodeCodex

Which agent this was written for is unclear — body not stored (licence); the path alone says nothing.

Good fit Use it to add Claude features to Next.js route handlers or server actions and configure requests, responses, retries, and spending limits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pixartseu/synapse/claude-api-patterns
Install

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.

Any agent
npx skills add PIXARTSeu/Synapse --skill claude-api-patterns
Clone the repo
git clone --depth 1 https://github.com/PIXARTSeu/Synapse

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for claude-api-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/pixartseu/synapse/claude-api-patterns/github.svg)](https://agentmods.dev/skills/pixartseu/synapse/claude-api-patterns)
Your own site
<a href="https://agentmods.dev/skills/pixartseu/synapse/claude-api-patterns"><img src="https://agentmods.dev/badge/skills/pixartseu/synapse/claude-api-patterns/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.

agentmods 80×15 button for claude-api-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/pixartseu/synapse/claude-api-patterns"><img src="https://agentmods.dev/badge/skills/pixartseu/synapse/claude-api-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,400 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.04400
Opus 5 $0.00056 $0.02200
Sonnet 5 $0.00023 $0.00880
Haiku 4.5 $0.00011 $0.00440

Measured 7d ago against content hash 02998dfdf869, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

claude-api-patterns 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 7d 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.

packages/codegraph/data/skill/claude-api-patterns/SKILL.md · 490 lines

The source is not reproduced here

A licence we could not identify

The repository carries a LICENSE file, but it is custom or dual enough that GitHub cannot name it and neither can this catalogue. Unknown terms are not permission, so the body is not copied here. Read the licence at the source and decide for yourself.

Read it on GitHub

Files

What ships with it

1 file 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.

Changes

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.

  1. 7d ago First seen · 490 lines · 113 tokens per session scan A 02998dfdf869

Subscribe to this mod's changes

claude-api-patterns is a skill published in the GitHub repository PIXARTSeu/Synapse (9 stars, last pushed 15d ago), with no licence file. It adds 113 tokens to every session and 4,400 once invoked, about $0.0006 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-03.

Related

Other skills, from other repositories

cost-aware-llm-pipeline

A planning guide for choosing language models and managing the amount of conversation context used by an AI coding workflow. It groups tasks by complexity and gives rules for avoiding context overflow during long sessions.

hashgraph-online/awesome-codex-plugins · 42 tokens

llm-patterns

AI-first application patterns, LLM testing, prompt management.

alinaqi/maggy · 16 tokens

prompt-engineering

Universal prompt engineering techniques for any LLM. Use when crafting, optimizing, or reviewing prompts for AI models. Triggers on requests like "improve this prompt", "write a system prompt", "optimize my instructions", "help me prompt engineer", "audit this prompt", "review my prompt", or when building agentic…

CodeAlive-AI/ai-driven-development · 76 tokens

prompt-engineering

Use when one prompt must give the same right answer across reruns, models, and pasted-in hostile input: forcing a fixed schema, picking the few-shot set, ordering the prompt blocks, or the inline cases you run while tuning. NOT the agent loop, tools, or retrieval (that is building-agents), NOT a standing CI eval…

ericrisco/rsc-harness · 83 tokens

testing-for-system-prompt-leakage

Extract and defend system prompts plus embedded secrets and routing logic.

adriannoes/awesome-agentic-ai · 21 tokens

ai-wrapper-product-v2

AI Wrapper Product workflow skill. Use this skill when the user needs Expert in building products that wrap AI APIs (OpenAI, Anthropic, and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 55 tokens