audit-bugs

audit-bugs is a cursor rule for Cursor from golid-ai/golid. It costs 19 tokens per session (2,311 once invoked), scanned A, original, MIT.

A checklist for reviewing code for bugs, security problems, and quality issues. It requires concrete evidence such as a file and function location, a search command with its results, or a verified-clean search.

In plain words
What is it for?
Use it to audit files or modules, investigate security and reliability risks, review changes before merging, and document findings with precise evidence.
Why use it?
It makes code reviews more systematic and discourages unsupported claims. It can be used before merging changes or when someone explicitly requests an audit.

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/golid-ai/golid/audit-bugs
Clone the repo
git clone --depth 1 https://github.com/golid-ai/golid

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 audit-bugs

README.md
[![agentmods](https://agentmods.dev/badge/rules/golid-ai/golid/audit-bugs.svg)](https://agentmods.dev/rules/golid-ai/golid/audit-bugs)
Your own site
<a href="https://agentmods.dev/rules/golid-ai/golid/audit-bugs"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/audit-bugs.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,311 The whole file, excluding the scripts and references it only reads on demand.
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.00019 $0.02311
Opus 5 $0.00010 $0.01156
Sonnet 5 $0.00004 $0.00462
Haiku 4.5 $0.00002 $0.00231

Measured 5d ago against content hash 31c2740d72f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

audit-bugs 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 5d 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/audit-bugs.mdc · 111 lines

How it starts

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

Bug Audit Checklist

Thesis: Run this checklist against any file or module being reviewed. Each item references a real bug found in this codebase.

When to Run

Use workflow-routing first when the user asks for review/audit depth or when the diff crosses T2/T3 triggers; this checklist is scoped by that tier.

Two trigger points, not just one:

  1. Pre-merge gate — before declaring a card/feature "done", run the relevant section of this checklist against every file you touched. ~20% of recent commits are post-hoc audit cleanup; running this proactively converts those into the original commit. This is the highest-ROI use.
  2. On demand — when explicitly asked to audit, review for bugs, or grade code quality.

The checklist below is the same for both; only the trigger differs.

Evidence Requirements

A finding isn't "audited" until you've produced one of:

  • File path + function name + line range for the offending pattern (e.g., service/feature/feature.go::Create lines 45-52).
  • rg command + match count for codebase-wide patterns (e.g., rg "_ = pool\.Exec" -g '*.go' | wc -l → 3 hits).
  • "Verified clean" with the search you ran, when no instances exist (e.g., rg "createResource" frontend/ → 0 hits).

"Looks fine" is not an audit result. If you can't cite the search, you didn't run it.

Core patterns (apperror, parameterized SQL, batch(), Switch/Match, createResource, alive guard) — see codebase-standards. Frontend fetch — solidjs-data-fetching. Route UI — solidjs-pages.

Audit Strategy

A single audit pass catches ~60-70% of real issues. Each pass has blind spots due to which files get read first, which patterns the search focuses on, and attention saturation on large codebases. To maximize coverage:

  1. Run multiple independent passes with different focus areas — e.g., one pass for reactive patterns, one for auth/security, one for config consistency, one for the fork/rename story. Narrow scope finds more than broad sweeps.
  2. Vary the search strategy — don't just follow this checklist. Grep for known anti-patterns (return () => in .tsx, _ = in .go, any in component props). Read files the checklist doesn't mention (entry-server.tsx, rename tool, CI config, env files).
  3. Check reference implementations are textbook-perfectapp.tsx, login/index.tsx, dashboard/index.tsx, and settings/index.tsx are copied by the scaffold tool and by AI assistants. A bug in these propagates everywhere.
  4. Verify the tool chain, not just the code — rename tool, scaffold templates, deploy scripts, and CI config can have bugs that downstream users inherit silently.
  5. After fixing issues, re-read the fixed files — fixes can introduce new problems (e.g., a rename tool step that corrupts URLs by naively replacing project names inside domain strings).

Read the full file on GitHub · 111 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. 5d ago First seen · 111 lines · 19 tokens per session scan A 31c2740d72f7

Subscribe to this mod's changes

audit-bugs is a cursor rule published in the GitHub repository golid-ai/golid (40 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 2,311 once invoked, about $0.0001 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.