plugins/claude-code-expert/skills/extended-thinking/SKILL.md
# Claude Code Extended Thinking Complete guide to extended thinking modes and thinking budget configuration. ## Overview Extended thinking (also called "ultrathink") allows Claude to perform deeper reasoning before responding. This uses additional tokens for internal reasoning that improves quality on complex tasks. ## Thinking Modes ### Trigger Phrases (CLI) Use these phrases in your prompts to activate thinking levels: | Phrase | Thinking Tokens | Approx Cost | |--------|----------------
npx skillsauth add markus41/claude plugins/claude-code-expert/skills/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.
Complete guide to extended thinking modes and thinking budget configuration.
Extended thinking (also called "ultrathink") allows Claude to perform deeper reasoning before responding. This uses additional tokens for internal reasoning that improves quality on complex tasks.
Use these phrases in your prompts to activate thinking levels:
| Phrase | Thinking Tokens | Approx Cost |
|--------|----------------|-------------|
| think | ~4,000 tokens | ~$0.06 |
| think hard / megathink | ~10,000 tokens | ~$0.15 |
| ultrathink | ~32,000 tokens | ~$0.48 |
Example: "ultrathink about how to refactor the auth module"
Option+T — Toggle extended thinking on/off in interactive modeCLAUDE_CODE_EFFORT_LEVEL=high # low, medium, high
Standard reasoning — Claude thinks internally as needed.
More deliberate reasoning with configurable thinking budget.
Maximum reasoning depth for the most complex problems. Best for architecture decisions, debugging complex issues, and novel problem-solving.
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const response = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 16000,
thinking: {
type: "enabled",
budget_tokens: 10000 // Tokens allocated for thinking
},
messages: [
{ role: "user", content: "Solve this complex architecture problem..." }
]
});
// Access thinking content
for (const block of response.content) {
if (block.type === "thinking") {
console.log("Thinking:", block.thinking);
} else if (block.type === "text") {
console.log("Response:", block.text);
}
}
| Budget | Use Case | |--------|----------| | 2,000-5,000 | Simple analysis, code review | | 5,000-10,000 | Architecture decisions, debugging | | 10,000-20,000 | Complex multi-step reasoning | | 20,000+ | Deep research, novel problem solving |
const stream = await client.messages.stream({
model: "claude-sonnet-4-6",
max_tokens: 16000,
thinking: {
type: "enabled",
budget_tokens: 10000
},
messages: [{ role: "user", content: "..." }]
});
for await (const event of stream) {
if (event.type === "content_block_start") {
if (event.content_block.type === "thinking") {
console.log("--- Thinking started ---");
}
}
if (event.type === "content_block_delta") {
if (event.delta.type === "thinking_delta") {
process.stdout.write(event.delta.thinking);
} else if (event.delta.type === "text_delta") {
process.stdout.write(event.delta.text);
}
}
}
Within Claude Code sessions, extended thinking is managed automatically based on:
| Model | Extended Thinking | |-------|------------------| | Claude Opus 4.6 | Full support | | Claude Sonnet 4.6 | Full support | | Claude Haiku 4.5 | Limited support |
/cost to monitor thinking token usage/compact preserves thinking conclusions but drops raw thinking{
"content": [
{
"type": "thinking",
"thinking": "Let me analyze this step by step...\n1. First consideration...\n2. Second consideration..."
},
{
"type": "text",
"text": "Based on my analysis, here's what I recommend..."
}
],
"usage": {
"input_tokens": 500,
"output_tokens": 3000,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}
tools
Build Teams-native agents with the Teams SDK (formerly Teams AI Library v2) — App class, activity routing, adaptive cards, streaming, AI-generated labels, feedback, message extensions, Teams-as-MCP-server, and the bring-your-own-AI pattern with Agent Framework.
tools
Run agents on Microsoft Foundry (formerly Azure AI Foundry) Agent Service — prompt agents vs hosted agents, threads/runs and the Responses API, built-in tools (Bing grounding, code interpreter, file search, MCP, OpenAPI, A2A), connected agents, Entra agent identity, SDKs, and observability/evaluations.
tools
Build and host custom engine agents with the Microsoft 365 Agents SDK — AgentApplication, the Activity protocol, channel reach via Azure Bot Service, hosting Agent Framework or Semantic Kernel engines, and the Agents Toolkit/Playground workflow. Successor to the Bot Framework SDK.
tools
Design, govern, and extend Microsoft Copilot Studio agents — topics, generative orchestration, knowledge, tools and MCP, agent flows, autonomous triggers, publishing channels, Copilot Credits pricing, and solution-based ALM on Power Platform.