Claude Code Plugin
Automatically save conversation facts and inject context into prompts.
Installation
npx @audaxic/memory-claude install
This will:
- Prompt for your Audaxic API key (saved to
~/.config/audaxic/config.json) - Copy the plugin to
~/.claude/skills/audaxic-memory/ - Configure the Audaxic MCP server (
.mcp.jsonwith your API key)
The plugin auto-loads on your next Claude Code session.
Get your API key from: memory-dashboard.audaxic.com
How It Works
The plugin combines three mechanisms:
Skill → auto-search on questions
An Agent Skill (skills/audaxic-memory/SKILL.md) instructs Claude to search Audaxic Memory before answering questions about your past decisions, projects, and preferences — then answer directly from the results.
MCP server → trusted memory tools
The plugin bundles the Audaxic MCP server (.mcp.json), giving Claude search_memories / add_memory / get_memories tools. MCP tool results are trusted by Claude, so memory recall actually reaches the answer.
Hooks → background saving
- UserPromptSubmit → inject.mjs — buffers your prompt and injects context via
additionalContext(a passive enhancement — injection may be deprioritized by Claude Code, which is why the skill + MCP path exists) - Stop → capture.mjs — buffers the assistant's response; flushes to
POST /addat 30 messages
Architecture
┌──────────────────────────────────────────────────────────────┐
│ Claude Code │
│ │
│ User types prompt │
│ │ │
│ ▼ │
│ UserPromptSubmit ──► inject.js │
│ │ ├─ buffer user prompt to disk │
│ │ └─ POST /search → additionalContext │
│ ▼ │
│ Claude responds │
│ │ │
│ ▼ │
│ Stop ──────────────► capture.js │
│ ├─ buffer assistant msg to disk │
│ └─ if buffer >= 30 → POST /add │
└──────────────────────────────────────────────────────────────┘
API Key
The plugin uses your API key in this order:
CLAUDE_PLUGIN_OPTION_API_TOKEN— set via the plugin's userConfig prompt during/plugin install~/.config/audaxic/config.json— shared config used by all Audaxic integrations
The key is also written into the plugin's .mcp.json at install time (mode 0600) so the MCP server authenticates automatically.
Uninstall
rm -rf ~/.claude/skills/audaxic-memory
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
https://api.memory.audaxic.com/search | POST | Search memories for context injection |
https://api.memory.audaxic.com/add | POST | Save conversation messages in batch |
Behavioral Triggers
AUTO-SEARCH before:
- Making architectural decisions
- Adding new dependencies
- Fixing bugs (check for prior solutions)
- Starting new sessions (load preferences)
AUTO-SAVE after:
- User states a preference
- Decision with rationale made
- Complex bug fixed
- Project conventions learned
DO NOT save:
- Temporary state, debug info, secrets
Content Rules
- One fact per memory
- Natural language, not keywords
- Include reasoning, not just outcomes
- Be specific for better semantic matching
Lifecycle
Add → Search → Update (delete + re-add) → Delete (when obsolete)
Troubleshooting
Plugin not loading
- Verify the plugin exists:
ls ~/.claude/skills/audaxic-memory/ - Verify API key is set:
cat ~/.config/audaxic/config.json - Restart Claude Code after installing the plugin
Context not being injected
- Check that
inject.mjsexists in the plugin directory - Verify API key is valid at memory-dashboard.audaxic.com
- Check network connectivity to
api.memory.audaxic.com
Messages not saving
- Check that
capture.mjsexists in the plugin directory - Check the buffer file for pending messages
- Verify API endpoint is reachable