Principles of good code design, and an agent skill that applies them. Built on The 5 Principles: Consistent, Simple, General, Clear, Salient.
Framed for code, but medium-agnostic: the same five principles govern good writing, documentation, and design just as well.
npx skills add kengz/good-codeThis installs the good-code skill. It detects your stack and generates a project-specific AGENTS.md, with CLAUDE.md as exactly @AGENTS.md. It works with many agents, including Claude Code, Cursor, Codex, and Copilot.
Copy skills/good-code/CLAUDE.md into your project as AGENTS.md, adapt it to your stack, and make your CLAUDE.md the single line @AGENTS.md.
| File | Purpose |
|---|---|
PRINCIPLES.md |
The principles, the premises, and the laws that follow from them |
CLAUDE.md |
Template for a project's AGENTS.md |
SKILL.md |
Skill definition: detects your stack and generates the instructions |
- Consistent: Agree with reality and with itself. Build from established facts, handle the conditions the work will actually meet, failure included, and let evidence decide what stands. No part contradicts another.
- Simple: Use the fewest parts that preserve what matters; complexity is a cost, not evidence of sophistication.
- General: Prefer one principle that covers related cases over a growing set of special rules.
- Clear: Say what it does, so its purpose is obvious from its form alone.
- Salient: Keep what is essential, reproducible, and likely to endure.
The Method (the Algorithm, Iteration, Identity, Refinement, Communication) is in PRINCIPLES.md.