From mama
Automatically injects lightweight teasers of relevant MAMA memory decisions (topic, similarity, time) before Claude responds on user messages. Provides background context for code work via hooks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mama:mama-contextThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides **automatic background context injection** using MAMA's hook system. It runs silently and surfaces relevant past decisions via the UserPromptSubmit hook (~150ms latency with HTTP embedding server).
This skill provides automatic background context injection using MAMA's hook system. It runs silently and surfaces relevant past decisions via the UserPromptSubmit hook (~150ms latency with HTTP embedding server).
Philosophy: Gentle hints, not intrusive walls of text. Claude sees topic + time, decides if relevant.
The skill uses a multi-hook system for comprehensive context injection:
UserPromptSubmit Hook (active, ~150ms — no plugin-side script; handled by Claude Code host)
SessionStart Hook (scripts/sessionstart-hook.js)
PreToolUse Hook (scripts/pretooluse-hook.js) - disabled (script retained)
PostToolUse Hook (scripts/posttooluse-hook.js) - disabled (script retained)
PreCompact Hook (scripts/precompact-hook.js)
💡 MAMA: 2 related
• authentication_strategy (85%, 3 days ago)
• mesh_detail (78%, 1 week ago)
/mama:search <topic> for details
Why teaser?
/mama:search if neededEvery injection shows current tier status:
Tier 1 (Full Features):
🔍 System Status: ✅ Full Features Active (Tier 1)
- Vector Search: ✅ ON (Transformers.js, 3ms latency)
- Search Quality: HIGH (80% accuracy)
Tier 2 (Degraded):
🔍 System Status: ⚠️ DEGRADED MODE (Tier 2)
- Vector Search: ❌ OFF (embedding model failed)
- Search Quality: BASIC (40% accuracy, exact match only)
⚠️ Fix: Check embedding model installation
Disable Skill:
# Environment variable
export MAMA_DISABLE_HOOKS=true
# Or in config file (~/.mama/config.json)
{
"disable_hooks": true
}
Adjust Thresholds:
{
"similarity_threshold": 0.7,
"token_budget": 40,
"rate_limit_ms": 1000
}
Note:
similarity_threshold: 0.7applies to explicit searches (/mama:search). The disabledpretooluse-hook.jsuses a looserSIMILARITY_THRESHOLD = 0.6(kept from its original contract-injection design). The active UserPromptSubmit hook delegates search to the MCP server, which uses its own default threshold. Hook thresholds are intentionally separate from the config value shown above.
✅ Automatic (no action needed):
❌ Don't explicitly invoke this skill:
/mama:search for explicit lookupsHook Integration:
scripts/sessionstart-hook.js (initialization)scripts/pretooluse-hook.js (disabled, script retained)scripts/posttooluse-hook.js (disabled, script retained)scripts/precompact-hook.js (decision preservation)Performance:
Search Algorithm:
User edits a file related to authentication:
Skill injects (via UserPromptSubmit hook):
💡 MAMA: 1 related
• auth_strategy (90%, 2 days ago)
/mama:search auth_strategy for full decision
🔍 System Status: ✅ Full Features Active (Tier 1)
Claude sees the hint and can:
/mama:search auth_strategy to userTesting:
# Test SessionStart hook (the only testable standalone hook)
node packages/claude-code-plugin/scripts/sessionstart-hook.js
# UserPromptSubmit hook is triggered automatically by Claude Code
# on every user message — no manual invocation needed.
Architecture:
User submits prompt
↓
UserPromptSubmit Hook (~150ms, 1800ms timeout)
↓
Decision search (generate embedding, search, score)
↓
Context injection to Claude (40-token teaser)
↓
Claude sees context
docs/MAMA-ARCHITECTURE.md (Decision 4 - Hook Implementation)npx claudepluginhub jungjaehoon-lifegamez/mama --plugin mamaClaude Code extensibility and configuration reference: plugins, hooks, skills, subagents, MCP servers, output styles, memory, settings, and model configuration. Invoke whenever Claude Code itself is the subject — questions, configuration, building extensions, debugging, or understanding internals.
Guides agents to deliberately search or skip memory using dejavu MCP tools, with query strategies and metadata filters for decisions, user preferences, conventions, and anti-patterns.
Integrates mnemonic memory capture and recall into existing Claude Code plugins using sentinel markers for updates, removal, and git rollback. Triggers on integrate/wire/add memory requests.