Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By Zatev1.3.0MITIn 1 marketplace
Lets Claude carry decisions, patterns and observations from one session into the next, so you stop re-explaining conventions. Stored in a single SQLite file you own at ~/.ctx/store.db and injected at session start.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude Code agents are stateless. Every session starts from zero. ctx fixes that.
It's a Claude Code plugin that gives agents structured, persistent memory backed by a SQLite knowledge graph. Decisions, patterns, preferences, debugging insights — stored automatically and injected into every new session.
No more re-explaining your project conventions. No more re-discovering the same bugs. No more losing context when a session ends.
# Install the plugin
/plugin install ctx
# That's it. Memory is automatic.
# Claude will store knowledge as it learns.
# Everything persists to ~/.ctx/store.db
First session: ctx auto-downloads its binary and initializes the database.
Every session after: Your stored knowledge is injected automatically.
Manual check: /ctx:status shows what's stored.
Claude Code has a built-in MEMORY.md in ~/.claude/projects/<project>/memory/. Both ctx and MEMORY.md are loaded at session start.
Use both, but don't duplicate:
| Use MEMORY.md for... | Use ctx for... |
|---|---|
| Short reminders | Detailed decisions with rationale |
| Project-specific notes | Cross-project knowledge |
| Quick conventions | Structured patterns, observations |
| 1-2 line facts | Anything you'll want to query later |
Rule: If it's a decision, pattern, or observation - put it in ctx. If it's a quick project note - MEMORY.md is fine.
Session 1: You debug a tricky auth issue with Claude.
Claude stores the root cause as an observation.
Session 2: You hit a related problem.
Claude already knows what happened last time.
The lifecycle is fully automated via hooks:
<ctx:remember> commands in responses as it learns thingsEverything is stored in ~/.ctx/store.db — a single SQLite file you own.
Add the plugin to Claude Code. On first session, the ctx binary is automatically downloaded from GitHub releases and the database is initialized. No manual setup required.
To verify or manually install: /ctx:setup
| Command | What it does |
|---|---|
/ctx:status | Node counts, types, tiers, token usage |
/ctx:recall <query> | Query stored knowledge (e.g. type:decision AND tag:project:myapp) |
/ctx:setup | Manual install and verification |
/ctx:cleanup | Reconcile ctx and MEMORY.md — find duplicates, stale nodes, conflicts, bloat |
Agents can call the ctx binary directly for more control:
# Use --agent-out for dense AOF output (optimised for agent consumption)
ctx recall 'type:decision AND tag:project:myapp' --agent-out
ctx status --agent-out
ctx list --agent-out
# Recall with --inject queues results for injection at next prompt-submit
ctx recall 'tag:tier:reference' --inject
# doc subsystem — import markdown docs for agent-accessible decomposition
ctx doc import README.md # decompose into doc+content nodes
ctx doc show <doc-id> # show document metadata
ctx doc search "migration" # substring search over doc content (not FTS)
ctx doc promote <node-id> --into-memory --type fact # graduate content → memory
ctx doc export <doc-id> # recompose full markdown
# Discover all commands and flags
ctx --agent-help # index of all commands
ctx <cmd> --agent-help # detail for a specific command
Claude stores knowledge using XML commands in its responses:
<ctx:remember type="decision" tags="tier:pinned,project:myproject">
Chose gRPC over REST for internal service communication due to
streaming requirements and type safety from protobuf.
</ctx:remember>
| Type | When to use |
|---|---|
fact | Stable knowledge, user preferences, conventions |
decision | Choices with rationale |
pattern | Recurring approaches or techniques |
observation | Debugging insights, root causes |
hypothesis | Ideas worth revisiting later |
open-question | Unresolved questions to track |
Tiers control what gets loaded into context and when. Key question: Every session? → pinned. Someday? → reference. This task? → working.
7-day copy clicks
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground