Claude starter module
Setup
Maps API keys, approved models, tool permissions, spending caps, and worker settings.
- Files
- 16
- Lines
- 666
- Languages
- Config + Markdown + TypeScript + JSON
Included files
This page lists paths and purposes, not source contents.
.env.example
Configuration required by this starter pack.
Config
23 lines
ADAPT.md
Give these instructions to the coding agent working in the buyer's Next.js project.
Markdown
133 lines
app/api/claude/ask/route.ts
POST /api/claude/ask returns one guarded Anthropic answer.
TypeScript
6 lines
app/api/claude/batch/route.ts
POST /api/claude/batch submits a guarded batch; GET polls and processes ended results.
TypeScript
7 lines
app/api/claude/stream/route.ts
POST /api/claude/stream returns one guarded Anthropic text stream.
TypeScript
6 lines
app/api/claude/tools/route.ts
POST /api/claude/tools executes one guarded Anthropic tool loop.
TypeScript
6 lines
app/api/claude/verify/route.ts
GET /api/claude/verify reports missing settings and confirms Anthropic model access.
TypeScript
7 lines
app/chat/route.ts
A clickable chat page for trying the guarded Claude ask and streaming routes.
TypeScript
126 lines
app/usage/route.ts
GET /usage is a working usage page for the signed-in account.
TypeScript
7 lines
OPERATIONS.md
The code handles the machines.
Markdown
38 lines
package.json
Configuration required by this starter pack.
JSON
17 lines
README.md
This starter gives a Next.js App Router application a guarded server-side Anthropic integration: Claude requests with spending checks, streaming, tool calling, structured outputs, prompt caching, usage metering, asynchronous Message Batches, and a readable verification route.
Markdown
93 lines
src/setup/check-setup.ts
Checks Anthropic access, approved models, and optional modules without creating anything.
TypeScript
91 lines
starter.json
Configuration required by this starter pack.
JSON
6 lines
TROUBLESHOOTING.md
Find your symptom, apply the fix.
Markdown
85 lines
tsconfig.json
Configuration required by this starter pack.
JSON
15 lines
Questions about setup
Is this a Claude Next.js starter?
Yes. The pack is built for Next.js apps that use the Messages API, streamed responses, approved tools, prompt caching, controlled agent loops, and usage limits.