extended-thinking

extended-thinking is a skill for Claude Code from latestaiagents/agent-skills. It costs 101 tokens per session (1,382 once invoked), scanned A, original, MIT.

A guide to using Claude's extended thinking mode, which gives the model extra internal reasoning space before it answers.

In plain words
What is it for?
Use it for complex mathematics, proofs, multi-step planning, difficult debugging, and code generation that needs careful preparation.
Why use it?
It helps you spend that extra processing only on tasks where careful reasoning matters, instead of adding cost and delay to simple work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-4-6-features plugin — 6 skills shipped together , and of latestaiagents

Good fit Use it for complex mathematics, proofs, multi-step planning, difficult debugging, and code generation that needs careful preparation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/extended-thinking
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add latestaiagents/agent-skills --skill extended-thinking
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install claude-4-6-features, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for extended-thinking

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/extended-thinking.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/extended-thinking)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/extended-thinking"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/extended-thinking.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,382 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.01382
Opus 5 $0.00051 $0.00691
Sonnet 5 $0.00020 $0.00276
Haiku 4.5 $0.00010 $0.00138

Measured 4d ago against content hash 2c6fb9a66f55, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

extended-thinking scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/claude-4-6-features/extended-thinking/SKILL.md · 155 lines

How it starts

The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Extended Thinking

Extended thinking gives the model a scratchpad before the final answer. Pay for reasoning tokens, get deeper answers. Use it surgically, not everywhere.

When to Use

  • Complex reasoning: math, proofs, multi-step logic
  • Code generation where the model needs to plan before writing
  • Agent planning: deciding which of many tools to call and in what order
  • Debugging subtle issues: model can "think through" root causes
  • Writing where structure and coherence matter more than speed

When NOT to Use

  • Simple classification, extraction, or formatting — pure overhead
  • Latency-sensitive paths — thinking adds 2-30 seconds
  • Small prompts where the model gets it right zero-shot anyway
  • High-volume batch tasks on a tight cost budget

Enabling Thinking

const response = await client.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 16_000,
  thinking: {
    type: "enabled",
    budget_tokens: 10_000,
  },
  messages: [{ role: "user", content: "Prove that every prime > 3 is of the form 6k±1." }],
});

budget_tokens is the max thinking tokens. Model may use fewer. max_tokens must be > budget_tokens (thinking counts toward the total).

Budget Sizing

Task Typical budget
Short multi-step reasoning 2,000-5,000
Code generation with planning 5,000-10,000
Complex math/proofs 10,000-32,000
Deep agent planning 10,000-20,000
Research synthesis 16,000-32,000

Start at 5,000 and measure. Bigger budget ≠ better answers past a point.

Inspecting the Thinking Trace

for (const block of response.content) {
  if (block.type === "thinking") {
    console.log("REASONING:", block.thinking);
  } else if (block.type === "text") {
    console.log("ANSWER:", block.text);
  }
}

The thinking block reveals the model's reasoning. Useful for:

  • Debugging why the model chose a wrong answer
  • Surfacing rationale to power users (e.g., "show reasoning" toggle)
  • Auditing agent decisions

Read the full file on GitHub · 155 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 155 lines · 101 tokens per session scan A 2c6fb9a66f55

Subscribe to this mod's changes

extended-thinking is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 101 tokens to every session and 1,382 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.