cursorrules

A set of rules for using CodeImpact, a code-analysis system that searches project context and checks proposed changes against existing patterns and decisions.

In plain words
What is it for?
Use it to inspect project context, review planned edits, measure the likely impact of changing a file, check the project status, and run checks before committing.
Why use it?
It helps avoid made-up imports, duplicate code, conflicting patterns, missing dependencies, and changes that affect more files than expected.

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

Made for: Cursor.

Per session 1,675 This file is loaded in full into every session.
When invoked 1,675 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.01675 $0.01675
Opus 5 $0.00838 $0.00838
Sonnet 5 $0.00335 $0.00335
Haiku 4.5 $0.00168 $0.00168

Measured yesterday against content hash 7e8fc390c991, 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 · 167 lines

How it starts

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

CodeImpact Integration

CodeImpact provides intelligent code analysis. Use these MCP tools FIRST before falling back to built-in tools.

Tool Preferences (IMPORTANT)

  1. For code searches and questions about the codebase:

    • Use mcp_codeimpact_memory_query FIRST (semantic search, returns relevant context)
    • Only fall back to file search if CodeImpact returns no results
  2. Before writing or suggesting code changes:

    • Run mcp_codeimpact_memory_review to check against patterns, past decisions, and potential conflicts
    • This catches hallucinated imports, duplicate functions, and pattern violations
  3. Before finalizing/committing code:

    • Run mcp_codeimpact_memory_verify for pre-commit quality checks
    • Catches security issues, missing dependencies, and import errors
  4. At session start:

    • Run mcp_codeimpact_memory_status to get project overview and recent changes
  5. For impact analysis:

    • Use mcp_codeimpact_memory_blast_radius to analyze risk of changing a file
    • Shows affected files, critical paths, and recommendations

Why Use CodeImpact Tools?

  • Semantic search: Understands intent, not just keywords
  • Pattern awareness: Knows project conventions and enforces them
  • Decision memory: Remembers past architectural decisions
  • Import validation: Catches hallucinated imports before they break builds
  • Blast radius: Understand impact and risk before making changes

Quick Reference

Task Tool
Find code mcp_codeimpact_memory_query
Check code mcp_codeimpact_memory_review
Verify code mcp_codeimpact_memory_verify
Project status mcp_codeimpact_memory_status
Save decision mcp_codeimpact_memory_record
Impact analysis mcp_codeimpact_memory_blast_radius

CLI Commands

# Find unused exports and dead code
codeimpact deadcode

# Find which tests to run for changed files
codeimpact test-impact --changed src/file.ts

# Analyze blast radius and risk of changing a file
codeimpact impact src/core/engine.ts

# View token usage statistics
codeimpact stats

Read the full file on GitHub · 167 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. yesterday First seen · 167 lines · 1,675 tokens per session scan A 7e8fc390c991

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository abhisavakar/codeimpact (3 stars, last pushed 3mo ago), licensed MIT. It adds 1,675 tokens to every session, about $0.0084 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.