model-economics

model-economics is a cursor rule for Cursor from hmj1026/dhpk. It costs 8 tokens per session (2,323 once invoked), scanned A, original, MIT.

A set of rules for choosing model tiers and controlling their costs for different agent roles. It covers configured model choices, effort settings, fallbacks, and time limits.

In plain words
What is it for?
It is for routing deep reasoning, fast work, review, and command-line worker roles to configured models and applying their cost-related settings.
Why use it?
It gives the system a consistent way to balance the required work level with resource use instead of choosing models ad hoc.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions subagents; positional $N argument; mentions Codex.

Good fit It is for routing deep reasoning, fast work, review, and command-line worker roles to configured models and applying their cost-related settings.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/hmj1026/dhpk/model-economics
View source ↗ hmj1026/dhpk
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/hmj1026/dhpk

Made for: Cursor.

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 model-economics

README.md
[![agentmods](https://agentmods.dev/badge/rules/hmj1026/dhpk/model-economics.svg)](https://agentmods.dev/rules/hmj1026/dhpk/model-economics)
Your own site
<a href="https://agentmods.dev/rules/hmj1026/dhpk/model-economics"><img src="https://agentmods.dev/badge/rules/hmj1026/dhpk/model-economics.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,323 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.00008 $0.02323
Opus 5 $0.00004 $0.01162
Sonnet 5 $0.00002 $0.00465
Haiku 4.5 $0.00001 $0.00232

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

Security

Grade A, and why

model-economics 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 2d 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.

cursor/rules/model-economics.mdc · 67 lines

How it starts

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

Model Economics — tier map & cost rules

SSOT for which model tier each role runs on, and the cost rules that govern tier and effort choices. The dispatch routing decision — which agent handles which work shape — lives in .cursor/dhpk/policies/execution-policy.md §Implementation dispatch; this file owns the cost lens over that routing and does not restate its work-shape rows. Resource-layer markdown, opt-in — referenced from execution-policy.md §Agent dispatch (model-tier + configured-role paragraphs) and skills/dhpk-prompt-optimize/references/effort-guide.md.

Reviewers keep a sonnet floor — no downward tiering, no reviewer_model key. Runtime-tunable via userConfig: deep-reasoner / fast-worker (model + effort), the deterministic fast-worker selector (fast_worker_backend, fast_worker_backend_order, fast_worker_fallback), plus the CLI-backed canonical roles codex-worker (codex_worker_model / codex_worker_effort / codex_worker_timeout_secs; legacy aliases codex_fast_worker_*), codex-reasoner (codex_reasoner_model / codex_reasoner_effort / codex_reasoner_timeout_secs; legacy aliases codex_deep_reasoner_*), codex-reviewer (codex_reviewer_model / codex_reviewer_effort / codex_reviewer_timeout_secs; legacy alias codex_bridge_timeout_secs for timeout only), and agy-worker (agy_worker_model; legacy alias agy_fast_worker_model — agy bakes effort into the model name, so no effort key and its timeout semantics remain separate). All Codex CLI roles also inherit codex_timeout_secs; budgets are integer seconds, 0 is an intentional dispatcher-attested no-deadline request, and malformed values fail closed. The portable runner, never a shell timeout backstop, enforces an attested nonzero deadline. The rest of the map is documentation for humans, not a runtime dial.

Tier map

Role Model Why
Orchestrator (main session) opus Owns decide → dispatch → verify; spends the expensive tier on judgment, risk, and evidence packets — never bulk discovery.
deep-reasoner opus Reasoning-heavy judgment (root cause, algorithm, design synthesis), ideally on a distilled evidence packet rather than raw breadth.
codex-reasoner (selector-driven) external CLI — codex, default gpt-5.6-sol @ high (codex_reasoner_*); legacy alias: codex-deep-reasoner Reasoning-heavy judgment offloaded to the codex CLI (read-only sandbox) via --reasoner=codex; same conclusion contract as deep-reasoner; missing-executable fallback to deep-reasoner only, never after auth/model/task failure.
fast-worker sonnet Mechanical application of a clear spec — the cheaper execution tier the policy routes to by default.
codex-worker (selector-driven) external CLI — codex, default gpt-5.6-luna @ xhigh (codex_worker_*); legacy alias: codex-fast-worker The strong mechanical tier: selected explicitly or by configured auto availability order; never a silent fallback after auth/model/task failure.
agy-worker (selector-driven) external CLI — agy, default Gemini 3.6 Flash (High) (agy_worker_model); legacy alias: agy-fast-worker The high-throughput tier: selected explicitly or by configured auto availability order; missing executable may use the explicit claude fallback only.
codex-reviewer (opt-in, internal-only in this rollout) external CLI — codex, default gpt-5.6-sol @ high (codex_reviewer_*); legacy alias: codex-bridge (mode-qualified) Read-only peer review via codex CLI; codex-bridge is a mode-qualified alias resolving to codex-reviewer (read-only) or codex-worker (workspace-write); its dispatcher-attested deadline is enforced by the contained Python runner, never a shell timeout helper.
Reviewers (code / db / security / frontend / polyfill / migration) sonnet High-frequency gate work; sonnet floor, raised to opus only for a HIGH-risk diff (up-only).
doc-reviewer haiku Lightweight frontmatter / link / SSOT lint — the cheapest tier that passes.
architect fable @ low Cheap architecture-consult tier — cross-module / DDD design judgment; up-only escalation to a higher tier for HIGH-risk designs via the configured-role override.
spec-miner opus Behavioral-spec extraction — reasoning-heavy, not discovery.

Read the full file on GitHub · 67 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. 2d ago First seen · 67 lines · 8 tokens per session scan A 9fbfa381ef91

Subscribe to this mod's changes

model-economics is a cursor rule published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 8 tokens to every session and 2,323 once invoked, about $0.0000 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-09-05.