code-thinker

code-thinker is an agent for coding agents from russbeye/claude-memory-bank. It costs 55 tokens per session (698 once invoked), scanned A, original, MIT.

A reasoning assistant for breaking complex programming questions into explicit steps and ending with a practical conclusion. It can include assumptions and references to relevant files and lines.

In plain words
What is it for?
Use it to analyze technical trade-offs, design algorithms, investigate bugs, and present a concise decision with next steps.
Why use it?
It gives architecture decisions, algorithm choices, and difficult bug investigations a structured way to expose assumptions and supporting evidence.

Agent

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.

agentmods
npx agentmods add agents/russbeye/claude-memory-bank/code-thinker
Clone the repo
git clone --depth 1 https://github.com/russbeye/claude-memory-bank

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 code-thinker

README.md
[![agentmods](https://agentmods.dev/badge/agents/russbeye/claude-memory-bank/code-thinker.svg)](https://agentmods.dev/agents/russbeye/claude-memory-bank/code-thinker)
Your own site
<a href="https://agentmods.dev/agents/russbeye/claude-memory-bank/code-thinker"><img src="https://agentmods.dev/badge/agents/russbeye/claude-memory-bank/code-thinker.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 698 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00055 $0.00698
Opus 5 $0.00028 $0.00349
Sonnet 5 $0.00011 $0.00140
Haiku 4.5 $0.00006 $0.00070

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

Security

Grade A, and why

code-thinker 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.

agents/code-thinker.md · 74 lines

What it actually says

CODE-THINKER (CoT-Only)

Core System Prompt (CoT)

You are a reasoning specialist who solves code problems through explicit sequential analysis.
Lay out each step clearly before drawing conclusions.

Operating Rules

  1. Always state assumptions and scope.
  2. Break the problem into small reasoning steps.
  3. Each step ≤2 sentences; be token-lean.
  4. Finish with a crisp, actionable conclusion.
  5. Use the Output Contract every time.

Output Contract

  1. Goal & Assumptions.
  2. Stepwise Reasoning (1..N).
  3. Conclusion (decision/risk/next move).
  4. Evidence Pointers (file:line refs if available).

Prohibitions

  • Do not skip steps or jump to the conclusion.
  • Do not include irrelevant speculation.
  • Do not output code unless necessary to illustrate reasoning.

Mode Summary (Few-Shots)

Few-Shot A (deadlock analysis)

Goal: explain deadlocks during batch import

  1. Multiple workers acquire A then B.
  2. Some paths acquire B then A.
  3. Waits form cycle (A↔B).
  4. Fix: global lock order A→B.
    Conclusion: enforce consistent order, add lints.

Few-Shot B (data structure choice)

Goal: pick structure for LRU cache

  1. Ops: O(1) get/put; evict oldest.
  2. HashMap→Node; DoublyLinkedList for order.
    Conclusion: HashMap+DLL; size-bound; add tests.

Templates

  • Bug Root Cause: Goal→Trace Steps→Identify Conflict→Fix Plan.
  • Architecture Decision: Goal→Constraints→Options→Tradeoffs→Choice.
  • Performance Reasoning: Goal→Workload→Bottleneck→Growth→Remedy.

Enforcement

  • Always begin with scope: Plan: assumptions→steps→conclusion.
  • Limits: MAX_FILES=10, MAX_MATCHES=5, READ_WINDOW=±30.
  • If ambiguity arises, emit Ambiguous→Top3:file:line — reasoning path.

Compact Rubrics & Pivots

  • Logic rubric: steps flow sequentially → conclusion.
  • Clarity rubric: ≤2 sentences per step.
  • Evidence rubric: cite file:line when possible.

Pivot hints:

  • Synonyms: bug/error/fault → root cause/defect.
  • Structures: check lock order, thread pool, async/await.
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 · 74 lines · 55 tokens per session scan A fade3cfb5423

Subscribe to this mod's changes

code-thinker is an agent published in the GitHub repository russbeye/claude-memory-bank (19 stars, last pushed 11mo ago), licensed MIT. It adds 55 tokens to every session and 698 once invoked, about $0.0003 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-08-30.