feat: add MemPalace Claude Code plugin with hooks and instructions
- Introduced README.md for plugin overview and installation instructions. - Added hooks configuration in hooks.json for auto-save and pre-compact functionality. - Implemented stop and pre-compact hooks in bash scripts for memory management. - Created marketplace.json and plugin.json for plugin metadata and versioning. - Developed skills and instructions for help, init, mine, search, and status functionalities. - Added CLI commands for executing hooks and displaying skill instructions. - Implemented hooks_cli.py for handling hook logic and JSON input/output. - Enhanced instruction files for user guidance on setup and usage. - Updated .gitignore to exclude additional files. - Created GitHub Actions workflow for syncing plugin version on push.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
# MemPalace Claude Code Plugin
|
||||
|
||||
A Claude Code plugin that gives your AI a persistent memory system. Mine projects and conversations into a searchable palace backed by ChromaDB, with 19 MCP tools, auto-save hooks, and 5 guided skills.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Python 3.9+
|
||||
|
||||
## Installation
|
||||
|
||||
### Claude Code Marketplace
|
||||
|
||||
```bash
|
||||
claude plugin add mempalace
|
||||
```
|
||||
|
||||
### Git
|
||||
|
||||
```bash
|
||||
claude plugin add --git https://github.com/milla-jovovich/mempalace
|
||||
```
|
||||
|
||||
### Local Clone
|
||||
|
||||
```bash
|
||||
claude plugin add /path/to/mempalace
|
||||
```
|
||||
|
||||
## Post-Install Setup
|
||||
|
||||
After installing the plugin, run the init command to complete setup (pip install, MCP configuration, etc.):
|
||||
|
||||
```
|
||||
/mempalace:init
|
||||
```
|
||||
|
||||
## Available Slash Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `/mempalace:help` | Show available tools, skills, and architecture |
|
||||
| `/mempalace:init` | Set up MemPalace -- install, configure MCP, onboard |
|
||||
| `/mempalace:search` | Search your memories across the palace |
|
||||
| `/mempalace:mine` | Mine projects and conversations into the palace |
|
||||
| `/mempalace:status` | Show palace overview -- wings, rooms, drawer counts |
|
||||
|
||||
## Hooks
|
||||
|
||||
MemPalace registers two hooks that run automatically:
|
||||
|
||||
- **Stop** -- Saves conversation context when a session ends.
|
||||
- **PreCompact** -- Preserves important memories before context compaction.
|
||||
|
||||
## MCP Server
|
||||
|
||||
The plugin automatically configures a local MCP server with 19 tools for storing, searching, and managing memories. No manual MCP setup is required -- `/mempalace:init` handles everything.
|
||||
|
||||
## Full Documentation
|
||||
|
||||
See the main [README](../README.md) for complete documentation, architecture details, and advanced usage.
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"description": "MemPalace auto-save and pre-compact hooks",
|
||||
"hooks": {
|
||||
"Stop": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/mempal-stop-hook.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"PreCompact": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/mempal-precompact-hook.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# MemPalace PreCompact Hook — thin wrapper calling Python CLI
|
||||
# All logic lives in mempalace.hooks_cli for cross-harness extensibility
|
||||
INPUT=$(cat)
|
||||
echo "$INPUT" | python3 -m mempalace hook run --hook precompact --harness claude-code
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# MemPalace Stop Hook — thin wrapper calling Python CLI
|
||||
# All logic lives in mempalace.hooks_cli for cross-harness extensibility
|
||||
INPUT=$(cat)
|
||||
echo "$INPUT" | python3 -m mempalace hook run --hook stop --harness claude-code
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "mempalace",
|
||||
"owner": {
|
||||
"name": "milla-jovovich",
|
||||
"url": "https://github.com/milla-jovovich"
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "mempalace",
|
||||
"source": ".",
|
||||
"description": "AI memory system — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, guided setup.",
|
||||
"version": "3.0.0",
|
||||
"author": {
|
||||
"name": "milla-jovovich"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "mempalace",
|
||||
"version": "3.0.0",
|
||||
"description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.",
|
||||
"author": { "name": "milla-jovovich" },
|
||||
"license": "MIT",
|
||||
"hooks": {
|
||||
"Stop": "hooks/mempal-stop-hook.sh",
|
||||
"PreCompact": "hooks/mempal-precompact-hook.sh"
|
||||
},
|
||||
"skills": [
|
||||
{ "name": "init", "file": "skills/init/SKILL.md" },
|
||||
{ "name": "search", "file": "skills/search/SKILL.md" },
|
||||
{ "name": "mine", "file": "skills/mine/SKILL.md" },
|
||||
{ "name": "help", "file": "skills/help/SKILL.md" },
|
||||
{ "name": "status", "file": "skills/status/SKILL.md" }
|
||||
],
|
||||
"commands": [
|
||||
{ "name": "mempalace:help", "description": "Show MemPalace help — available tools, skills, architecture", "skill": "help" },
|
||||
{ "name": "mempalace:init", "description": "Set up MemPalace — install, configure MCP, onboard", "skill": "init" },
|
||||
{ "name": "mempalace:search", "description": "Search your memories across the palace", "skill": "search" },
|
||||
{ "name": "mempalace:mine", "description": "Mine projects and conversations into the palace", "skill": "mine" },
|
||||
{ "name": "mempalace:status", "description": "Show palace overview — wings, rooms, drawer counts", "skill": "status" }
|
||||
],
|
||||
"mcp": {
|
||||
"mempalace": {
|
||||
"command": "python3",
|
||||
"args": ["-m", "mempalace.mcp_server"]
|
||||
}
|
||||
},
|
||||
"keywords": ["memory", "ai", "rag", "mcp", "chromadb", "palace", "search"],
|
||||
"repository": { "type": "git", "url": "https://github.com/milla-jovovich/mempalace" }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
name: help
|
||||
description: Show comprehensive MemPalace help — available skills, MCP tools, CLI commands, hooks, and architecture.
|
||||
---
|
||||
|
||||
Run the following command and display its output to the user:
|
||||
|
||||
```bash
|
||||
mempalace instructions help
|
||||
```
|
||||
|
||||
Display the output as-is — it's pre-formatted markdown.
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: init
|
||||
description: Set up MemPalace — install the package, initialize a palace, configure MCP server, and verify everything works.
|
||||
---
|
||||
|
||||
Run the following command to get setup instructions, then follow them step by step:
|
||||
|
||||
```bash
|
||||
mempalace instructions init
|
||||
```
|
||||
|
||||
If the command fails (mempalace not installed yet), first install it:
|
||||
|
||||
```bash
|
||||
pip install mempalace
|
||||
```
|
||||
|
||||
Then run the instructions command again and follow the output.
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
name: mine
|
||||
description: Mine projects and conversations into the MemPalace. Supports project files, conversation exports, and auto-classification.
|
||||
---
|
||||
|
||||
Run the following command to get mining instructions, then follow them:
|
||||
|
||||
```bash
|
||||
mempalace instructions mine
|
||||
```
|
||||
|
||||
Follow the returned instructions to mine the user's data.
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
name: search
|
||||
description: Search your memories across the MemPalace using semantic search with wing/room filtering.
|
||||
---
|
||||
|
||||
Run the following command to get search instructions, then follow them:
|
||||
|
||||
```bash
|
||||
mempalace instructions search
|
||||
```
|
||||
|
||||
Follow the returned instructions to execute the user's search query.
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
name: status
|
||||
description: Show the current state of your memory palace — wings, rooms, drawer counts, and suggestions.
|
||||
---
|
||||
|
||||
Run the following command to get status instructions, then follow them:
|
||||
|
||||
```bash
|
||||
mempalace instructions status
|
||||
```
|
||||
|
||||
Follow the returned instructions to display the palace status.
|
||||
Reference in New Issue
Block a user