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.
npx agentmods add rules/alphabitcore/nexus-gateway/pre-edit-readinggit clone --depth 1 https://github.com/AlphaBitCore/nexus-gatewayWrote 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/rules/alphabitcore/nexus-gateway/pre-edit-reading)<a href="https://agentmods.dev/rules/alphabitcore/nexus-gateway/pre-edit-reading"><img src="https://agentmods.dev/badge/rules/alphabitcore/nexus-gateway/pre-edit-reading.svg" alt="Measured on agentmods" 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 | $0.00609 | $0.00609 |
| Opus 5 | $0.00304 | $0.00304 |
| Sonnet 5 | $0.00122 | $0.00122 |
| Haiku 4.5 | $0.00061 | $0.00061 |
Grade A, and why
pre-edit-reading 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pre-edit reading — binding 3-doc requirement
Before writing any code change, you MUST read all three of:
- Architecture doc(s) — find your edit area in
docs/developers/architecture/README.mdand open the listed doc(s). - Feature doc(s) — if the change affects a user-visible surface, open the matching doc:
- CP-UI menu sections →
docs/users/features/cp-ui/<section>.md - Agent-UI pages →
docs/users/features/agent-ui/<page>.md - Cross-feature flows (admin → CP → Hub → effect → audit) →
docs/users/features/flows/<flow>.md
- CP-UI menu sections →
- Conventions —
docs/developers/workflow/conventions.mdfor code style, naming, idioms, commit style, PR review checklist.
This rule keeps three things from drifting apart:
- Architecture (what the code is supposed to do structurally).
- User-facing surface (what the human-readable contract looks like).
- Code style (so the change reads consistently with the rest of the repo).
A change that lands without consulting all three is the failure mode that causes architecture rot under new contributors.
How to apply
When the user asks you to edit code:
- Read
docs/developers/architecture/README.md→ find row matching the edit area → open the listed architecture doc(s). - Identify the affected user-facing surface (if any) and open the matching feature doc.
- Open
docs/developers/workflow/conventions.mdif you have not internalised it for this language. - Then write code.
What if a doc is missing?
- No architecture doc for the edit area → raise it with the user. Either the architecture is genuinely undocumented (start a new arch doc + trigger row in the same PR) or it's a small piece of an existing area and the relevant arch doc covers it implicitly.
- No feature doc for a user-visible change → raise it with the user. If you're adding a new CP-UI section or Agent-UI page, add the feature doc in the same PR.
- No conventions for what you're doing → if your work is genuinely a new style decision (e.g., introducing a third UI tier), raise it and propose an addition to
docs/developers/workflow/conventions.md.
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.
- 4d ago First seen · 47 lines · 609 tokens per session scan A 9ee2767e94e4
pre-edit-reading is a cursor rule published in the GitHub repository AlphaBitCore/nexus-gateway (23 stars, last pushed 2d ago), licensed Apache-2.0. It adds 609 tokens to every session, about $0.0030 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-30.
Other cursor rules, from other repositories
10-deterministic-audit
Enforce deterministic audit behavior — no invented controls, cite authoritative sources, emit traceable artifacts.
flagship_author
How to author a flagship in ks-cookbook.
recipe_author
How to author a recipe in ks-cookbook.
30-framework-routing
Route tasks to HIPAA, HITECH, PCI-DSS, SOC 2, ISO 27001, NIST CSF, NIST AI RMF, FERPA, COPPA, CCPA, US state privacy, GDPR, FedRAMP, SOX, CMMC, and GLBA skills based on user intent and presets.
00-compliance-agent-core
Core compliance agent mission, PHI redaction gate, and audit lifecycle for HIPAA, PCI-DSS, and SOC 2.
20-phi-redaction-first
PHI redaction first — Presidio gate, token handling, and minimum necessary LLM access for HIPAA workflows.