plugins/craftwork-all/skills/kaizen/SKILL.md
Apply kaizen continuous improvement philosophy to any codebase — identifying waste, unevenness, and overburden at the code level and producing small, actionable improvement opportunities. Triggers on '/kaizen', 'kaizen this codebase', 'continuous improvement audit', 'find waste in this code', 'what small improvements can we make?', 'improve this codebase incrementally', 'code health check', 'codebase hygiene', 'tech debt sweep', or any request to find incremental improvement opportunities in code. Also trigger when the user says 'clean up', 'tidy up', 'make this codebase better', or expresses frustration about code quality without wanting a full rewrite. This is NOT a code review skill for PRs or diffs — kaizen operates on the codebase as a whole or a focus area, looking for systemic improvement opportunities. Use this skill even for small codebases — the philosophy scales down gracefully.
npx skillsauth add andurilcode/skills kaizenInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Rejectes. Identify the smallest changes that compound into significant quality. Every file you touch should leave better than you found it.
/kaizenRun all seven dimensions across the codebase. Full improvement map.
/kaizen "focus description"Run all dimensions but weight and prioritize through the user's focus lens.
Examples:
/kaizen "file sizes — nothing should exceed 500 LOC"/kaizen "naming consistency across the API layer"/kaizen "dead code and unused imports"/kaizen "error handling patterns"When a focus is provided:
[ALSO NOTED] — keep them briefEvery finding maps to one of these. This is the classification taxonomy.
Code consuming rdding value.
| Type | Code manifestation | |---|---| | Defects | Bugs, broken tests, swallowed errors | | Overproduction | Dead code, unused exports, premature abstractions | | Waiting | Slow builds, blocking I/O without async | | Transportation | Unnecessary data transformations, excessive layer mapping | | Inventory | Stale TODOs (>6mo), commented-out code, stale branches | | Motion | Excessive indirection, 5+ layer call chains for simple ops | | Over-processing | Over-engineered abstractions, config for hypothetical flexibility |
Inconsistency forcing developers to context-switch and guess.
| Signal | Example |
|---|---|
| Naming | getUserData() vs fetchUserInfo() vs loadUserProfile() for same pattern |
| Mixed paradigms | Callbacks + promises + async/await in same codebase |
| Structure | Different folder layouts across features |
| Error handling | Some throw, some return null, some use Result types |
| Test style | Mixed assertion libs, inconsistent AAA adherence
Code units carrying too much responsibility.
| Signal | Default threshold | |---|---| | God files | > 400 LOC | | God functions | > 40 LOC or cyclomatic complexity > 10 | | Too many params | > 5 parameters | | God modules | > 15 exports/public methods | | Coupling | Imported by > 60% of codebase | | Deep nesting | > 3 levels |
All findings in Dimensions 2–4 use this format:
[MUDA|MURA|MURI] [subtype]
📍 [file:line or pattern]
Finding: [one sentence]
Kaizen: [specific small change]
Effort: [trivial | small | medium]
Go to the gemba — observe the real state, not the idealized version.
GEMBA SNAPSHOT
Languages: [detected]
Framework: [detected]
Total files: [N] | Total LOC: [N]
Largest file: [path] ([N] lines)
Deepest nest: [path] ([N] levels)
Most imported: [module] (by [N] files)
Test coverage: [detected or unknown]
Context files: [list found]
Scan for each waste type from the Muda table. Prioritize by impact:
For each inconsistency found, identify the dominant pattern (most common variant) — this is what to standardize on.
Additional output fields:
Variants found: [list ahes observed]
Dominant pattern: [most common — standardize on this]
Scan against thresholds from the Muri table. If user provides custom thresholds via focus, use theirs. Adjust upward for languages where longer files are conventional (Java).
Additional output fields:
Metric: [what] = [measured] (threshold: [N])
Impact: [why this hurts — "hard to test", "merge conflict magnet"]
| 5S | Code equivalent | Check | |---|---|---| | Sort (整理) | Remove unneeded | Dead files, unused deps, orphaned configs | | Set in Order (整頓) | Everything in its place | Correct directories, logical boundaries, organized imports | | Shine (清掃) | Clean regularly | Lint errors, formatting, stale comments, debug artifacts | | Standardize (清潔) | Consistent practices | Documented patterns, enforced conventions | | Sustain (躾) | Maintain discipline | CI checks, pre-commit hooks, quality gates |
O| 🔴 Needs work` with one-line evidence.
Primary deliverable. Synthesize all findings from D2–D5, prioritized by:
改善 IMPROVEMENT BACKLOG
# Type Score Effort Description Location
1 MUDA 3.0 trivial Remove 12 unused imports src/utils/*.ts
2 MURI 1.5 small Extract validation from handler src/api/orders.ts:45-120
3 MURA 1.5 small Standardize error returns src/services/*
...
Cap at 15 items. If more exist, note "N additional — run /kaizen with a focus to drill in."
PLAN: [Top 3 improvements to tackle first and why]
DO: [Concrete next steps — "In your next PR, ..."]
CHECK: [How to ve
ACT: [Systemic prevention — linter rules, CI, conventions to document]
Assemble the final report in this order:
Close with: "改善の精神: 今日の最善は、明日の出発点。"
development
Apply kaizen continuous improvement philosophy to any codebase — identifying waste, unevenness, and overburden at the code level and producing small, actionable improvement opportunities. Triggers on '/kaizen', 'kaizen this codebase', 'continuous improvement audit', 'find waste in this code', 'what small improvements can we make?', 'improve this codebase incrementally', 'code health check', 'codebase hygiene', 'tech debt sweep', or any request to find incremental improvement opportunities in code. Also trigger when the user says 'clean up', 'tidy up', 'make this codebase better', or expresses frustration about code quality without wanting a full rewrite. This is NOT a code review skill for PRs or diffs — kaizen operates on the codebase as a whole or a focus area, looking for systemic improvement opportunities. Use this skill even for small codebases — the philosophy scales down gracefully.
tools
Build automation scripts and pipelines that use coding-agent CLIs (Claude Code, Codex, Gemini CLI, GitHub Copilot CLI) in headless/non-interactive mode as the AI engine, or delegate work to cloud agents (`gh agent-task`) that open pull requests asynchronously. Use this skill whenever the user wants to write a shell script, CI job, cron task, batch processor, webhook handler, or any automation that shells out to `claude`, `codex`, `gemini`, `copilot`, or `gh agent-task` — single-turn prompts, multi-turn agentic loops, parallel fan-out across files/folders, structured JSON outputs consumed by downstream tools, or cloud-delegated tasks that produce PRs. Trigger on phrases like "script that uses Claude", "automate with Claude Code", "headless Claude", "batch process files with an LLM", "pipeline with codex exec", "gemini -p", "copilot --autopilot", "gh agent-task create", "GitHub Action that calls Claude", "cron job to review PRs", "agent loop in bash", "dispatch an agent task to open a PR", "fleet-wide agent-task across repos", or any request to integrate a coding agent CLI into an automated workflow. Also trigger when the user describes the shape of a pipeline (fan-out, map-reduce, review-then-fix, extract-then-summarize, ticket-to-PR, scheduled fleet upgrade) and AI is the engine, even if they don't name the CLI explicitly.
development
Entry point for context engineering work. Routes to the right skill based on what the user needs — creating instructions, debugging agent failures, building documentation, or measuring outcomes. Use this when the user's goal involves agent context but they haven't named a specific skill.
documentation
Apply this skill whenever the user asks to have a topic, concept, technology, or idea explained to them. Triggers on phrases like 'explain X to me', 'what is X?', 'how does X work?', 'teach me about X', 'help me understand X', 'break down X', 'ELI5', 'explain like I'm five', 'give me an overview of X', 'I don't understand X', 'walk me through X', or any situation where the user wants to learn or understand something rather than produce an artifact. Also trigger when someone pastes a concept and asks for clarification, when they ask 'why' something works a certain way, or when they need a refresher on a topic they've encountered before. This skill does NOT apply to 'write documentation about X' (use technical-writing) or 'analyze X' (use reasoning skills). This skill is for when the human is the learner.