coding_standards.mouse

A set of rules for an AI coding agent that uses a visual task-management method called Mouse Protocol. It also defines expectations for code quality, security, formatting, and project conventions.

In plain words
What is it for?
Use it when asking an agent to modify software in a project with coding standards, configuration files, or quality requirements.
Why use it?
It reduces inconsistent code and avoidable mistakes by making the agent check and follow the project's existing linting and formatting rules before changing code.

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/marv1nnnnn/mouse/coding_standards.mouse
Clone the repo
git clone --depth 1 https://github.com/marv1nnnnn/mouse

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,411 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.00000 $0.01411
Opus 5 $0.00000 $0.00705
Sonnet 5 $0.00000 $0.00282
Haiku 4.5 $0.00000 $0.00141

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

Security

Grade A, and why

coding_standards.mouse 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 2d 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/standards/coding_standards.mouse.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.


4. Standards & Quality Assurance: Coding Standards (Mouse Protocol)

Rationale: Defines the non-negotiable quality, security, and maintainability expectations for all code produced or modified by the Agent. Strict adherence ensures consistency, reduces errors, enhances collaboration, and aligns with professional software development practices. The Agent is expected to internalize these standards and apply them proactively and rigorously.

4.1 Code Quality & Conventions (Mandatory Adherence)

  • Project-Specific & Language Idiomatic Standards:
    • The Agent MUST meticulously adhere to any project-specific coding standards, linting rules (e.g., ESLint, Pylint, Checkstyle, RuboCop, SwiftLint), and formatting guidelines (e.g., Prettier, Black, Spotless, gofmt, rustfmt) defined and accessible within the project (e.g., via .eslintrc.js, prettier.config.js, pyproject.toml, checkstyle.xml, .swiftlint.yml).
    • Agent Action: Before coding, Agent MUST scan for such configuration files. If found, Agent configures its internal generation process to comply strictly. If not found, Agent MUST use widely accepted community best practices and idiomatic conventions for the specific language and its version, prioritizing clarity, security, and maintainability. Agent logs which standards (project or default) are being applied.
  • Clarity, Readability & Simplicity (KISS Principle):
    • Code MUST be exceptionally clear, self-documenting where possible, and easily understandable by another human developer or a future instance of the Agent.
    • Employ meaningful, descriptive, and consistent naming conventions for variables, functions, classes, modules, etc. (e.g., camelCase for JS/Java variables/functions, PascalCase for classes, snake_case for Python variables/functions).
    • Avoid overly complex, nested, or "clever" logic if simpler, more straightforward alternatives exist that achieve the same functional outcome (refer to @mouse/standards/guiding_software_principles.mouse.mdc#kiss).
  • Maintainability & Modularity (SRP, DRY Principles):
    • Code MUST be structured for ease of future modification, extension, and debugging.
    • Follow modular design principles: Create small, focused functions/methods/classes that perform a single, well-defined task (Single Responsibility Principle - SRP).
    • Aggressively avoid code duplication (Don't Repeat Yourself - DRY). Abstract common logic into reusable functions, classes, or modules. Reference @mouse/standards/guiding_software_principles.mouse.mdc.
  • Commenting & Documentation (See also @mouse/standards/documentation_standards.mouse.mdc):
    • Provide clear, concise comments for complex logic, non-obvious design decisions, workarounds, or sections of code that have known limitations (e.g., // HACK: Temporary workaround for API bug XYZ-123. TODO: Remove when fixed.).
    • Public APIs (functions, classes, methods exposed for external use) MUST have comprehensive docstrings/API comments detailing purpose, parameters, return values, and exceptions.
  • Error Handling & Resilience (Robustness):
    • Implement robust, specific error handling for all anticipated failure conditions (e.g., invalid inputs, I/O errors, API failures, unmet preconditions).
    • Use language-specific exception handling mechanisms correctly. Catch specific exceptions rather than generic ones, unless intentionally re-throwing with added context.
    • Provide meaningful error messages that help in diagnosing the problem. Log errors appropriately (see logging standards).
    • Consider graceful degradation or fallback mechanisms where appropriate.
  • Security Best Practices (Critical - Principle of Least Privilege, Secure by Design):
    • Agent MUST be actively mindful of common security vulnerabilities relevant to the language, framework, and context (e.g., OWASP Top 10: SQL Injection, XSS, CSRF, Insecure Deserialization, Broken Access Control, etc.).

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. 2d ago First seen · 47 lines · 1,411 tokens per session scan A a3cddb9714c6

Subscribe to this mod's changes

coding_standards.mouse is a cursor rule published in the GitHub repository marv1nnnnn/mouse (14 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,411 tokens. 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.