kaizen — Claude Code skill: small steps to better code
A skill that pushes the agent toward small, verified improvements and errors caught by the type system instead of at runtime.
npx claude-code-templates@latest --skill productivity/kaizenWhat kaizen does
kaizen is a set of working rules for the agent during refactoring and feature work. It rests on four pillars: continuous small improvements, error proofing through types, standardization, and building only what is needed. The agent is told to make the smallest change that improves quality, verify it, then move on — not to rewrite a module in one pass.
The second half covers types and validation. Instead of status: string you get a union of allowed values; instead of checking a value after it is used, the check moves to the system boundary. Early returns and branded types like PositiveNumber show up as ways to make invalid states impossible to construct.
The examples are TypeScript, so keep that in mind: on a dynamically typed project some of the techniques do not carry over as written. Install runs through npx claude-code-templates@latest --skill productivity/kaizen, and the file lands at ~/.claude/skills/kaizen/SKILL.md.
What it helps with
- split a large refactor into verifiable steps
- replace string statuses with union types
- move validation to the system boundary
- drop dead code and stale comments while working
- make invalid states unrepresentable in types
Example prompts for the agent
- refactor this module with kaizen, one improvement at a time
- check the types in
order.tsand stop an order from being built without a trackingNumber - suggest incremental fixes for this function instead of a rewrite
How to install kaizen
1claude-code-templates
npx claude-code-templates@latest --skill productivity/kaizen2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill kaizen -a claude-code3Manually: put the files in place
~/.claude/skills/kaizen/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/kaizen/
Manually: put the files in place
.agents/skills/kaizen/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/kaizen/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates kaizen2Manually: put the files in place
.github/skills/kaizen/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/productivity/kaizenManually: put the files in place
.devin/skills/kaizen/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.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 kaizen
How do I install kaizen in Claude?
Run npx claude-code-templates@latest --skill productivity/kaizen. The skill ends up at ~/.claude/skills/kaizen/SKILL.md.
What does kaizen do?
It sets the agent's working order: one small improvement at a time, verification after each step, and error prevention through the type system and boundary validation.
What language are the examples in?
They are TypeScript — union types, branded types, early returns. On languages without static typing, some of the techniques need adapting.