Skip to content

Commit 7dc5cb6

Browse files
committed
feat: add memory-manager plugin for intelligent CLAUDE.md management
Introduces a new agent skill that automatically detects and maintains user preferences, instructions, and rules in CLAUDE.md files. The skill activates when users express preferences using phrases like "always", "never", "don't forget", "prefer", etc. Key features: - Smart scope detection (global vs project-specific) - Hierarchical organization with markdown sections - Support for @reference and bash command syntax - Self-updating with GitHub integration - Clear confirmation messages (🧠 and 📝) Includes comprehensive installation guides (CLI and interactive methods) and registers the plugin in the marketplace catalog.
1 parent 3fceaea commit 7dc5cb6

5 files changed

Lines changed: 516 additions & 0 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@
3232
"category": "git",
3333
"tags": ["git", "skill", "ai", "automation"],
3434
"keywords": ["git", "commit", "skill", "smart-commit", "auto-commit"]
35+
},
36+
{
37+
"name": "memory-manager",
38+
"description": "Intelligent memory management for CLAUDE.md files with automatic preference detection",
39+
"version": "1.0.0",
40+
"author": {
41+
"name": "Nathan Heaps"
42+
},
43+
"source": "./plugins/memory-manager",
44+
"category": "productivity",
45+
"tags": ["memory", "preferences", "context", "automation"],
46+
"keywords": ["memory", "preferences", "claude.md", "context", "instructions"]
3547
}
3648
]
3749
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "memory-manager",
3+
"version": "1.0.0",
4+
"description": "Intelligent memory management for CLAUDE.md files. Automatically detects and stores user preferences, rules, and instructions with smart scope detection and hierarchical organization.",
5+
"author": "Nathan Heaps",
6+
"keywords": ["memory", "preferences", "claude.md", "context", "instructions"],
7+
"homepage": "https://github.com/nsheaps/.ai",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/nsheaps/.ai.git",
11+
"directory": "plugins/memory-manager"
12+
}
13+
}
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# CLI Installation (No Chat Required)
2+
3+
You can install and manage plugins directly from your terminal using the `claude` command.
4+
5+
## Install from Command Line
6+
7+
### Add Marketplace
8+
9+
```bash
10+
# Add GitHub marketplace
11+
claude plugin marketplace add nsheaps/.ai
12+
13+
# Or add local marketplace for development
14+
claude plugin marketplace add ~/src/nsheaps/.ai
15+
```
16+
17+
### Install Plugin
18+
19+
```bash
20+
# Install to user scope (default - available in all projects)
21+
claude plugin install memory-manager@nsheaps-ai-plugins
22+
23+
# Install to project scope (shared with team via git)
24+
cd /your/project
25+
claude plugin install memory-manager@nsheaps-ai-plugins --scope project
26+
27+
# Install to local scope (project-specific, gitignored)
28+
cd /your/project
29+
claude plugin install memory-manager@nsheaps-ai-plugins --scope local
30+
```
31+
32+
### List and Manage Plugins
33+
34+
```bash
35+
# List available marketplaces
36+
claude plugin marketplace list
37+
38+
# Update marketplace (or update all with no name)
39+
claude plugin marketplace update nsheaps-ai-plugins
40+
41+
# Update a specific plugin to latest version
42+
claude plugin update memory-manager@nsheaps-ai-plugins
43+
44+
# Enable/disable plugins
45+
claude plugin enable memory-manager@nsheaps-ai-plugins
46+
claude plugin disable memory-manager@nsheaps-ai-plugins
47+
48+
# Uninstall plugin
49+
claude plugin uninstall memory-manager@nsheaps-ai-plugins
50+
51+
# Remove marketplace
52+
claude plugin marketplace remove nsheaps-ai-plugins
53+
54+
# Validate plugin manifest (for development)
55+
claude plugin validate ~/src/nsheaps/.ai/plugins/memory-manager
56+
```
57+
58+
## Quick Setup Script
59+
60+
Save this as `install-memory-manager.sh`:
61+
62+
```bash
63+
#!/bin/bash
64+
set -e
65+
66+
echo "🔧 Installing Memory Manager plugin..."
67+
68+
# Add marketplace
69+
claude plugin marketplace add nsheaps/.ai
70+
71+
# Install plugin
72+
claude plugin install memory-manager@nsheaps-ai-plugins
73+
74+
echo "✅ Installation complete!"
75+
echo ""
76+
echo "Test it by starting claude and saying:"
77+
echo ' "Never use git rebase, prefer merge"'
78+
```
79+
80+
Make it executable and run:
81+
82+
```bash
83+
chmod +x install-memory-manager.sh
84+
./install-memory-manager.sh
85+
```
86+
87+
## Update Script
88+
89+
Save this as `update-plugins.sh`:
90+
91+
```bash
92+
#!/bin/bash
93+
set -e
94+
95+
echo "🔄 Updating plugins..."
96+
97+
# Update marketplace to fetch latest plugin info
98+
claude plugin marketplace update nsheaps-ai-plugins
99+
100+
# Update the plugin to latest version
101+
claude plugin update memory-manager@nsheaps-ai-plugins
102+
103+
echo "✅ Update complete!"
104+
echo "⚠️ Restart Claude Code to apply changes"
105+
```
106+
107+
## Check What's Installed
108+
109+
```bash
110+
# See all marketplaces
111+
claude plugin marketplace list
112+
113+
# Check settings file directly to see installed plugins
114+
cat ~/.claude/settings.json | jq '.enabledPlugins'
115+
116+
# Or view the entire settings
117+
cat ~/.claude/settings.json | jq '.'
118+
119+
# For project-specific plugins
120+
cat .claude/settings.json | jq '.enabledPlugins'
121+
```
122+
123+
**Note:** There doesn't appear to be a `claude plugin list` command. Use the settings files or the `/plugin` slash command in chat to see installed plugins.
124+
125+
## Troubleshooting
126+
127+
If `claude plugin` doesn't work:
128+
129+
1. **Check Claude CLI is installed:**
130+
```bash
131+
which claude
132+
claude --version
133+
```
134+
135+
2. **Check help:**
136+
```bash
137+
claude --help
138+
claude plugin --help
139+
```
140+
141+
3. **Verify marketplace path:**
142+
```bash
143+
ls ~/src/nsheaps/.ai/.claude-plugin/marketplace.json
144+
```
145+
146+
## Configuration Files
147+
148+
Plugins are configured in these files:
149+
150+
- **User scope**: `~/.claude/settings.json`
151+
- **Project scope**: `<project>/.claude/settings.json`
152+
- **Local scope**: `<project>/.claude/settings.local.json` (gitignored)
153+
154+
You can also manually edit these files:
155+
156+
```json
157+
{
158+
"enabledPlugins": ["memory-manager@nsheaps-ai-plugins"],
159+
"extraKnownMarketplaces": {
160+
"nsheaps-ai-plugins": {
161+
"source": {
162+
"source": "github",
163+
"repo": "nsheaps/.ai"
164+
}
165+
}
166+
}
167+
}
168+
```
169+
170+
After manually editing, restart Claude or run:
171+
```bash
172+
claude plugin list # to refresh
173+
```

