AskClaudeSkill

View as MarkdownOpen in Claude

Send prompts to Anthropic’s Claude AI for complex reasoning, analysis, or sub-tasks that benefit from a dedicated AI query.

Class: AskClaudeSkill

Tools: ask_claude

Env vars: ANTHROPIC_API_KEY

api_key
stringRequired

Anthropic API key. The handler reads the ANTHROPIC_API_KEY environment variable at request time; a config value is not used as a fallback.

model
stringDefaults to claude-sonnet-4-5-20250929

The Claude model to use.

max_tokens
numberDefaults to 1024

Maximum tokens in the response.

import { AgentBase, AskClaudeSkill } from '@signalwire/sdk';
const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.setPromptText('You are a helpful assistant.');
await agent.addSkill(new AskClaudeSkill({
model: 'claude-sonnet-4-5-20250929',
max_tokens: 2048,
}));
agent.run();