ekx-anthropic-sdklisted
Install: claude install-skill Ekinoxis-evm/claude-skills
# Anthropic SDK
Claude is the default model at Ekinoxis. `@anthropic-ai/sdk` direct in most apps;
`@ai-sdk/anthropic` where the Vercel AI SDK is already in play.
**The bundled `claude-api` skill is authoritative** for model ids, pricing and
parameters — read it before answering anything about models or cost, rather than
relying on memory.
The one exception in the portfolio: an older agent app uses LangChain + OpenAI, inherited
from the Coinbase AgentKit starter ([`../ekx-coinbase-cdp/SKILL.md`](../ekx-coinbase-cdp/SKILL.md)).
---
## Environment
```bash
ANTHROPIC_API_KEY= # SECRET — server only, never NEXT_PUBLIC_
ANTHROPIC_MODEL= # pin the model in env so it can change without a deploy
```
**Never call the API from the browser.** A key in the client bundle is a metered,
billable secret handed to anyone who opens devtools. Always proxy through a route handler.
---
## Tool use — the pattern that matters
The reference shape: the user asks about P&L in plain language,
Claude calls tools that query Supabase, and answers from real rows.
```ts
const tools = [{
name: "get_positions",
description: "Fetch the user's open positions with entry price and current value.",
input_schema: {
type: "object",
properties: { chain: { type: "string", enum: ["evm", "solana", "xrpl"] } },
required: [],
},
}];
let messages = [{ role: "user", content: prompt }];
while (true) {
const res = await anthropic.messages.create({
model: process.env.ANTHROPIC_M