Agent skill · software engineering · aradotso

open-agent-sdk-typescript

open-agent-sdk-typescript — an agent skill for coding agents.

Why this skill is useful

Provides specific TypeScript SDK commands and patterns for integrating Claude-powered agents that the AI wouldn't reliably generate on its own.

What it needs

Requires npm installed locally. Requires codeany account access. About 5k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.

What this skill does

bash npm install @codeany/open-agent-sdk bash export CODEANYAPIKEY=your-api-key bash export CODEANYBASEURL=https://openrouter.ai/api export CODEANYAPIKEY=sk-or-... export CODEANYMODEL=anthropic/claude-sonnet-4 typescript import { query } from "@codeany/open-agent-sdk"; for await (const message of query({ prompt: "Read package.json and tell me the project name.", options: { allowedTools: ["Read", "Glob"], permissionMode: "bypassPermissions", }, })) { if (message.type === "assistant") { for (const block of message.message.content) { if ("text" in block) console.log(block.text); } } if (message.type === "result") { console.log(Cost: ${message.totalcostusd?.toFixed(4)}); } } typescript import { createAgent } from "@codeany/open-agent-sdk"; const agent = createAgent({ model: "claude-sonnet-4-6" }); const result = await agent.prompt("What files are in this project?"); console.log(result.text); console.log(Turns: ${result.numturns}); console.log(Tokens: ${result.usage.inputtokens + result.usage.outputtokens}); typescript import { createAgent } from "@codeany/open-agent-sdk"; const agent = createAgent({ maxTurns: 5 }); const r1 = await agent.prompt('Create a file /tmp/hello.txt with "Hello World"'); console.log(r1.text); const r2 = await agent.prompt("Read back the file you just created"); console.log(r2.text); console.log(Session messages: ${agent.getMessages().length}); await agent.close(); // persists session, closes MCP connections typescript import { z } from "zod"; import { query, tool, createSdkMcpServer } from "@codeany/open-agent-sdk"; const getWeather = tool( "getweather", "Get the temperature for a city", { city: z.string().describe("City name") }, async ({ city }) => ({ content: [{ type: "text", text: ${city}: 22°C, sunny }], }), ); const server = createSdkMcpServer({ name: "weather", tools: [getWeather] }); for await (const msg of query({ prompt: "What is the weather in Tokyo and London?", options: { mcpServers: { weather: server } }, })) { if (msg.type === "r …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aradotso/open-agent-sdk-typescript

View the source on GitHub

Browse the @skills marketplace