quota-sentry

quota-sentry is a command for Claude Code from dhruvil009/QuotaSentry. It costs 14 tokens per session (812 once invoked), scanned A, original, Apache-2.0.

A local command for monitoring and enforcing Codex usage quotas. A quota is a limit on how much of a service can be used during a set period.

In plain words
What is it for?
Use it to check or refresh quota status, start or stop monitoring, install the enforcement hook, and configure advisory or hard-blocking weekly limits.
Why use it?
It helps prevent a weekly quota from being exceeded by checking the current state and optionally applying a hard block when the configured threshold is reached.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/quota-sentry status.

Good fit Use it to check or refresh quota status, start or stop monitoring, install the enforcement hook, and configure advisory or hard-blocking weekly limits.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/dhruvil009/QuotaSentry
agentmods
npx agentmods add commands/dhruvil009/quotasentry/quota-sentry

Made for: Claude Code.

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 quota-sentry

README.md
[![agentmods](https://agentmods.dev/badge/commands/dhruvil009/quotasentry/quota-sentry/github.svg)](https://agentmods.dev/commands/dhruvil009/quotasentry/quota-sentry)
Your own site
<a href="https://agentmods.dev/commands/dhruvil009/quotasentry/quota-sentry"><img src="https://agentmods.dev/badge/commands/dhruvil009/quotasentry/quota-sentry/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 quota-sentry

Your own site · 80×15
<a href="https://agentmods.dev/commands/dhruvil009/quotasentry/quota-sentry"><img src="https://agentmods.dev/badge/commands/dhruvil009/quotasentry/quota-sentry.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 812 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.00014 $0.00812
Opus 5 $0.00007 $0.00406
Sonnet 5 $0.00003 $0.00162
Haiku 4.5 $0.00001 $0.00081

Measured 8d ago against content hash 6bd3245c7c8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

quota-sentry 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 8d 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.

commands/quota-sentry.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Quota Sentry

The user invoked this command with: $ARGUMENTS

Instructions

Use this command to help the user manage Quota Sentry from the plugin root.

  1. Confirm codex is available:
command -v codex
  1. If the user asks for status, run:
./scripts/quota-sentry status
  1. If the user asks to refresh quota state once, run:
./scripts/quota-sentry poll
  1. If the user asks to start monitoring, run:
./scripts/quota-sentry start
  1. If the user asks to stop monitoring, run:
./scripts/quota-sentry stop
  1. If the user asks to install enforcement, run:
./scripts/quota-sentry install-hook

After hook installation, tell the user to restart every running Codex process. Existing processes retain their loaded hook registry, and editing the hook file is not a reliable hot-reload mechanism.

  1. Weekly hard-blocking is already the default. If the user asks to change or explicitly persist its threshold, run:
./scripts/quota-sentry configure --weekly-mode hard-block --weekly-threshold-percent 99

If the user asks to opt out of weekly enforcement, run:

./scripts/quota-sentry configure --weekly-mode advisory
  1. If the user asks to run autonomous tests, run:
./scripts/autonomous-test

poll, start, and guard accept --source auto|codex-app-server|codexbar. Default auto uses only the authoritative Codex app-server and requires no CodexBar installation.

Weekly usage hard-blocks at 99% by default, even when no config file exists. configure --weekly-mode advisory is an explicit opt-out. Persisted policy lives in ~/.config/quota-sentry/config.json and does not require changing installed hook commands.

Quota policy follows window duration and canonical limit identity, not Codex's primary or secondary slot names. Short-term windows up to 24 hours use the normal guard; seven-day windows use weekly policy; unfamiliar long-term canonical windows block at 100%; durationless or canonically ambiguous data fails closed; auxiliary buckets remain advisory only when a canonical bucket is known.

Read the full file on GitHub · 91 lines

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. 8d ago First seen · 91 lines · 14 tokens per session scan A 6bd3245c7c8c

Subscribe to this mod's changes

quota-sentry is a command published in the GitHub repository dhruvil009/QuotaSentry (4 stars, last pushed 28d ago), licensed Apache-2.0. It adds 14 tokens to every session and 812 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.