Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add gbasin/clanker-discipline --skill clanker-discipline -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/clanker-discipline/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/clanker-discipline/

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.

Similar skills

Everything for Code review and refactoring →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor