gate

gate is a command for Claude Code from hamza-ali-shahjahan/claudex. It costs 17 tokens per session (598 once invoked), scanned A, original, MIT.

A repository setting that controls whether commits made through Claude Code require a newer signed review from Codex before they are allowed. A repository is a project managed by Git, the tool that records code changes.

In plain words
What is it for?
Use it to turn the commit gate on or off, check its status, and warn when Codex is unavailable or not signed in.
Why use it?
It helps prevent commits from being made until the required cross-review is present, while making the setting visible only in that local Git repository.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Part of the claudex plugin — 1 skill, 7 commands, 1 hook shipped together

Good fit Use it to turn the commit gate on or off, check its status, and warn when Codex is unavailable or not signed in.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hamza-ali-shahjahan/claudex/gate
Install

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.

Clone the repo
git clone --depth 1 https://github.com/hamza-ali-shahjahan/claudex

Made for: Claude Code.

Or install claudex, the plugin that ships this one along with the rest of its 1 skill, 7 commands, 1 hook.

Wrote 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.

agentmods badge for gate

README.md
[![agentmods](https://agentmods.dev/badge/commands/hamza-ali-shahjahan/claudex/gate/github.svg)](https://agentmods.dev/commands/hamza-ali-shahjahan/claudex/gate)
Your own site
<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.

agentmods 80×15 button for gate

Your own site · 80×15
<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>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 598 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 9d ago against content hash 507330583efb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

plugins/claudex/commands/gate.md · 40 lines

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.

  1. 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.

  2. Parse "$ARGUMENTS" — on, off, or status (empty means status):

    • 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: run codex --version and 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.
  3. 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 on there. If you didn't opt this repo in, the hook does nothing but exit.

Changes

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.

  1. 9d ago First seen · 40 lines · 17 tokens per session scan A 507330583efb

Subscribe to this mod's changes

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.

Related

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.

avelikiy/great_cto · 26 tokens

git

The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.

azrtydxb/procoder · 20 tokens

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…

PrabhdeepSingh/claude-plugins · 86 tokens

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…

mickeyyaya/evolve-loop · 103 tokens

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…

mickeyyaya/evolve-loop · 78 tokens

codex-review-waive

Waive a disputed Codex review finding so it stops blocking commits.

andreidavid/codex-review · 13 tokens