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.

Updated 2026-10-04

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.

TypeClaude code mod
Authordwain-barnes
Repositorydwain-barnes/clef-gate
Popularityno public popularity data yet
CategoryAgents & automation
SecurityReview before installing (64/100)
Rank#3,120 of 5,272 Claude Code mods; #238 in Agents & automation
LicenseApache-2.0
Last commit2026-10-04
Hooks8 events
Seesevery tool call, subagent spawns
Draws onPromptHint

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.

CheckResult
Sends data over the networkReview
Starts no processesPass
Writes files or configReview
Reads environment variablesReview
Only sees the events it hooksPass
Doesn't drive ClaudePass
Passes claude plugin validatePass
Has an open-source licensePass

API calls in its code

CallWhat it means
$.clock.now
$.clock.sleep
$.command.register
$.env.getreads env vars
$.fs.listreads files
$.fs.readreads files
$.fs.writewrites files
$.http.fetchnetwork requests
$.session.id
$.session.messagesreads the transcript
$.state.get
$.state.set
$.store.getkeeps its own state
$.store.setkeeps its own state
$.ui.invalidatedraws interface
$.ui.toastdraws interface

How do I install clef-gate?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. 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/.
  3. 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.