Skip to content

virideanil/claude-code-toolbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-code-toolbox

Three small, independent utilities. Python standard library only. MIT.

tool what it does
mcp-watch/ restarts claude --continue when your MCP config changes
compact-recall/ captures context right before Claude Code compaction, hands it back on resume
okf-provenance/ an optional, signed provenance layer for OKF bundles — with a measured evaluation

mcp-watch

Claude Code reads .mcp.json/.claude.json once, at process start. Fix a stale API key, add a server — nothing takes effect until you restart, and nothing tells you that. mcp-watch watches those files and restarts claude --continue the moment they change. Run it instead of running claude directly. → README

compact-recall

Compaction is necessary but lossy. A PreCompact hook captures what's about to be discarded (summary, keywords, index entry, full raw text); a SessionStart hook hands it back the moment the session resumes. The same engine is callable any time, by anything with shell access:

python compact-recall/cli.py remember "..."
python compact-recall/cli.py recall "..."

README

How the two cooperate, without merging: before relaunching, mcp-watch sets one environment variable (CLAUDE_TOOLBOX_RESTART_REASON); compact-recall's SessionStart hook reads it and reports why the session restarted. That variable is the entire contract — neither tool imports the other, each works alone.

okf-provenance (PerceptionRationale)

OKF standardizes the container for knowledge. It doesn't say who produced a claim, where it came from, how, or why. This adds those four dimensions as one optional provenance: block a plain OKF reader safely ignores — plus explicit no-value/unknown-value markers (Wikidata's pattern), ed25519 signing for tamper evidence, and a scanner that lists what a corpus admits it doesn't know.

Measured, not just built — three experiments, the last on the 65 real documents of OKF's own example bundles, reported with the nulls: structure did not improve retrieval (plain BM25 already matches it); it made gaps queryable where text matching fails (1.000 vs 0.500 recall under varied phrasing) and tampering detectable at all. One field is proposed upstream: knowledge-catalog#168.

README — what it is and how to use it · RATIONALE — why each step followed the last · FINDINGS — every bug found, ours and upstream's

Install

Each tool is self-contained; see its README. Nothing auto-installs into your Claude Code config — hook snippets are copy-paste-yourself by design.

Requirements

Python 3.7+. No required third-party dependencies. okf-provenance's ed25519 signing tier is the one optional exception (pip install cryptography); without it, signing degrades to HMAC or plain-hash. The experiment statistics use scipy.

License

MIT — see LICENSE. One license for the whole repo.

About

Small, honest utilities for Claude Code and OKF: config-watch restarts, compaction recall, and a measured provenance layer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages