cursorrules

A set of coding rules that requires one clear implementation for each function or feature and discourages duplicate code and parallel systems.

In plain words
What is it for?
Use it when changing a codebase to check for existing implementations, consolidate overlapping functionality, and improve shared code instead of copying it.
Why use it?
It prevents technical debt: extra code and competing approaches that make a project harder to maintain.

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/sethdford/flowx/cursorrules
Clone the repo
git clone --depth 1 https://github.com/sethdford/flowx

Made for: Cursor.

Per session 389 This file is loaded in full into every session.
When invoked 389 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.00389 $0.00389
Opus 5 $0.00195 $0.00195
Sonnet 5 $0.00078 $0.00078
Haiku 4.5 $0.00039 $0.00039

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

Security

Grade A, and why

cursorrules 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.

.cursorrules · 48 lines

What it actually says

Claude Flow - Zero Technical Debt Policy

🚨 CRITICAL: NO TECHNICAL DEBT ALLOWED

Core Principles

  1. ONE IMPLEMENTATION PER FUNCTION - Never create multiple ways to do the same thing
  2. CONSOLIDATE BEFORE CREATING - Always check for existing implementations before building new ones
  3. DELETE REDUNDANT CODE - Remove unused, duplicate, or overlapping implementations immediately
  4. REFACTOR OVER REWRITE - Improve existing code rather than creating parallel implementations

Mandatory Checks Before Any Code Changes

  • Does this functionality already exist elsewhere?
  • Am I creating a duplicate implementation?
  • Can I extend/improve existing code instead?
  • Will this create maintenance burden?
  • Is this the single source of truth for this functionality?

Forbidden Patterns

❌ Multiple agent spawning implementations ❌ Duplicate database/persistence layers ❌ Overlapping CLI command structures ❌ Similar but slightly different interfaces ❌ Copy-paste code with minor modifications ❌ Multiple ways to achieve the same goal ❌ Temporary implementations that become permanent ❌ "Quick fixes" that bypass existing systems

Required Actions

✅ Consolidate similar implementations into one ✅ Use composition over duplication ✅ Create unified interfaces for common operations ✅ Delete unused/redundant code immediately ✅ Document the single source of truth for each feature ✅ Refactor existing code to be more flexible instead of creating new implementations

Emergency Protocol

If technical debt is identified:

  1. STOP current development
  2. Assess scope of duplication
  3. Create consolidation plan
  4. Implement unified solution
  5. Delete redundant implementations
  6. Update all references
  7. Test thoroughly
  8. Document the single source of truth

Remember: Technical debt compounds exponentially. Prevention is 1000x easier than cleanup.

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 · 48 lines · 389 tokens per session scan A c4ba7ef3d016

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository sethdford/flowx (2 stars, last pushed 1mo ago), licensed MIT. It adds 389 tokens to every session, about $0.0019 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.