quality-standards

quality-standards is a cursor rule for Cursor from brendadeeznuts1111/betting-brain-v3. It costs 3,094 tokens per session, scanned A, original, MIT.

A set of rules for keeping source code consistent and avoiding common mistakes. It forbids patterns such as unsafe type assertions, direct console logging, unexplained numeric values, duplicated code, and empty error handlers.

In plain words
What is it for?
Use it while writing or reviewing code to check quality issues across the source tree. It is especially useful for enforcing project-wide standards with ast-grep searches.
Why use it?
These patterns make code harder to understand, search, test, and maintain. The rules also provide code-search commands for finding violations before review or release.

Cursor rule for Cursor

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { normalizeD1Result } from '../utils/request';.

Good fit Use it while writing or reviewing code to check quality issues across the source tree. It is especially useful for enforcing project-wide standards with ast-grep searches.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/brendadeeznuts1111/betting-brain-v3
agentmods
npx agentmods add rules/brendadeeznuts1111/betting-brain-v3/quality-standards

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 quality-standards

README.md
[![agentmods](https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/quality-standards/github.svg)](https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/quality-standards)
Your own site
<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/quality-standards"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/quality-standards/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 quality-standards

Your own site · 80×15
<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/quality-standards"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/quality-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,094 This file is loaded in full into every session.
When invoked 3,094 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.03094 $0.03094
Opus 5 $0.01547 $0.01547
Sonnet 5 $0.00619 $0.00619
Haiku 4.5 $0.00309 $0.00309

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

Security

Grade A, and why

quality-standards 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 10d 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/quality-standards.mdc · 503 lines

How it starts

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

Quality Standards Rules

🎯 Overview

These rules enforce the quality standards defined in docs/QUALITY_STANDARDS.md.

Zero Tolerance:

  • ❌ No as any type assertions
  • ❌ No console.log/error (use StructuredLogger)
  • ❌ No magic numbers (use constants)
  • ❌ No code duplication (use utilities)
  • ❌ No empty catch blocks

🔍 Code Searchability Patterns

Find Quality Issues with ast-grep

# Find 'as any' type assertions (CRITICAL)
ast-grep --pattern 'as any' src/
sg -p 'as any' src/

# Find console.log usage (should use StructuredLogger)
ast-grep --pattern 'console.$METHOD($$$)' src/
sg -p 'console.log' src/
sg -p 'console.error' src/

# Find magic numbers (should use constants)
ast-grep --pattern '$NUM' src/
sg -p '90' src/  # Example: find hardcoded 90
sg -p '5000' src/  # Example: find hardcoded 5000

# Find empty catch blocks
ast-grep --pattern 'catch ($VAR) { }' src/
sg -p 'catch' src/

# Find duplicate code patterns
ast-grep --pattern 'const $VAR = Date.now().toString(36)' src/
sg -p 'Date.now().toString' src/

Quality Enforcement Commands

# Run all quality checks
sg scan --filter "detect-type-assertion-any"
sg scan --filter "detect-console-in-source"
sg scan --filter "detect-magic-numbers"

# Find specific anti-patterns
sg search 'as any' src/
sg search 'console.log' src/
sg search 'Date.now().toString' src/

1. Type Safety - No 'as any'

❌ WRONG

const result = (await query.all()) as any;
const data = result.results || [];

const metrics = { ...testData } as any;

✅ CORRECT

// Use type guards
function isQueryResult(val: unknown): val is QueryResult {
  return typeof val === 'object' && val !== null && 'results' in val;
}

const result = await query.all();
const data = isQueryResult(result) ? result.results : [];

// Use utilities
import { normalizeD1Result } from '../utils/request';
const data = normalizeD1Result<MyType>(await query.all());

// Proper type definition
const metrics: CostCapMetrics = {
  requests: { current: 0, limit: TEST_LIMITS.REQUESTS, percentage: 0 },
  // ... all fields typed
};

Read the full file on GitHub · 503 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. 10d ago First seen · 503 lines · 3,094 tokens per session scan A c53a0cc40aed

Subscribe to this mod's changes

quality-standards is a cursor rule published in the GitHub repository brendadeeznuts1111/betting-brain-v3 (8 stars, last pushed 11mo ago), licensed MIT. It adds 3,094 tokens to every session, about $0.0155 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.

Related

Other cursor rules, from other repositories