docs/examples/claude-code-usage.md
The Claude Code provider allows you to use Claude models through the Claude Code CLI without requiring an API key.
To use the Claude Code provider, update your .taskmaster/config.json:
{
"models": {
"main": {
"provider": "claude-code",
"modelId": "sonnet",
"maxTokens": 64000,
"temperature": 0.2
},
"research": {
"provider": "claude-code",
"modelId": "opus",
"maxTokens": 32000,
"temperature": 0.1
},
"fallback": {
"provider": "claude-code",
"modelId": "sonnet",
"maxTokens": 64000,
"temperature": 0.2
}
}
}
opus - Claude Opus model (SWE score: 0.725)sonnet - Claude Sonnet model (SWE score: 0.727)Once configured, you can use Claude Code with all Task Master commands:
# Generate tasks from a PRD
task-master parse-prd --input=prd.txt
# Analyze project complexity
task-master analyze-complexity
# Show the next task to work on
task-master next
# View a specific task
task-master show task-001
# Update task status
task-master set-status --id=task-001 --status=in-progress
@anthropic-ai/claude-code package if you enable this provider:
npm install @anthropic-ai/claude-code
claude
The Claude Code SDK supports additional settings that provide fine-grained control over Claude's behavior. These settings are implemented in the underlying SDK (src/ai-providers/custom-sdk/claude-code/), and can be managed through Task Master's configuration file.
To update settings for Claude Code, update your .taskmaster/config.json:
The Claude Code settings can be specified globally in the claudeCode section of the config, or on a per-command basis in the commandSpecific section:
{
// "models" and "global" config...
"claudeCode": {
// Maximum conversation turns Claude can make in a single request
"maxTurns": 5,
// Custom system prompt to override Claude Code's default behavior
"customSystemPrompt": "You are a helpful assistant focused on code quality",
// Append additional content to the system prompt
"appendSystemPrompt": "Always follow coding best practices",
// Permission mode for file system operations
"permissionMode": "default", // Options: "default", "acceptEdits", "plan", "bypassPermissions"
// Explicitly allow only certain tools
"allowedTools": ["Read", "LS"], // Claude can only read files and list directories
// Explicitly disallow certain tools
"disallowedTools": ["Write", "Edit"], // Prevent Claude from modifying files
// MCP servers for additional tool integrations
"mcpServers": {
"mcp-server-name": {
"command": "npx",
"args": ["-y", "mcp-serve"],
"env": {
// ...
}
}
}
},
// Command-specific settings override global settings
"commandSpecific": {
"parse-prd": {
// Settings specific to the 'parse-prd' command
"maxTurns": 10,
"customSystemPrompt": "You are a task breakdown specialist"
},
"analyze-complexity": {
// Settings specific to the 'analyze-complexity' command
"maxTurns": 3,
"appendSystemPrompt": "Focus on identifying bottlenecks"
}
}
}
src/constants/commands.js