kaizen

Extracts failures from coding agent sessions and applies root-cause fixes to rules, hooks, and docs.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/shoji9x9/portfolio --skill kaizen-shoji9x9
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kaizen
Source: https://github.com/shoji9x9/portfolio/tree/main/.agents/skills/kaizen
Command: npx skills add https://github.com/shoji9x9/portfolio --skill kaizen-shoji9x9

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Coding agents repeat the same mistakes across sessions because session failures, corrections, and errors are never systematically captured or fed back into project rules, hooks, and documentation. ## Core Features & Use Cases - Session Learning Extraction: Scans Claude Code, Codex, and Copilot session transcripts for user corrections, repeated tool errors, and repeated edits, then performs root-cause analysis (minimum 3 levels of why, KEDB matching against existing notes, cross-scope checks) before saving learnings to .kaizen/. - Learning Application & Lifecycle: Groups pending learnings by root cause and applies them to deterministic mechanisms (linters, pre-commit hooks, scripts) or rules, skills, docs, and upstream issue reports, with status tracking validated by a lifecycle checker. - Automated Hook Pipeline: A Stop hook records unextracted-activity sentinels, a PreToolUse gate blocks git commit until extraction is verified, and a SessionStart hook injects pending learnings into agent context. - Use Case: After an agent repeatedly fails a command in a session, run the extract flow to record the root cause in .kaizen/, then apply it as a pre-commit check so the failure cannot recur. ## Quick Start Ask the agent to reflect on this session and extract the most important learning into the .kaizen directory.

Frequently Asked Questions about kaizen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract learnings from a coding agent session?▼

Run the extract flow with /kaizen or /kaizen --current to analyze the latest session, or /kaizen --all for all sessions. The skill scans session transcripts for corrections and errors, performs root-cause analysis, and saves approved learnings to .kaizen/ as Markdown files.

How do I stop an AI coding agent from repeating the same mistake?▼

Record the failure as a kaizen learning with its root cause, then apply it to a deterministic mechanism such as a linter, pre-commit hook, or script rather than prose instructions. Pending learnings are also injected into future sessions via a SessionStart hook.

Does kaizen work with Codex and GitHub Copilot, not just Claude Code?▼

Yes, kaizen supports Claude Code, Codex, and GitHub Copilot. It reads each agent's session log format and provides hook configurations for .claude/settings.json, .codex/hooks.json, and .github/hooks/, though Copilot context injection is best-effort.

Why does the pre-commit gate block my git commit?▼

The PreToolUse gate blocks commits when an unextracted-activity sentinel exists and transcript scanning finds learning candidates or cannot verify zero candidates. Run kaizen --current to record the learning, then the extract-done script clears the sentinel.

What are the requirements and limitations of kaizen?▼

Kaizen requires bash and git, with jq optional for faster transcript scanning; no node, pnpm, or python runtime is needed. On Windows it must run under WSL or Git Bash, and it depends on the multiagent-setup skill for applying learnings.