Skip to content
ctxloom Logo

ctxloom

Context Loom - Weave context for AI coding agents

Why Use ctxloom?

Save Hours Per Week

Write context once, reuse across all sessions. Stop re-explaining your coding standards.

Consistent Across Projects

Store your standards in a git repo, pull into any project.

Share Across Teams

Shared remotes for org standards, personal remotes for yours.

Multi-LLM Support

Write once, run everywhere. Same context works with Claude Code, Gemini CLI, and more.

What ctxloom Does

CapabilityDescription
Context AssemblyCombine fragments into profiles, inject into Claude/Gemini via MCP
Slash CommandsPrompts become /commands in Claude Code and Gemini automatically
Session MemoryPersist context across /clear, recover seamlessly
Remote SyncPull bundles from GitHub/GitLab, lockfile for reproducibility
Token OptimizationAST-aware distillation compresses code/prose 70-90%

Quick Example

expressiveCode.terminalWindowFallbackTitle
# Initialize
ctxloom init
# Run with context fragments
ctxloom run -f go-development -f security "implement auth"
# Use a profile (pre-configured fragment set)
ctxloom run -p backend-developer "review this PR"
# Pull from remote
ctxloom fragment install ctxloom-main/testing

Slash Commands

Prompts in bundles become slash commands in Claude Code and Gemini CLI:

.ctxloom/bundles/my-tools.yaml
prompts:
code-review:
description: "Review code for issues"
content: |
Review this code for:
- Security vulnerabilities
- Performance issues
- Best practice violations

Then in your AI CLI:

/code-review src/auth.go

Session Memory

Claude Code’s /compact has a fundamental flaw: it needs context space to run, but you only think to use it when context is almost full. You try /compact, it fails, and you’re stuck.

ctxloom works after exhaustion:

  1. Clear - Run /clear when you hit context limits
  2. Recover - /recover distills the previous session from disk
  3. Continue - The summary is injected, you keep working
expressiveCode.terminalWindowFallbackTitle
# When you hit context limits
/clear
/recover

ctxloom reads the raw JSONL transcript from disk and uses a separate LLM (default: Haiku) to distill it - operating outside your exhausted context window.

ctxloom includes built-in commands:

  • /recover - Recover context from previous session after /clear
  • /loadctx - Browse and load from any recent session

How It Works

flowchart LR
    Bundles["Bundles<br/>(fragments)"] --> Profiles["Profiles<br/>(combos)"]
    Profiles --> Context["Context<br/>(assembled)"]
    Bundles --> Remotes["Remotes<br/>(GitHub/GL)"]
    Context --> AI["Claude/Gemini<br/>(via MCP)"]
  1. Bundles contain fragments (context), prompts (skills), and MCP servers
  2. Profiles combine bundles with inheritance and exclusions
  3. Context is assembled and injected via MCP protocol
  4. Remotes provide team sharing and community bundles

Core Concepts

ConceptWhat It Is
FragmentA piece of context (guidelines, patterns, examples)
PromptA saved prompt template, exposed as a slash command
BundleA versioned YAML containing fragments + prompts + MCP servers
ProfileA named configuration referencing bundles/tags
RemoteA GitHub/GitLab repository containing bundles

Installation

macOS / Linux:

expressiveCode.terminalWindowFallbackTitle
curl -fsSL https://raw.githubusercontent.com/ctxloom/ctxloom/main/scripts/install.sh | bash

Windows (PowerShell):

expressiveCode.terminalWindowFallbackTitle
irm https://raw.githubusercontent.com/ctxloom/ctxloom/main/scripts/install.ps1 | iex

More options (manual download, build from source, security verification)

Running

expressiveCode.terminalWindowFallbackTitle
# Standalone (wraps Claude/Gemini)
ctxloom run -p developer "help with code"
# As MCP server (integrate with existing Claude Code)
ctxloom mcp serve

Configuration

.ctxloom/config.yaml
defaults:
llm_plugin: claude-code
profiles:
- ctxloom-main/go-developer

Next Steps