Skip to content

feihuiwu123/coding-agent-rigor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coding-agent-rigor

A methodology skill for coding agents — verify the premise, reuse before writing, smallest correct change, self-smoke, honest report.

What changes when your agent loads rigor

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

Load one language — never both

⚠️ 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

Token cost (two stages)

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. Triggerdescription + 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_base as 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.

Quick start

Works with any coding agent / harness — Claude Code, Cursor, Aider, Cline, Windsurf, Continue, OpenCode, or your own SDK-based agent.

Claude Code — project skill

🖱️ 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.md

Swap en/SKILL.mdzh/SKILL.md in the URL for the Chinese version. Then reference rigor from your agent prompts or system instructions.

Cursor / Aider / Cline / Windsurf / Continue / generic coding agent

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.

Anthropic SDK — building your own coding agent

SKILL = open("en/SKILL.md").read()    # or "zh/SKILL.md"
system = f"<methodology>\n{SKILL}\n</methodology>\n\n<your other system prompt>"

What's inside

The skill is ~440 lines, organized as:

  1. Mindset — 6 principles before any process
  2. Five phases — Calibrate → Reuse Recon → Smallest Change → Self-Smoke → Persist & Report
  3. Git discipline — pre-commit checks, explicit staging, three-part messages
  4. Conversation discipline — when to speak up, when to shut up and act
  5. Anti-patterns — 9 patterns to abort on sight
  6. Debugging recipes — value provenance, regression hunting, scope checks
  7. Working with the agent harness — parallel tool calls, context hygiene, plan-mode usage
  8. Pre-commit self-check — 12-item checklist
  9. A worked example — generic, language-agnostic

Credits

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.

License

MIT — see LICENSE.

About

claude-code, coding-harness, coding-agent,skills

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors