.claude/skills/extended-thinking/SKILL.md
Extended thinking (ultrathink) configuration for Claude API. Activate for complex reasoning tasks, deep analysis, multi-step problem solving, and tasks requiring careful deliberation. Enables Claude's internal reasoning with configurable thinking budgets.
npx skillsauth add markus41/claude extended-thinkingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Enable Claude's extended thinking capabilities for complex reasoning tasks that benefit from internal deliberation before responding.
| Model | Extended Thinking | Summarized Thinking | |-------|------------------|---------------------| | Claude Opus 4.5 | ✓ Full | - | | Claude Opus 4.1 | ✓ Full | - | | Claude Opus 4 | ✓ | ✓ Summarized | | Claude Sonnet 4.5 | ✓ Full | - | | Claude Sonnet 4 | ✓ | ✓ Summarized | | Claude Haiku 4.5 | ✓ Full | - |
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=16000,
thinking={
"type": "enabled",
"budget_tokens": 10000 # Minimum 1,024
},
messages=[{
"role": "user",
"content": "Analyze this complex architecture decision..."
}]
)
# Access thinking and response
for block in response.content:
if block.type == "thinking":
print(f"Thinking: {block.thinking}")
elif block.type == "text":
print(f"Response: {block.text}")
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const response = await client.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 16000,
thinking: {
type: "enabled",
budget_tokens: 10000,
},
messages: [
{
role: "user",
content: "Analyze this complex architecture decision...",
},
],
});
with client.messages.stream(
model="claude-sonnet-4-20250514",
max_tokens=32000,
thinking={
"type": "enabled",
"budget_tokens": 20000
},
messages=[{"role": "user", "content": prompt}]
) as stream:
for event in stream:
if event.type == "content_block_delta":
if hasattr(event.delta, "thinking"):
print(event.delta.thinking, end="", flush=True)
elif hasattr(event.delta, "text"):
print(event.delta.text, end="", flush=True)
| Task Complexity | Budget Tokens | Use Case | |-----------------|---------------|----------| | Light | 1,024 - 4,000 | Simple clarifications, basic analysis | | Medium | 4,000 - 10,000 | Code review, debugging, design decisions | | Heavy | 10,000 - 20,000 | Architecture planning, security audits | | Complex | 20,000 - 32,000 | Multi-system analysis, comprehensive reviews | | Maximum | 32,000+ | Use batch API for budgets exceeding 32k |
CRITICAL: When using tools with extended thinking, you MUST preserve thinking blocks in the conversation history.
# Initial request with thinking
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=16000,
thinking={"type": "enabled", "budget_tokens": 8000},
tools=[{
"name": "analyze_code",
"description": "Analyze code for issues",
"input_schema": {
"type": "object",
"properties": {"code": {"type": "string"}},
"required": ["code"]
}
}],
messages=[{"role": "user", "content": "Analyze this code..."}]
)
# MUST include ALL content blocks including thinking
tool_use_block = next(b for b in response.content if b.type == "tool_use")
tool_result = execute_tool(tool_use_block)
# Continue with thinking blocks preserved
follow_up = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=16000,
thinking={"type": "enabled", "budget_tokens": 8000},
tools=[...],
messages=[
{"role": "user", "content": "Analyze this code..."},
{"role": "assistant", "content": response.content}, # Includes thinking!
{"role": "user", "content": [{
"type": "tool_result",
"tool_use_id": tool_use_block.id,
"content": tool_result
}]}
]
)
For Claude 4 models, use interleaved thinking for thinking between tool calls:
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=16000,
thinking={"type": "enabled", "budget_tokens": 10000},
betas=["interleaved-thinking-2025-05-14"], # Required for Claude 4
messages=[...]
)
thinking_tokens in response usageWhen using Claude Code CLI with extended thinking models:
# The CLI automatically handles extended thinking for supported models
# Use opus or sonnet models for complex tasks
claude --model claude-opus-4-5-20250514 "Analyze this codebase architecture"
development
Enhanced plan-authoring skill with Pre-Writing context gathering, task metadata, non-TDD templates, Red Flags, telemetry, and an automated plan linter. Use when you have a spec or requirements for a multi-step task, before touching code.
tools
Documentation intelligence engine with graph-based API docs, algorithm library, and drift detection
tools
Ultraplan cloud planning — kick off a plan in the cloud from your terminal, review and revise in the browser, then execute remotely or send back to CLI
tools
--- name: mcp description: Configure MCP servers for Claude Code — stdio vs HTTP, authentication, Tools/Resources/Prompts distinction, channels (CI webhook, mobile relay, Discord bridge, fakechat), and cost of always-loaded tools. Use this skill whenever adding an MCP server, debugging connection issues, choosing between MCP Tools vs Prompts vs Resources, installing channel servers, or managing .mcp.json. Triggers on: "MCP server", "mcp config", "add Obsidian MCP", "install context7", "channels"