clanker-discipline — Claude Code skill: what it does, how to install
This skill prevents AI coding agents from bloating application state. It guides reviews of state models, optional fields, and mutation patterns.
npx skills add gbasin/clanker-discipline --skill clanker-discipline -a claude-codeWhat clanker-discipline does
Coding assistants often handle edge cases by adding boolean flags and optional fields. This habit quickly breaks architecture. The clanker-discipline skill instructs the agent to derive values from existing event logs rather than managing duplicate state variables.
When state cannot be rederived, the rules confine it to a closure. Data structures must rely on discriminated unions instead of dozens of optional properties. Identical primitive strings like entity IDs receive branded types to prevent accidental swapping. Unused type variants get deleted immediately.
Code cleanliness takes precedence over small diffs. A large rewrite during review is better than layering workarounds. The skill also enforces clear boundaries between pure semantic functions and effectful orchestrators, which makes automated tests straightforward.
What it helps with
- eliminate redundant boolean flags by deriving state from event streams
- replace grab-bag optional fields with discriminated unions
- differentiate primitive identifier strings using branded types
- isolate side effects away from pure semantic calculations
Example prompts for the agent
- Review this state model and eliminate redundant flags using clanker-discipline rules.
- Convert this interface of optional fields into a discriminated union.
- Extract side effects from this function into a separate orchestrator.
How to install clanker-discipline
1Skills CLI (Vercel)
npx skills add gbasin/clanker-discipline --skill clanker-discipline -a claude-code2Manually: put the files in place
~/.claude/skills/clanker-discipline/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/clanker-discipline/
1Skills CLI (Vercel)
npx skills add gbasin/clanker-discipline --skill clanker-discipline -a codex2Manually: put the files in place
.agents/skills/clanker-discipline/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add gbasin/clanker-discipline --skill clanker-discipline -a cursor2Manually: put the files in place
.cursor/skills/clanker-discipline/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install gbasin/clanker-discipline clanker-discipline2Manually: put the files in place
.github/skills/clanker-discipline/SKILL.md1Skills CLI (Vercel)
npx skills add gbasin/clanker-discipline --skill clanker-discipline -a gemini-cli2Platform CLI
gemini skills install https://github.com/gbasin/clanker-disciplineManually: put the files in place
.devin/skills/clanker-discipline/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add gbasin/clanker-discipline --skill clanker-discipline -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about clanker-discipline
How to install clanker-discipline in Claude Code?
Run the command npx skills add gbasin/clanker-discipline --skill clanker-discipline -a claude-code in your terminal. Alternatively, place the skill file manually at ~/.claude/skills/clanker-discipline/SKILL.md.
What does clanker-discipline do?
AI coding agents tend to tack on boolean flags and optional fields for every edge case, creating messy state. This skill forces agents to derive values from event logs, eliminate impossible states with discriminated unions, and isolate mutations.
When is storing mutable state allowed under these rules?
Storing state is permitted for explicit state machines like checkout steps, external temporal data such as timestamps, or when deriving is more complex than storing. Any unavoidable mutation must be locked inside a local closure.