recursive-thinking

recursive-thinking is a skill for Claude Code, Codex from n-n-code/n-n-code-skills. It costs 85 tokens per session (972 once invoked), scanned A, original, MIT.

A review method for challenging an existing plan, diagnosis, design, argument, or recommendation. It looks for weak assumptions, overlooked risks, and evidence that could change the conclusion.

In plain words
What is it for?
Use it for premortems, devil’s-advocate reviews, non-security decisions, and checking whether a proposed solution should be improved, qualified, or rejected.
Why use it?
It helps catch problems before action is taken, especially when a proposal seems reasonable but has not been pressure-tested.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it for premortems, devil’s-advocate reviews, non-security decisions, and checking whether a proposed solution should be improved, qualified, or rejected.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/n-n-code/n-n-code-skills/recursive-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 n-n-code/n-n-code-skills --skill recursive-thinking
Clone the repo
git clone --depth 1 https://github.com/n-n-code/n-n-code-skills

Made for: Claude Code, Codex.

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 recursive-thinking

README.md
[![agentmods](https://agentmods.dev/badge/skills/n-n-code/n-n-code-skills/recursive-thinking/github.svg)](https://agentmods.dev/skills/n-n-code/n-n-code-skills/recursive-thinking)
Your own site
<a href="https://agentmods.dev/skills/n-n-code/n-n-code-skills/recursive-thinking"><img src="https://agentmods.dev/badge/skills/n-n-code/n-n-code-skills/recursive-thinking/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for recursive-thinking

Your own site · 80×15
<a href="https://agentmods.dev/skills/n-n-code/n-n-code-skills/recursive-thinking"><img src="https://agentmods.dev/badge/skills/n-n-code/n-n-code-skills/recursive-thinking.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 972 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.00085 $0.00972
Opus 5.5 $0.00034 $0.00389
Sonnet 5.5 $0.00017 $0.00194
Haiku 4.5 $0.00009 $0.00097

Measured 1mo ago against content hash efe64c11cd40, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

recursive-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 1mo 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.

.agents/skills/recursive-thinking/SKILL.md · 69 lines

How it starts

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

Recursive Thinking

Challenge an existing candidate hard enough to improve, qualify, or reject it before action.

Use this as an orthogonal workflow skill alongside the relevant domain or repository skills. It can be invoked directly whenever a candidate exists; a prior thinking pass is not required. If no candidate exists, use thinking to frame the decision first.

This workflow produces a concise, evidence-based audit trail. It does not require a step-by-step reasoning transcript.

Routing boundaries

  • Use security as primary when red-teaming means exploit discovery, abuse paths, authentication, authorization, secrets, or trust boundaries.
  • Use tester-mindset as primary when the main artifact is a test strategy, oracle, or edge-case inventory.
  • Keep language, backend, UI, documentation, prompt, and story skills primary for reviews of their artifacts; add this workflow only when adversarial pressure-testing is materially useful.
  • Do not use this for simple lookups, routine execution, or open-ended idea generation.

Optional n

If the user supplies n, treat it as the maximum number of distinct challenge lenses, not recursion depth. Do not ask for n, invent a default, or expand weak branches to satisfy the count. Without n, use only as many lenses as the decision needs.

Grounding

Keep conclusions, evidence, and assumptions distinguishable. Apply labels only where they clarify a material claim:

  • Observed: directly supported by a cited source, file, test, log, or supplied fact.
  • Inferred: derived from observations plus a named assumption.
  • Unknown: unresolved, with the evidence that would resolve it.

For diagnosis and review, cite concrete evidence. For strategy or design, state verification or falsification conditions for the most important assumptions. Do not convert plausibility into observation.

Workflow

  1. Define the candidate and success target. State what is being challenged and what a better outcome means.
  2. Inspect the evidence. Gather relevant artifacts, constraints, tests, history, and domain guidance before critiquing.
  3. Choose distinct challenge lenses. Cover only material angles such as objective mismatch, hidden assumptions, contrary evidence, alternatives, failure modes, incentives, interfaces, reversibility, or verification. Include at least one strong countercase to the current conclusion.
  4. Select high-yield probes. Prioritize questions likely to change confidence, the recommendation, the next action, or the validation plan. Replace repetitive or cosmetic questions.
  5. Deepen selectively. Probe with the most useful form of why, how, what evidence, what fails, what trade-off, or what would change the conclusion. Continue only while another probe could produce a decision-relevant delta.
  6. Reconcile the result. Name contradictions instead of smoothing them over. State which assumptions survived, weakened, or failed and whether the candidate should proceed, change, wait for evidence, or be rejected.
  7. Recommend the next action. Give the smallest action that addresses the strongest concern, plus what should not happen yet.

Read the full file on GitHub · 69 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. 1mo ago First seen · 69 lines · 85 tokens per session scan A efe64c11cd40

Subscribe to this mod's changes

recursive-thinking is a skill published in the GitHub repository n-n-code/n-n-code-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 972 once invoked, about $0.0003 per session on Opus 5.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-08-31.

Related

Other skills, from other repositories

astro-dso-doc

Bootstraps a deep-sky object (DSO) astrophotography project from raw acquisition frames (own rig, not a smart telescope), AND generates a complete, polished HTML documentation page, a processing checklist, an AstroBin post JSON, a PixInsight process icon set (XPSM), and a ready-to-paste PixInsight project Description…

jjmartres/ai-coding-agents · 311 tokens

document-code

Apply Google Style documentation standards to Python, Go, TypeScript, and Terraform code. Use when writing or reviewing code that needs docstrings/comments/JSDoc, when asked to "document this code", "add docstrings", "follow Google Style", or when improving code documentation quality. Supports Python docstrings, Go…

jjmartres/ai-coding-agents · 88 tokens

work-on-ticket

Fetches Jira ticket details, creates an appropriately named branch, and initiates the task planning workflow. Use when the user says "work on [TICKETID]" or similar phrases.

jjmartres/ai-coding-agents · 41 tokens

datadog

Use this skill when you need to search Datadog logs, query metrics, tail logs in real-time, trace distributed requests, investigate errors, compare time periods, find log patterns, check service health, or export observability data.

jjmartres/ai-coding-agents · 51 tokens

audit-pr

Audit a whole PR against the delivery contract and return MERGE-READY or evidenced blockers with the full URL. Consumes the current review-change REVIEW-PASS receipt instead of re-running review axes; posts a SHA-bound ready comment; never edits or merges. Triggers: "audit-pr", "is this PR ready", "merge gate".

gtrabanco/agentic-workflow · 71 tokens

execute-phase

Step executor for units whose triage (unit-lane) decided which steps the unit needs. Implements one triaged step (or all remaining steps), with frozen acceptance, step-local gates, commits, red-gate repair, and diff-size guard. BREAKING: replaced PLAN.md/TASKS.md/progress.md/ACCEPTANCE.md with the unit doc's Tasks…

gtrabanco/agentic-workflow · 106 tokens