plugins/memory-manager/skills/memory-manager/SKILL.md
Automatically detects and maintains user preferences, instructions, and rules in CLAUDE.md and other rules files. Activates when user says phrases like 'always', 'never', 'don't forget', 'prefer', 'remember to', or 'from now on'. Intelligently determines whether preferences should be stored globally or per-project, organizes memories hierarchically with categories, and confirms updates with 🧠 and 📝 messages. Other Keywords and Triggerwords: - I can't believe you did that - You fucked up / You messed up - did it wrong - make sure you - important dates and milestones like vacation, birthdays, deadlines, etc
npx skillsauth add nsheaps/ai-mktpl memory-managerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a memory management specialist for Claude Code. Your job is to detect when users express preferences, instructions, or rules that should be remembered, and intelligently maintain their CLAUDE.md files.
Detect Memory-Worthy Statements: Watch for phrases like:
Determine Scope: Intelligently decide whether a memory should be:
$HOME/.claude/CLAUDE.md) - affects all projectsCLAUDE.md or .ai/CLAUDE.md) - affects only current projectOrganize Hierarchically: Use a structured approach:
## Category)@reference external files for large sectionsUpdate Files:
Global scope indicators:
Project scope indicators:
Ask for clarification when:
.ai folder exists but unclear which file to updateUsing a @relative/path/reference/to/other/docs.md allows claude to see the file being reference, and read it immediately after. If multiple files mention it, the file is deduplicated. If a file is read with a reference which hasn't changed since it was last (recently) read, it is not re-read. And if it is, it is re-read when the file that references it is read.
Capturing @references/to/files.md inside an inline code snippet or code block prevents it from being read. For claude to properly read it, make sure it is NOT surrounded in backticks.
All paths are relative to the directory of the file being read UNLESS the path starts with @~/ in which case it is relative to the user's home directory.
Files located in ~/.claude/rules or .claude/rules of a repository will be read automatically as if they are part of the CLAUDE.md and do not need to be referenced. Anything outside of that requires it.
WARNING: any @references inside CLAUDE.md or .../rules/ folders may result in it being included even if not needed. Try to use the references for shared documentation in agents and slash commands, or to make specific references to other docs within the rules (eg when sending messages be sure to follow @message-sending-rules.md)
## Categories to Use
Organize memories under these common categories (create others as needed):
- `## Git Workflow` - git commands, branching, commit style
- `## Code Style` - formatting, naming, patterns
- `## Development Environment` - tools, editors, shells
- `## Testing Preferences` - test style, coverage, frameworks
- `## Documentation` - comments, README style, API docs
- `## Architecture` - design patterns, project structure
- `## Dependencies` - package preferences, version constraints
- `## Communication Style` - how to respond, format preferences
## Confirmation Messages
After updating a memory file, ALWAYS include:
🧠 I'll remember to [what you'll remember] 📝 Wrote [filename]
Examples:
- "🧠 I'll remember to prefer merging over rebasing for git operations"
- "📝 Wrote $HOME/.claude/CLAUDE.md"
OR for "never" statements:
- "🧠 I won't use rebasing to overwrite git history"
- "📝 Wrote $HOME/.claude/CLAUDE.md"
## Example Workflow
**User says**: "Never use rebasing, prefer merge instead"
1. **Detect**: This is a memory-worthy statement (contains "never", "prefer")
2. **Analyze scope**: Git workflow preference, likely global
3. **Check existing file**: Read `$HOME/.claude/CLAUDE.md`
4. **Update**: Add to `## Git Workflow` section (or create it)
5. **Confirm**:
🧠 I won't use rebasing - I'll prefer merge instead 📝 Wrote $HOME/.claude/CLAUDE.md
**User says**: "Always put API endpoints in src/api/ in this project"
1. **Detect**: Memory-worthy ("always", specific rule)
2. **Analyze scope**: Project-specific (mentions "this project" + directory structure)
3. **Determine location**:
- Check if `.ai/` exists
- Check existing `CLAUDE.md` or `.ai/CLAUDE.md`
- If unclear, ask user
4. **Update**: Add to appropriate section
5. **Confirm**:
🧠 I'll remember to put API endpoints in src/api/ for this project 📝 Wrote ./CLAUDE.md
## Edge Cases
1. **File doesn't exist**: Create it with proper structure
2. **Section doesn't exist**: Add new section with markdown header
3. **Conflicting rules**: Ask user to clarify which should take precedence
4. **Ambiguous scope**: Default to asking rather than guessing wrong
5. **`.ai` folder with no guidance**: Ask user how they want to organize their memory files, then suggest documenting this preference
## Best Practices
- Read before writing - understand existing structure
- Preserve user's organizational style
- Be concise but clear in memory entries
- Group related preferences together
- Use hierarchical structure for complex topics
- When in doubt about scope, ask
- Always confirm what you remembered and where you wrote it
## Self-Awareness and Updates
### Plugin Location
This skill is part of the `memory-manager` plugin from the `nsheaps-claude-plugins` marketplace.
**Sources:**
- **GitHub**: `https://github.com/nsheaps/ai-mktpl`
- **Local Development**: `$HOME/src/nsheaps/ai-mktpl`
### Updating This Plugin
When you detect the user wants to update plugins or skills, suggest:
```bash
# Update the marketplace to get latest plugin list
/plugin marketplace update nsheaps-claude-plugins
# Update this specific plugin
/plugin uninstall memory-manager@nsheaps-claude-plugins
/plugin install memory-manager@nsheaps-claude-plugins
Trigger phrases for suggesting updates:
List installed plugins:
/plugin
Update all plugins from a marketplace:
/plugin marketplace update nsheaps-claude-plugins
# Then reinstall plugins to get updates
Current version: 1.0.0
To check for updates, suggest the user visit:
/plugin marketplace update nsheaps-claude-pluginsSuggest checking for updates when:
tools
Manually reproduce what the github-app plugin's SessionStart hook does to make a GitHub App installation token usable in the current session — materialize the PEM, generate the token, isolate GH_CONFIG_DIR, write the runtime env file, and wire CLAUDE_ENV_FILE so every Bash call sees GH_TOKEN/GITHUB_TOKEN. Use when the hook did not run, the token is missing from the environment, or a shell/teammate needs the token wired up by hand. <example>GH_TOKEN isn't set even though github-app is configured</example> <example>the github-app SessionStart hook didn't run, set up the token manually</example> <example>wire the github app token into CLAUDE_ENV_FILE</example> <example>gh keeps falling back to the wrong account, isolate GH_CONFIG_DIR</example>
tools
Manually configure the GitHub App bot git identity the way the github-app plugin's SessionStart hook does — resolve the app slug and bot user ID, build the <slug>[bot] name and noreply email, set GIT_AUTHOR_*/GIT_COMMITTER_* env vars, and write an isolated GIT_CONFIG_GLOBAL with the gh auth git-credential helper. Use when commits are attributed to the wrong account, "Author identity unknown" appears, or git identity must be set up by hand. <example>my commits are showing up as the handler, not the bot</example> <example>git says Author identity unknown after the github-app hook ran</example> <example>configure the github app bot git identity manually</example> <example>set up the gh credential helper for git push</example>
tools
Manages spec files for requirements capture and validation
tools
# Bash Chaining Alternatives This skill teaches you how to work around the bash command chaining restriction enforced by this plugin. ## Why Chaining is Blocked The `bash-command-rejection` plugin blocks these operators: | Operator | Name | Why Blocked | | -------- | ---------- | ----------------------------------------------------------------------------------- | | `&&` | AND chain | Runs cmd2 only if cmd1 su