-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add save skill and improve kaizen plugin #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 on lines
+67
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align Quick Start command with documented skill name. The example uses ✏️ 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 |
||
|
|
||
| See [SAVE_SKILL.md](SAVE_SKILL.md) for detailed documentation. | ||
|
|
||
| ## Guidelines Storage | ||
|
|
||
| Guidelines are stored in `.claude/guidelines.json`: | ||
|
|
@@ -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 | ||
|
|
||
|
|
@@ -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 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.