pre-edit-reading

pre-edit-reading is a cursor rule for Cursor from AlphaBitCore/nexus-gateway. It costs 609 tokens per session, scanned A, original, Apache-2.0.

A rule requiring three kinds of documentation to be read before changing code: architecture, user-facing feature details, and coding conventions.

In plain words
What is it for?
Use it before implementing code changes, especially changes affecting architecture or what users see.
Why use it?
It reduces changes that conflict with the system design, documented behavior, or established project practices.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions CLAUDE.md.

Good fit Use it before implementing code changes, especially changes affecting architecture or what users see.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/alphabitcore/nexus-gateway/pre-edit-reading
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/AlphaBitCore/nexus-gateway

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 pre-edit-reading

README.md
[![agentmods](https://agentmods.dev/badge/rules/alphabitcore/nexus-gateway/pre-edit-reading/github.svg)](https://agentmods.dev/rules/alphabitcore/nexus-gateway/pre-edit-reading)
Your own site
<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/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 pre-edit-reading

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 609 This file is loaded in full into every session.
When invoked 609 The same file — it is already loaded in full.
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.00609 $0.00609
Opus 5.5 $0.00244 $0.00244
Sonnet 5.5 $0.00122 $0.00122
Haiku 4.5 $0.00061 $0.00061

Measured 3mo ago against content hash 9ee2767e94e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo 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/pre-edit-reading.mdc · 47 lines

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:

  1. Architecture doc(s) — find your edit area in docs/developers/architecture/README.md and open the listed doc(s).
  2. 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
  3. Conventions — docs/developers/workflow/conventions.md for 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:

  1. Read docs/developers/architecture/README.md → find row matching the edit area → open the listed architecture doc(s).
  2. Identify the affected user-facing surface (if any) and open the matching feature doc.
  3. Open docs/developers/workflow/conventions.md if you have not internalised it for this language.
  4. 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.

Read the full file on GitHub · 47 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. 3mo ago First seen · 47 lines · 609 tokens per session scan A 9ee2767e94e4

Subscribe to this mod's changes

pre-edit-reading is a cursor rule published in the GitHub repository AlphaBitCore/nexus-gateway (25 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 609 tokens to every session, about $0.0024 per session on Opus 5.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.

Related

pre-edit-reading compared with cursor rules from other repositories

pre-edit-reading next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pre-edit-readingAlphaBitCore/nexus-gatewayCursor rule252mo agoApache-2.0A609Cursor
solana-securityCopenhagen0x/solana-security-standardCursor rule382mo agoMITA2,113Cursor
recipe_authorknowledgestack/ks-cookbookCursor rule94mo agoMITA10Cursor
20-phi-redaction-firstvaquarkhan/compliance-agent-skillsCursor rule43mo agoMITA285Cursor
ponytailDietrichGebert/ponytailCursor rule202k9d agoMITA604Cursor
angular-20angular/angularCursor rule102ktodayMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor