anthropic-sdk-typescript is a TypeScript and JavaScript library for calling the Claude API from server-side applications and supported runtimes. It is used by developers building software that sends requests to Anthropic's language models.
Borrowing it
Nothing to install: this file belongs to anthropics/anthropic-sdk-typescript. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/anthropics/anthropic-sdk-typescript/main/CLAUDE.mdgit clone --depth 1 https://github.com/anthropics/anthropic-sdk-typescriptWrote 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/instructions/anthropics/anthropic-sdk-typescript/claude-md)<a href="https://agentmods.dev/instructions/anthropics/anthropic-sdk-typescript/claude-md"><img src="https://agentmods.dev/badge/instructions/anthropics/anthropic-sdk-typescript/claude-md/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/instructions/anthropics/anthropic-sdk-typescript/claude-md"><img src="https://agentmods.dev/badge/instructions/anthropics/anthropic-sdk-typescript/claude-md.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.08370 | $0.08370 |
| Opus 5.5 | $0.03348 | $0.03348 |
| Sonnet 5.5 | $0.01674 | $0.01674 |
| Haiku 4.5 | $0.00837 | $0.00837 |
Grade A, and why
anthropic-sdk-typescript CLAUDE.md 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 — 345 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Working in this repository
Context for contributors (human or AI) on how this repository is put together, plus the things reviews most often come back to.
This repository's own rules
The generator writes the rest of this file. Rules about this repository's hand-written code go in this section, and a change anywhere else in the file belongs in the generator.
Overview
- The official TypeScript SDK for the Claude API (
@anthropic-ai/sdk). Hand-written helpers, streams, tool runners, credentials, and middleware sit on top of the generated code. The platform clients live inpackages/{aws,bedrock,foundry,google-cloud,vertex}-sdkand are released as separate packages. src/helpers/andsrc/tools/are hand-written, likesrc/lib/andexamples/. The generator never touches them.packages/is hand-written too, except for each package'spackage.jsonand build files:build,tsc-multi.json, thetsconfig*.jsonfiles,vitest.config.mts, andtests/vitest-globals.d.ts.stream(),parse(), andtoolRunner()insrc/resources/beta/messages/messages.tsare hand-written.- Each package has its own
CHANGELOG.md, so a PR adds its line to the changelog of the package it changes. - Describe a public type change in its doc comment and in its changelog line.
Build, test, lint
- The repository is a single pnpm workspace (
pnpm-workspace.yaml). Only the rootpackage.jsonpinspackageManager. ./scripts/testruns vitest at the root and then in each platform package. Extra arguments go to the root run only, so./scripts/test tests/lib/parser.test.tsnarrows that run and the platform packages' suites still follow.- Tests talk to the mock server, a mocked
fetch, or recorded fixtures. Tests that do call a real endpoint, such aspackages/google-cloud-sdk/tests/live.test.ts, are skipped unlessANTHROPIC_LIVE=1is set. pnpm test:ecosystemrunsecosystem-tests/cli.mtsagainst real runtimes and bundlers, including Deno, Bun, Cloudflare Workers, edge, browsers, and TypeScript 5.0. Mark a projectknownFailureonly when its fix is already tracked.toolUseBlockis kept as a@deprecatedalias fortoolUse.unrestrictedPathson the environment worker throws when it's passed, because its old behavior can't be honored at all.zodis an optional peer dependency, because callers pass their own zod schemas to the helpers, so the SDK has to use the caller's copy of the library.
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 · +46 lines · +1,163 tokens per session b164e8d3f052
- yesterday Changed · +177 tokens per session 6e88eabb0e28
- 13d ago Changed · -4 tokens per session 3c9058400775
- 15d ago Changed · +2 lines · +214 tokens per session 53e567176b7d
- 16d ago Changed · +18 tokens per session 2d33e9b96e16
- 22d ago Changed · +32 lines · +678 tokens per session 0602f79ba427
- 27d ago Changed · -1 lines · -38 tokens per session 78efc999ab13
- 28d ago Changed · +143 lines · +1,562 tokens per session 2d337e54a914
- 1mo ago Changed · +113 lines · +4,356 tokens per session 4d66a085cefc
- 2mo ago First seen · 10 lines · 244 tokens per session scan A bf92f764928a
anthropic-sdk-typescript CLAUDE.md is an instructions file published in the GitHub repository anthropics/anthropic-sdk-typescript (2,165 stars, last pushed yesterday), licensed Apache-2.0. It adds 8,370 tokens to every session, about $0.0335 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-08-30.
anthropic-sdk-typescript CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| anthropic-sdk-typescript CLAUDE.mdanthropics/anthropic-sdk-typescript | Instructions file | 2.2k | yesterday | Apache-2.0 | A | 8,370 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |