What is clef-gate?
clef-gate is a Claude Code mod by dwain-barnes that asks a local Clef decision model whether an expensive tool call or subagent is actually needed before Claude Code pays for it. Logs every decision; shadow mode by default. It is listed under Agents & automation and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | dwain-barnes |
| Repository | dwain-barnes/clef-gate |
| Popularity | no public popularity data yet |
| Category | Agents & automation |
| Security | Review before installing (64/100) |
| Rank | #3,120 of 5,272 Claude Code mods; #238 in Agents & automation |
| License | Apache-2.0 |
| Last commit | 2026-10-04 |
| Hooks | 8 events |
| Sees | every tool call, subagent spawns |
| Draws on | PromptHint |
Is clef-gate safe to install?
clef-gate scores 64/100 on the MCPMods security check: Review before installing. Things to review: sends data over the network; writes files or config; reads environment variables. It passed 5 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| Sends data over the network | Review |
| Starts no processes | Pass |
| Writes files or config | Review |
| Reads environment variables | Review |
| Only sees the events it hooks | Pass |
| Doesn't drive Claude | Pass |
| Passes claude plugin validate | Pass |
| Has an open-source license | Pass |
API calls in its code
| Call | What it means |
|---|---|
$.clock.now | |
$.clock.sleep | |
$.command.register | |
$.env.get | reads env vars |
$.fs.list | reads files |
$.fs.read | reads files |
$.fs.write | writes files |
$.http.fetch | network requests |
$.session.id | |
$.session.messages | reads the transcript |
$.state.get | |
$.state.set | |
$.store.get | keeps its own state |
$.store.set | keeps its own state |
$.ui.invalidate | draws interface |
$.ui.toast | draws interface |
How do I install clef-gate?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/dwain-barnes/clef-gate claude plugin validate ./clef-gate/.
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add dwain-barnes/clef-gate && claude plugin install clef-gate@clef-gate
Or ask Claude to set it up
Paste this into Claude Code and it installs clef-gate for you:
Install the "clef-gate" Claude Code mod from https://github.com/dwain-barnes/clef-gate. Run claude plugin validate on it first and show me what it can access before you enable it.