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.
npx skills add latestaiagents/agent-skills --skill extended-thinkinggit clone --depth 1 https://github.com/latestaiagents/agent-skillsWrote 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.
[](https://agentmods.dev/skills/latestaiagents/agent-skills/extended-thinking)<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>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.
| Model | Per session | Once 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 |
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.
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
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.
- 4d ago First seen · 155 lines · 101 tokens per session scan A 2c6fb9a66f55
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.
Other skills, from other repositories
chain-of-thought-prompts
Chain-of-thought and step-by-step reasoning prompts for complex problem solving.
few-shot-example-gen
Few-shot example generation and optimization for improved LLM performance.
llm-classifier
LLM-based zero-shot and few-shot classification for flexible intent detection.
llm-structured-output
Get reliable JSON, enums, and typed objects from LLMs using responseformat, tooluse, and schema-constrained decoding across OpenAI, Anthropic, and Google APIs.
model-recommendation
Analyse chatmode or prompt files and recommend optimal AI models based on task complexity, required capabilities, and cost-efficiency.
prompt-builder
Guide users through creating high-quality GitHub Copilot prompt files with clear structure, appropriate tools, validation criteria, and maintainable instructions.