Claude Code
Skill memory plugin for Claude Code — auto-capture, auto-learn, cross-session skill sync
The Acontext plugin for Claude Code gives your agent cross-session skill memory. It captures conversations, extracts tasks, distills reusable Markdown skills, and syncs them to Claude Code's skill directory for automatic loading.
Quick Start
Add the marketplace and install the plugin
Inside Claude Code, run:
/plugin marketplace add memodb-io/Acontext
/plugin install acontextSet your environment variables
Get an API key from dash.acontext.io and export it in your shell profile (~/.bashrc or ~/.zshrc):
export ACONTEXT_API_KEY="<your-api-key>"
export ACONTEXT_USER_ID="<your-login-email>"Restart Claude Code
The plugin loads automatically. Every conversation is captured, tasks are extracted, and skills are distilled and synced to ~/.claude/skills/.
How It Works
Session 1: User talks to agent
└→ Messages stored to Acontext session (incremental capture)
└→ CORE extracts structured tasks
└→ Learning Space distills skills as Markdown
Session 2: User returns
└→ Skills synced to ~/.claude/skills/ (native loading)
└→ Claude Code auto-loads skill files from its skill directory
└→ New messages captured (incremental capture)
└→ Skills updated (auto-learn)The plugin hooks into Claude Code's lifecycle via MCP:
- On session start — Syncs learned skills to
~/.claude/skills/so Claude Code loads them natively - On session end — Stores new conversation messages, triggers task extraction and skill distillation
- On demand — Exposes MCP tools the agent can call mid-session (search skills, trigger learning, etc.)
Skills are synced as Markdown files that Claude Code loads natively. You can inspect, modify, and share these files directly in ~/.claude/skills/.
Configuration
All settings are via environment variables:
| Env Var | Default | Description |
|---|---|---|
ACONTEXT_API_KEY | — | Required. Acontext API key |
ACONTEXT_BASE_URL | https://api.acontext.app/api/v1 | API base URL |
ACONTEXT_USER_ID | "default" | Scope sessions per user |
ACONTEXT_LEARNING_SPACE_ID | auto-created | Explicit Learning Space ID |
ACONTEXT_SKILLS_DIR | ~/.claude/skills | Directory where skills are synced |
ACONTEXT_AUTO_CAPTURE | true | Store messages after each agent turn |
ACONTEXT_AUTO_LEARN | true | Trigger skill distillation after sessions |
ACONTEXT_MIN_TURNS_FOR_LEARN | 4 | Minimum turns before triggering auto-learn |
For self-hosted Acontext, set ACONTEXT_BASE_URL to your local API endpoint (e.g. http://localhost:8029/api/v1).
MCP Tools
The plugin registers these tools that your agent can call during conversations:
| Tool | Description |
|---|---|
acontext_search_skills | Search through skill files by keyword |
acontext_get_skill | Read the content of a specific skill file |
acontext_session_history | Get task summaries from recent past sessions |
acontext_stats | Show memory statistics (sessions, skills, configuration) |
acontext_learn_now | Trigger skill learning from the current session |
Troubleshooting
Plugin not loading
- Ensure
ACONTEXT_API_KEYis exported in your shell profile - Verify the plugin is installed:
/plugin list - Check Claude Code logs for
[info] acontext:or[warn] acontext:messages
No skills appearing
- Skills appear in
~/.claude/skills/after the first session ends - Check that
ACONTEXT_AUTO_LEARNis not set tofalse - Ensure at least
ACONTEXT_MIN_TURNS_FOR_LEARNturns have occurred
API returns 401
- Verify your API key with
acontext whoami - Re-login with
acontext login
Next Steps
Last updated on