plugins/memory-manager/INSTALL.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Quick Installation Guide
2+
3+
## Install Memory Manager Plugin
4+
5+
### Option 1: Install from GitHub (Recommended)
6+
7+
```bash
8+
# 1. Add the GitHub marketplace
9+
/plugin marketplace add nsheaps/.ai
10+
11+
# 2. Install the memory-manager plugin
12+
/plugin install memory-manager@nsheaps-ai-plugins
13+
14+
# 3. Verify installation
15+
/plugin
16+
```
17+
18+
### Option 2: Install from Local Development Version
19+
20+
```bash
21+
# 1. Add the local marketplace
22+
/plugin marketplace add ~/src/nsheaps/.ai
23+
24+
# 2. Install the memory-manager plugin
25+
/plugin install memory-manager@nsheaps-ai-plugins
26+
27+
# 3. Verify installation
28+
/plugin
29+
```
30+
31+
You should see `memory-manager@nsheaps-ai-plugins` in your installed plugins list.
32+
33+
## Updating the Plugin
34+
35+
To get the latest version:
36+
37+
```bash
38+
# 1. Update the marketplace
39+
/plugin marketplace update nsheaps-ai-plugins
40+
41+
# 2. Reinstall the plugin to get updates
42+
/plugin uninstall memory-manager@nsheaps-ai-plugins
43+
/plugin install memory-manager@nsheaps-ai-plugins
44+
```
45+
46+
Or simply ask Claude: "update my memory manager plugin"
47+
48+
## Test the Skill
49+
50+
Try saying one of these phrases to test the memory manager:
51+
52+
- "Never use git rebase, always prefer merge"
53+
- "Don't forget to run tests before committing"
54+
- "Always use TypeScript in this project"
55+
56+
You should see a response like:
57+
```
58+
🧠 I'll remember to [what you said]
59+
📝 Wrote [filename]
60+
```
61+
62+
## Troubleshooting
63+
64+
If the plugin doesn't appear:
65+
66+
```bash
67+
# Update the marketplace
68+
/plugin marketplace update nsheaps-ai-plugins
69+
70+
# Try installing again
71+
/plugin install memory-manager@nsheaps-ai-plugins
72+
```
73+
74+
If the skill doesn't activate:
75+
76+
```bash
77+
# Check if it's installed
78+
/plugin
79+
80+
# Manually invoke it
81+
/skill memory-manager
82+
```

0 commit comments

Comments
 (0)