Skip to content

contextstream/claude-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContextStream for Claude Code

Persistent memory for Claude Code. Your decisions, lessons, and project context automatically saved and restored across sessions.

Installation

From Claude Code Plugin Marketplace

/plugin marketplace add contextstream/claude-code
/plugin install contextstream

Prerequisites

Set Your API Key

export CONTEXTSTREAM_API_KEY="your-api-key"

Add to your shell profile (~/.zshrc or ~/.bashrc) to persist.

What It Does

The plugin uses Claude Code hooks to automatically:

  • Load context on session start - Previous decisions, lessons, active tasks
  • Inject smart context per message - Relevant information based on what you're working on
  • Capture your work - File changes, commands, and patterns indexed automatically
  • Learn from errors - Mistakes become lessons that surface in future sessions
  • Preserve sessions - Full context saved before compaction, restored after

No manual tool calls needed. Hooks run automatically.

How It Works

Hook When What It Does
session-init Session start Loads decisions, lessons, tasks, plans
smart-context Every message Fetches relevant context for your query
on-file-change Edit/Write Indexes changes, updates dependency graph
on-bash Bash commands Captures commands, learns from errors
pre-compact Before compaction Saves full conversation state

CLI Scripts

Claude can run these when explicit actions are needed:

Script Usage Description
cs-search.sh cs-search.sh "query" Search memory and code
cs-recall.sh cs-recall.sh "question" Natural language recall
cs-capture.sh cs-capture.sh decision "..." Capture decision or lesson
cs-todos.sh cs-todos.sh list Manage todos
cs-plans.sh cs-plans.sh list Manage implementation plans

Verify Installation

Start a new Claude Code session. You should see ContextStream context injected:

<contextstream>
  <session id="...">
    <workspace>Your Workspace</workspace>
    <project>your-project</project>
  </session>
  ...
</contextstream>

Troubleshooting

No context appearing?

  • Check API key: echo $CONTEXTSTREAM_API_KEY
  • Verify plugin: /plugin list

API errors?

Scripts not found?

  • Ensure jq is installed: jq --version

Support

License

MIT

About

Automatic memory and context for Claude Code. Decisions, lessons, and project context injected into every session via hooks.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages