A methodology skill for coding agents — verify the premise, reuse before writing, smallest correct change, self-smoke, honest report.
A coding agent without explicit rigor tends to fail in predictable ways. Loading this skill shifts default behavior:
| Situation | Without rigor | With rigor |
|---|---|---|
User reports bug at foo.py:96 — file doesn't exist on this branch |
Invents code at a similar path, or edits the wrong file | Runs find / grep first; surfaces the file mismatch in seconds |
| A helper that does roughly the right thing exists 3 modules over | Writes a new one anyway, creating quiet duplication | Searches for synonymous functions; extends the existing one |
| Agent edits, immediately reports "done" | User runs it, it crashes on the first test | Import smoke + happy path + boundary case run before claiming done |
| Today's bug resembles one documented 14 days ago | Fixes it again, no notice of the pattern | git log + grep first; surfaces the regression in the report |
A test fails; quick way to green is try/except: pass |
Tests green, real problem persists | Lets the error surface at the boundary; explicit decision documented |
⚠️ EN and ZH cover the same methodology. Loading both doubles your context cost for zero extra signal. Pick the one matching your audience and load only that one.
| Language | Skill (load this file into your agent) | Quick info |
|---|---|---|
| English | en/SKILL.md |
en/README.md |
| 简体中文 | zh/SKILL.md |
zh/README.md |
The skill has two cost stages. The trigger metadata stays in your system reminder for essentially free; the full skill body only loads when the agent decides to invoke it.
| Stage | When loaded into context | EN | ZH |
|---|---|---|---|
1. Trigger — description + when_to_use from frontmatter |
Every conversation | ~70 tokens | ~100 tokens |
2. Full skill — entire SKILL.md body |
Only when the agent invokes the skill | ~5,200 tokens | ~7,100 tokens† |
† Chinese costs ~37% more per equivalent content (denser tokenizer). Measured with
cl100k_baseas a Claude proxy (±5–10% vs Claude's actual tokenizer). For harnesses without trigger-based loading (Cursor / Aider / Cline / static rules files), the full content is always loaded — treat Stage 2 as your real cost.
Works with any coding agent / harness — Claude Code, Cursor, Aider, Cline, Windsurf, Continue, OpenCode, or your own SDK-based agent.
🖱️ Easiest (no command line, any OS). Open en/SKILL.md → click Raw at the top-right → save as .claude/skills/rigor/SKILL.md in your project. For Chinese, use zh/SKILL.md instead.
🐧 macOS / Linux / WSL / Git Bash:
mkdir -p .claude/skills/rigor
curl -L https://raw.githubusercontent.com/feihuiwu123/coding-agent-rigor/master/en/SKILL.md \
-o .claude/skills/rigor/SKILL.md🪟 Windows PowerShell:
New-Item -ItemType Directory -Force .claude/skills/rigor | Out-Null
Invoke-WebRequest `
-Uri https://raw.githubusercontent.com/feihuiwu123/coding-agent-rigor/master/en/SKILL.md `
-OutFile .claude/skills/rigor/SKILL.mdSwap
en/SKILL.md→zh/SKILL.mdin the URL for the Chinese version. Then referencerigorfrom your agent prompts or system instructions.
Open en/SKILL.md (or zh/SKILL.md), copy the content, and paste it into your project's rules / conventions file:
| Harness | Rules file |
|---|---|
| Cursor | .cursorrules (project root) |
| Aider | CONVENTIONS.md (loaded via --read CONVENTIONS.md) |
| Cline | .clinerules |
| Windsurf | .windsurfrules |
| Continue / OpenCode / others | wherever your agent loads system instructions (e.g. AGENTS.md) |
Plain Markdown — no toolchain, no build step.
SKILL = open("en/SKILL.md").read() # or "zh/SKILL.md"
system = f"<methodology>\n{SKILL}\n</methodology>\n\n<your other system prompt>"The skill is ~440 lines, organized as:
- Mindset — 6 principles before any process
- Five phases — Calibrate → Reuse Recon → Smallest Change → Self-Smoke → Persist & Report
- Git discipline — pre-commit checks, explicit staging, three-part messages
- Conversation discipline — when to speak up, when to shut up and act
- Anti-patterns — 9 patterns to abort on sight
- Debugging recipes — value provenance, regression hunting, scope checks
- Working with the agent harness — parallel tool calls, context hygiene, plan-mode usage
- Pre-commit self-check — 12-item checklist
- A worked example — generic, language-agnostic
Distilled from real coding-agent sessions, mostly with Claude Code. The methodology itself is model-agnostic and harness-agnostic — works with any sufficiently capable coding agent. PRs welcome to refine for other harnesses and model families.
MIT — see LICENSE.