By kaakati
Context-aware intelligence for Claude Code. Automatic codebase indexing, GPU-accelerated semantic RAG retrieval, and persistent cross-session memory.
Context-aware intelligence for Claude Code. Automatic codebase indexing, semantic RAG retrieval, and persistent cross-session memory.
ContextForge is a Claude Code plugin that transforms stateless coding sessions into context-aware, learning systems. It automatically indexes your codebase, retrieves relevant code via semantic search, captures coding conventions, and maintains persistent memory across sessions.
claude --plugin-dir /path/to/context_forge
ContextForge will automatically bootstrap on the first session start:
.contextforge/venvcd /path/to/your/project
bash /path/to/context_forge/scripts/bootstrap.sh
When a Claude Code session starts or resumes, ContextForge:
all-MiniLM-L6-v2 sentence transformer (GPU-accelerated when available)On each user prompt, ContextForge:
When files are written or edited, ContextForge:
Modified files are re-chunked and re-embedded in real time, keeping the RAG index current within the session.
| Command | Description |
|---|---|
/contextforge:context-status | Show index state, file counts, conventions |
/contextforge:context-rebuild | Force full re-index of the codebase |
/contextforge:context-memory | Manage persistent memory (list, clear, forget) |
ContextForge automatically detects and uses the best available compute device for embeddings:
| Device | When used |
|---|---|
| CUDA | NVIDIA GPU with CUDA drivers detected |
| MPS | Apple Silicon Mac (M1/M2/M3/M4) |
| CPU | Fallback when no GPU is available |
No configuration needed — detection is automatic. To force a specific device, set embedding.device in your config:
{
"embedding": {
"device": "cpu"
}
}
ContextForge uses sensible defaults. To customize, create .contextforge/config.json in your project:
{
"retrieval": {
"relevance_threshold": 0.4,
"max_results": 10
},
"memory": {
"convention_threshold": 5
},
"indexing": {
"max_file_size_bytes": 1048576
}
}
See config/defaults.json for all available options.
All ContextForge data is stored in .contextforge/ within your project directory:
| File | Purpose |
|---|---|
embeddings.db | SQLite database of code chunk embeddings |
memory.db | Conventions and file change history |
graph.json | Knowledge graph of file relationships |
index_state.json | Git watermark for incremental indexing |
venv/ | Python virtual environment |
models/ | Cached embedding model files |
config.json | User configuration overrides (optional) |
The .contextforge/ directory is automatically added to .gitignore.
ContextForge works on Windows, macOS, and Linux. The hook runner script uses bash (Git Bash on Windows) and all Python code uses pathlib.Path for path handling.
# Unit tests (requires pytest)
python -m pytest tests/ -v
# Integration test
bash tests/test_integration.sh
contextforge/
├── .claude-plugin/plugin.json # Plugin manifest
├── commands/ # Slash command definitions
├── skills/contextforge/ # Skill definition
├── hooks/hooks.json # Hook configuration
├── scripts/ # Hook scripts and bootstrap
│ └── lib/ # Core Python library modules
├── config/defaults.json # Default configuration
└── tests/ # Unit and integration tests
MIT - See LICENSE for details.
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub kaakati/context-forge --plugin contextforgeFlutter development with GetX state management, Clean Architecture, multi-agent orchestration, quality gates, comprehensive testing patterns, navigation, i18n, performance optimization, and accessibility patterns
Enterprise-grade Rails development workflow with multi-agent orchestration, beads task tracking, and quality gates. Generic and portable across any Rails project.
ReAcTree Rails development with multi-agent orchestration, LSP-powered context compilation, Guardian validation cycle for type safety, Solargraph/Sorbet/Rubocop integration with blocking quality gates, requirements translation (user stories to beads tasks), Pre/Post edit validation hooks, parallel execution, dual memory systems with 24h TTL caching, iterative control flow (LOOP, CONDITIONAL), backwards communication (FEEDBACK edges), Claude CLI intelligent intent detection with manifest-based agent/skill discovery, utility agents, UX Engineer, optimized model selection, and comprehensive skills library for A+ type-safe code
iOS and tvOS development with SwiftUI, MVVM, Clean Architecture, 14 specialized agents, 27 comprehensive skills, automated quality gates, hooks system, one-command setup (/ios-init), beads integration, offline sync, push notifications, tvOS focus navigation, accessibility testing, performance profiling, and dual memory systems
Generates a structural CODEBASE_MAP.md for LLM-assisted coding — extracts dependencies, interfaces, side effects, and merges human annotations.
A powerful code indexing tool with multi-platform support
Optimized file search, semantic indexing, and persistent memory for Claude Code — with optional sync to a self-hosted web dashboard
Persistent project memory for AI coding agents — semantic search, AST-aware chunking, dependency graphs, and conversation history
Persistent context for AI coding assistants
Auto-capture high-signal coding context into memctl memory
Automatic context engineering — observes your coding sessions and generates rules, suggestions, skills, and hooks so Claude gets smarter on your codebase over time