00-version-preflight

A project rule that requires checking an automatically generated snapshot of available code-generation models and versions before generating code or making a plan. The snapshot is refreshed when missing or older than 24 hours.

In plain words
What is it for?
Use it before code generation or major planning sessions to verify current model IDs and SDK versions, using the project’s preflight command or extension.
Why use it?
It reduces the risk of using outdated model identifiers, SDKs, or version information. It tells the agent to request or run a preflight refresh when the snapshot is not current.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/aculich/codegen-preflight/00-version-preflight
Clone the repo
git clone --depth 1 https://github.com/aculich/codegen-preflight

Made for: Cursor.

Per session 298 This file is loaded in full into every session.
When invoked 298 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00298 $0.00298
Opus 5 $0.00149 $0.00149
Sonnet 5 $0.00060 $0.00060
Haiku 4.5 $0.00030 $0.00030

Measured yesterday against content hash 2f784a606d51, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

00-version-preflight 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 yesterday.

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/00-version-preflight.mdc · 33 lines

What it actually says

Codegen Freshness Policy

Before generating code or entering Plan Mode, you MUST ensure the snapshot is fresh.

Automatic Check:

  • The Codegen Preflight extension automatically checks for stale snapshots on startup
  • If the extension is installed, it will auto-refresh snapshots older than 24 hours
  • You can trigger a manual check by running: Codegen Preflight: Check Before Coding

Manual Refresh: If the snapshot is older than 24 hours or missing:

  1. Ask the user to run /preflight (preferred), OR
  2. If you are in Agent mode and have terminal access, run: npm run preflight or use the Codegen Preflight extension to refresh

Before Plan Mode:

  • The extension hooks into workspace events to ensure freshness
  • If you're about to start a major coding session, consider running /preflight to force a refresh

Then continue with the coding task.

Rules

  • Never invent model IDs. Prefer discovered IDs or the selected defaults in the snapshot.
  • Never recommend deprecated SDKs if the snapshot indicates replacements.
  • Always use the latest SDK versions from the snapshot when writing install snippets for new projects.
  • When the user asks for a "best" model, use the selected defaults from the snapshot based on the category (reasoning, fast, vision).
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. yesterday First seen · 33 lines · 298 tokens per session scan A 2f784a606d51

Subscribe to this mod's changes

00-version-preflight is a cursor rule published in the GitHub repository aculich/codegen-preflight (2 stars, last pushed 5mo ago), licensed MIT. It adds 298 tokens to every session, about $0.0015 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.