Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/hamza-ali-shahjahan/claudexWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/hamza-ali-shahjahan/claudex/gate)<a href="https://agentmods.dev/commands/hamza-ali-shahjahan/claudex/gate"><img src="https://agentmods.dev/badge/commands/hamza-ali-shahjahan/claudex/gate/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/hamza-ali-shahjahan/claudex/gate"><img src="https://agentmods.dev/badge/commands/hamza-ali-shahjahan/claudex/gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.00598 |
| Opus 5 | $0.00009 | $0.00299 |
| Sonnet 5 | $0.00003 | $0.00120 |
| Haiku 4.5 | $0.00002 | $0.00060 |
Grade A, and why
gate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
You are running ClauDex gate — the per-repo switch for the consensus
gate. When the gate is ON, commits made through Claude Code in this repo
are blocked (by the plugin's consensus-gate.sh PreToolUse hook) unless
the ClauDex ledger shows a signed cross-review newer than the last commit.
This command flips a local marker; it reviews nothing, so it never
signs — the 🧡🖤 line is earned by cross-review only.
-
Requires a git repo. Resolve
git rev-parse --absolute-git-dir; if this isn't a repo, STOP: the gate guards commits, so there is nothing to gate. The marker lives at<git-dir>/claudex/gate— inside.git, so like the ledger it can never be committed and never follows a clone. -
Parse "$ARGUMENTS" —
on,off, orstatus(empty meansstatus):- on — create
<git-dir>/claudex/if needed and write the marker file containing one line:enabled <UTC ISO-8601> by /claudex:gate. Then check the other half: runcodex --versionand the auth check — if Codex is missing or logged out, still enable, but WARN in bold: the gate demands a duet, so until Codex is ready every gated commit will block. Confirm with the honest scope: the gate blocks commits made through Claude Code sessions that have this plugin; commits typed in your own terminal are untouched. Mention the exits: earn a signed run, or/claudex:gate off. - off — delete the marker if present and confirm the gate is lifted (say "was not on" if it wasn't). Leave the ledger alone.
- status — report ON or OFF. If ON, also answer the question the
user is really asking — would a commit pass right now? — using the
hook's own rule: newest ledger entry with
"outcome":"signed"vs the last commit's UTC time. Show the newest signed run's timestamp and command, or say none is recorded yet.
- on — create
-
Principle note (include when turning on): this is the invocation-only principle applied to enforcement — the hook ships with the plugin but is dormant in every repo until you run
/claudex:gate onthere. If you didn't opt this repo in, the hook does nothing but exit.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 40 lines · 17 tokens per session scan A 507330583efb
gate is a command published in the GitHub repository hamza-ali-shahjahan/claudex (4 stars, last pushed 1mo ago), licensed MIT. It adds 17 tokens to every session and 598 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
save
Save current session. Writes a session log with what was done, decisions made, and what's pending. Optional: commit & push.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
ship
Branch, commit, open PR, gather Claude + every enabled AI reviewer (Copilot, CodeRabbit, etc.), fix/justify/resolve every finding, loop until clean, then merge. Run only when implementation is finished AND the owner has said to ship (e.g. "ship it") — never self-invoke just because the work looks done. To design and…
commit
Use when the user asks to commit changes (interactively, not inside an autonomous cycle). Runs code-simplifier + one reviewer (general code-reviewer OR the matching language reviewer, ECC agents/skills), then lint + targeted tests via evolve commit-gate run, writes a tree-SHA-bound attestation, commits + pushes via…
diff-review
Budget-capped adversarial review + simplification pass over a STAGED DIFF only — one agent, two lenses, findings-first. Use for commit-gate reviews instead of dispatching separate whole-repo reviewer and simplifier agents; the caller declares what already ran (tests, lint, gates) and the reviewer verifies claims…
codex-review-waive
Waive a disputed Codex review finding so it stops blocking commits.