Write code to the GoodCode standard: every fact written once, one job per module, the whole flow visible in one place, no state that makes no sense, input parsed at the door, no silent failure, plain readable code, and nothing that was not asked for. Use on any coding task (writing, fixing, refactoring, designing a module) and when the user says "goodcode", "good code", "clean code", "clean architecture", or cites a rule id such as GC-24.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Goodcode?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/matasurbonavicius-goodcode)
---
name: goodcode
description: >
Write code to the GoodCode standard: every fact written once, one job per
module, the whole flow visible in one place, no state that makes no sense,
input parsed at the door, no silent failure, plain readable code, and nothing
that was not asked for. Use on any coding task (writing, fixing, refactoring,
designing a module) and when the user says "goodcode", "good code", "clean
code", "clean architecture", or cites a rule id such as GC-24.
---
# GoodCode
The standard lives in one file: `CODE_ARCHITECTURE.md` at the plugin root, two
folders above this skill's base directory (`../../CODE_ARCHITECTURE.md`). Read
it in full before the first change of a session. It is the only home of the
rules: never work from memory of it, and never restate a rule differently.
Each chapter has bad and good examples in `../../examples/`. When you are
unsure what a rule looks like in code, read that chapter's file.
## Before you write
Answer these from the code in front of you, not from habit:
1. **What exists** (GC-39). Search for the function, type or pattern before
writing one. Note how this codebase names things, reports failure and lays
out files. Your code will look like its neighbours.
2. **Home** (GC-01). Where does each fact you touch live? Use that home. A new
fact gets one home before its first use.
3. **Heart** (GC-10). Which file shows this program's flow? Anything you start,
schedule, subscribe or queue is registered there.
4. **Door** (GC-19). Where does the outside data you use enter? Parse it there,
once, for shape and sense.
5. **State** (GC-14, GC-15). Can the data you add hold a combination that makes
no sense? Does anything move through stages? Shape it so it cannot, and
declare the stages.
## While you write
- Decide or do (GC-11): logic takes values and returns values. The clock,
randomness and the environment are passed in.
- No silent failure (GC-24): no swallowed error, no fallback default, no clamp.
- Trust inside (GC-20): no check for what cannot happen. If you cannot name the
input that triggers a guard, do not write the guard.
- Build what was asked (GC-37, GC-38): no option, hook, wrapper or interface
without a real second use today.
- Finish the change (GC-40): no `_v2`, no shim, no old path left beside the new.
- Comments say why (GC-35): none that narrate the code or say what you changed.
## Respect the code that is there
Do the task, and only the task. Where the standard and the codebase disagree,
match the codebase and name the rule it departs from, so the person can decide.
Do not refactor beyond the task to satisfy the standard: report what you saw
instead.
## When you finish
Check your own change against the Check line of each rule it touches. Then end
with one line: the rules the change relied on, any rule it knowingly gives way
on with the reason, and anything you saw in existing code that breaks a rule.
`GoodCode: GC-11, GC-19, GC-24. Gives way on GC-16: total is stored, the list view needs it (measured). Seen: GC-18 in context.py, not touched.`