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 codeledgerECFv0.10.82MIT
ContextECF CodeLedger: deterministic context selection and agent governance for AI coding agents. Scores every file across 10 signals and delivers a minimal, ranked context bundle — so your agent reads the right files first. Install the CLI from @codeledger/cli, not the unrelated unscoped codeledger package.
Claude loads one when your task matches it, or you run it by name.
1 caution to review before installing
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
context, contextecf, codeledger, context-selection, agent, coding-agent, deterministic, bundle ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Your agent reads the right files first. Every time.
ContextECF CodeLedger is a deterministic context selection and agent governance engine for AI coding agents. It scans your repository, scores every file across 10 weighted signals, and delivers a minimal, ranked context bundle — so your agent starts with the files that matter most, not a random walk through your codebase. Works with Claude Code, Codex, Cursor, Gemini CLI, Aider, and more. See the changelog for the latest improvements.
| Without CodeLedger | With CodeLedger |
|---|---|
| Agent explores randomly, reads 40+ files | Agent reads 8-15 targeted files |
| Wastes tokens on irrelevant context | Stays within a strict token budget |
| Loses orientation after context compaction | Recovers instantly via progress snapshots |
| Different runs, different file choices | Same task = same bundle (deterministic) |
Every release is gated by automated quality benchmarks across real-world task scenarios:
| Metric | Default Budget | Tight Budget |
|---|---|---|
| Recall (relevant files found) | 100% | 100% |
| Precision (noise excluded) | 32% | 62.5% |
| Must-hit rate (critical files) | 100% | 100% |
Recall is the priority: the agent should never miss a file it needs. Precision improves with tighter budgets.
npm install -g @codeledger/cli
Use the scoped package exactly as shown. Do not install the unrelated unscoped codeledger npm package.
Requires Node.js >= 20 and Git.
claude plugin install codeledger
codeledger ready --task "describe your task here"
This single command initializes CodeLedger if needed, scans the repo, checks ambient setup, scores all files against your task, and writes .codeledger/active-bundle.md with the result.
The plugin now matches the repo-local CLI and broker flow:
codeledger broker sync to apply the meaningful-task rule and
write refresh/current/timeline artifacts in one CLI callUse these broker surfaces when you want explicit, structured context during a live session:
codeledger broker refresh --task "your updated task" --json
codeledger broker current --json
codeledger broker timeline --limit 10 --json
The intended order is:
rg only as fallbackThe broker response includes retrievalContract.schema_version: "codeledger/broker-first/v1".
The plugin hook also writes .codeledger/runtime/latest-broker-contract.json beside the
latest refresh/current/timeline artifacts so agent sessions can verify the broker-first
order before using raw search.
The plugin resolves the CLI in the same order as repo-local hooks:
./.codeledger/bin/codeledgernode .codeledger/bin/codeledger-standalone.cjsnode packages/cli/bin/codeledger-standalone.cjscodeledgerPlugin hooks are also session-aware: they reuse the active CODELEDGER_SESSION or PID marker so refresh, progress, and summary operate on the same per-session bundle and truth state as the built-in hook flow.
Use /codeledger:activate at the start of any task. The agent gets a ranked bundle of the most relevant files with scores, reasons, and code excerpts.
/codeledger:activate Fix null handling in getUserById
For long-running, multi-step work, Cowork mode adds lifecycle management — the plugin automatically runs a session bootstrap on session start (ensure-session: init-if-missing + warm scan/index), takes progress snapshots before compaction, and prints recall/precision metrics when the session ends.
/codeledger:cowork-start Refactor the authentication middleware
The agent stays oriented across the entire session, even through context compaction events.
These fire automatically — no user action needed:
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: hooks: hooks.PreToolUse: must be an array of matchers; received an object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed, hooks: Invalid input, skills: Invalid input
.claude-plugin/plugin.json: hooks: hooks.PreToolUse: must be an array of matchers; received an object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed, hooks: Invalid input, skills: Invalid input
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Plugins from other owners that cover similar ground
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.