think-before-coding

think-before-coding is a skill for Claude Code, Codex from orlando-japan/claude-code-setting. It costs 36 tokens per session (477 once invoked), scanned A, original, MIT.

A pre-coding checklist for exposing assumptions before starting a non-trivial programming task. It checks beliefs about inputs, APIs, invariants, edge cases, and types.

In plain words
What is it for?
Use it before changes spanning several files, when an existing function or API is central, or when a bug report is vague.
Why use it?
Coding from an untested assumption can produce a solution that looks reasonable but is wrong. This skill makes uncertain dependencies visible so they can be verified or clarified first.

Skill for Claude CodeCodex

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 skills/orlando-japan/claude-code-setting/think-before-coding
Any agent
npx skills add orlando-japan/claude-code-setting --skill think-before-coding
Clone the repo
git clone --depth 1 https://github.com/orlando-japan/claude-code-setting

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 think-before-coding

README.md
[![agentmods](https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/think-before-coding.svg)](https://agentmods.dev/skills/orlando-japan/claude-code-setting/think-before-coding)
Your own site
<a href="https://agentmods.dev/skills/orlando-japan/claude-code-setting/think-before-coding"><img src="https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/think-before-coding.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 477 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.00036 $0.00477
Opus 5 $0.00018 $0.00238
Sonnet 5 $0.00007 $0.00095
Haiku 4.5 $0.00004 $0.00048

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

Security

Grade A, and why

think-before-coding 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.

templates/extra/skills/think-before-coding/SKILL.md · 47 lines

What it actually says

Think before coding

Most bad AI code comes from confidently building on a wrong assumption. This skill forces assumptions above the waterline before code hits the editor.

When to use

  • Starting any task touching more than ~3 files.
  • Whenever an existing function or API is central to what you're about to do.
  • After receiving a vague bug report.

Protocol

Step 1 — draft the assumption list. Write out (in chat, not comments) every claim your planned change depends on. Aim for 5–15 items. Categories:

  • Input shape ("the user object has a permissions array")
  • API behavior ("fetch() throws on 4xx")
  • Invariant ("this function is only called after auth")
  • Edge case absence ("the list is never empty")
  • Type narrowing ("value is string here, not string | null")

Step 2 — classify each assumption.

  • Obvious (the types or local code make it unambiguous) → skip.
  • Load-bearing and uncertain → verify by reading the relevant source, running the code, or checking docs. Spend up to ~10 minutes per assumption. If you can't resolve it, ask the user.
  • Cosmetic (wrong guess wouldn't break correctness) → note it and continue.

Step 3 — act on what you learned. If verification changed the design, revise the plan before writing code. Don't patch the wrong plan after the fact.

Anti-patterns

  • "I'll check it in the tests." Tests find bugs after you've built on them. Check first.
  • "Most likely it's X." Probabilistic reasoning is fine for priors, not load-bearing code.
  • Skipping the list because the task is "simple." Simple tasks with one wrong assumption produce subtle bugs.

Output

A short pre-code section labelled "Assumptions" with the list and how you verified each, before any code edits.

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 · 47 lines · 36 tokens per session scan A 97c4bf8bb764

Subscribe to this mod's changes

think-before-coding is a skill published in the GitHub repository orlando-japan/claude-code-setting (2 stars, last pushed 3mo ago), licensed MIT. It adds 36 tokens to every session and 477 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

finishing-a-development-branch

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work.

obra/superpowers · 27 tokens

design-taste-frontend

Anti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check.

Leonxlnx/taste-skill · 61 tokens

image-to-code

Elite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply analyze them, then implement the website to match them as closely as possible. In Codex, it must prefer large, readable, section-specific images instead of tiny compressed boards…

Leonxlnx/taste-skill · 116 tokens

minimalist-ui

Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.

Leonxlnx/taste-skill · 34 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

Research

Multi-agent web research with mandatory URL verification, confidence-tagged output, and four depth modes (quick to deep investigation). USE WHEN research, do research, quick research, extensive research, deep investigation, find information, investigate, extract alpha, analyze content, retrieve content, AI trends…

danielmiessler/LifeOS · 173 tokens