Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
819 changes: 819 additions & 0 deletions SAVE_SKILL_DESIGN.md

Large diffs are not rendered by default.

109 changes: 0 additions & 109 deletions plugins/kaizen/INSTALL.md

This file was deleted.

69 changes: 48 additions & 21 deletions plugins/kaizen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,76 @@ A plugin that helps Claude Code learn from conversations by automatically extrac

## Features

- **Automatic Learning**: At the end of each conversation, guidelines are extracted and saved
- **Context-Aware Retrieval**: At the start of each prompt, relevant guidelines are injected
- **No Manual Configuration**: Hooks are automatically installed when the plugin is enabled
- **Automatic Retrieval**: At the start of each prompt, relevant guidelines are automatically injected
- **Manual Learning**: Use the `/kaizen:learn` skill to extract and save guidelines from conversations
- **Zero-config Retrieval**: Hooks are automatically installed when the plugin is enabled

## Installation

```bash
# Load plugin for current session
claude --plugin-dir ./kaizen
### From Local Directory

# Or with absolute path
claude --plugin-dir /path/to/kaizen
```bash
claude --plugin-dir /path/to/kaizen/repo/plugins/kaizen
```

See [INSTALL.md](INSTALL.md) for making it permanent, loading multiple plugins, and troubleshooting.
### From Marketplace

1. Add the marketplace and plugin:
```bash
claude plugin marketplace add AgentToolkit/kaizen
claude plugin install kaizen@kaizen-marketplace
```


## How It Works

### Guideline Retrieval (UserPromptSubmit hook)
### Guideline Retrieval (Automatic)

When you submit a prompt, the plugin:
When you submit a prompt, the plugin automatically:
1. Loads all stored guidelines from `.claude/guidelines.json`
2. Formats and injects them into the conversation context
3. Claude applies relevant guidelines to the current task

### Guideline Generation (Stop hook)
### Guideline Generation (Manual by Default)

When a conversation ends, the plugin:
1. Analyzes the conversation trajectory
2. Extracts actionable guidelines from what worked/failed
3. Saves new guidelines to `.claude/guidelines.json`
By default, you must manually invoke the `/kaizen:learn` skill to extract guidelines:
1. Complete a conversation or task
2. Invoke `/kaizen:learn`
3. The plugin analyzes the conversation trajectory
4. Extracts actionable guidelines from what worked/failed
5. Saves new guidelines to `.claude/guidelines.json`

## Skills Included

### `/guidelines:generator`
### `/kaizen:learn`

Manually invoke to extract guidelines from the current conversation:
- Analyzes task, steps taken, successes and failures
- Generates proactive guidelines (what to do, not what to avoid)
- Outputs JSON for storage

### `/guidelines:retrieval`
### `/kaizen:recall`

Manually invoke to retrieve and display stored guidelines.

### `/kaizen:save`

Manually invoke to capture successful workflows from your current session and save them as reusable skills:
- Analyzes conversation history (user requests, reasoning, tool calls, responses)
- Generates parameterized SKILL.md documentation
- Creates Python helper scripts for programmatic operations (when applicable)
- Saves to `~/.claude/skills/{skill-name}/` for cross-project availability

**Quick Start:**
```
User: [Complete a successful task]
User: "save"
Assistant: "What would you like to name this skill?"
User: "my-workflow-name"
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Comment on lines +67 to +73

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align Quick Start command with documented skill name.

The example uses save, but the text above specifies /kaizen:save. If the invocation must be fully qualified, this could confuse users. Consider making the example consistent.

✏️ Proposed doc tweak
-User: "save"
+User: "/kaizen:save"
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

[warning] 71-71: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🤖 Prompt for AI Agents
In `@plugins/kaizen/README.md` around lines 67 - 73, The Quick Start example is
inconsistent with the documented invocation: the text specifies the fully
qualified command `/kaizen:save` but the interaction example uses `save`; update
the example to use `/kaizen:save` (or explicitly show both forms and clarify
which is required) so the documented skill name and the sample dialogue match
(search for the example block that contains "User: \"save\"" and change it to
"User: \"/kaizen:save\"" or add a clarifying note).


See [SAVE_SKILL.md](SAVE_SKILL.md) for detailed documentation.

## Guidelines Storage

Guidelines are stored in `.claude/guidelines.json`:
Expand All @@ -73,7 +98,7 @@ Guidelines are stored in `.claude/guidelines.json`:

## Verification

After installation, run `claude plugin list` to confirm the plugin is enabled. See [INSTALL.md](INSTALL.md) for detailed verification steps.
After installation, run `claude plugin list` to confirm the plugin is enabled.

## Plugin Structure

Expand All @@ -82,9 +107,11 @@ kaizen/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── skills/
│ ├── guideline-generator/
│ ├── learn/
│ │ └── SKILL.md
│ ├── recall/
│ │ └── SKILL.md
│ └── guideline-retrieval/
│ └── save/
│ └── SKILL.md
├── hooks/
│ └── hooks.json # Auto-configured hooks
Expand Down
Loading