command-rules

A set of custom commands for AI-assisted development workflows. The commands can create HTML or Markdown views of project specifications and check how implementation compares with those specifications.

In plain words
What is it for?
Use it when tracking specifications, reviewing requirement completion, generating project summaries, or verifying that code matches documented plans.
Why use it?
It gives developers repeatable ways to inspect specification progress and identify gaps between planned requirements and the 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/brunogama/ios-cursor-rules/command-rules
Clone the repo
git clone --depth 1 https://github.com/brunogama/ios-cursor-rules

Made for: Cursor.

Per session 1,506 This file is loaded in full into every session.
When invoked 1,506 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.01506 $0.01506
Opus 5 $0.00753 $0.00753
Sonnet 5 $0.00301 $0.00301
Haiku 4.5 $0.00151 $0.00151

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

Security

Grade A, and why

command-rules 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.

.cursor/rules/command-rules.mdc · 236 lines

How it starts

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

AI Command System

Rule for defining and handling custom commands for AI-assisted development workflows.

actions:

Specs Commands

  • type: react conditions:

    • pattern: "Specs.getHtml" action: |

    Generate an HTML representation of all specifications

    This will create a dashboard showing all specs with their completion status

    I'll generate an HTML dashboard of all specifications, showing:

    • Project specifications overview
    • Completion percentages
    • Requirements status for each spec
    • Categories of specifications
    • A visual indicator of progress

    The dashboard will be saved to .cursor/output/specs_[timestamp].html

  • type: react conditions:

    • pattern: "Specs.getSummary" action: |

    Generate a markdown summary of all specifications

    I'll create a markdown summary showing:

    • Total specification files
    • Total requirements
    • Completion percentage
    • Breakdown by category
    • Details on each individual specification

    The summary will be saved to .cursor/output/specs_summary_[timestamp].md

  • type: react conditions:

    • pattern: "Specs.verify" action: |

    Verify implementations match specifications

    I'll analyze the codebase to verify that specifications have been implemented:

    • Trace each requirement to implementation code
    • Verify marked items actually exist in the codebase
    • Identify gaps between specs and implementation
    • Generate a verification report with findings

    The verification report will be saved to .cursor/output/spec_verification_[timestamp].md

Code Commands

  • type: react conditions:

    • pattern: "Code.analyze" action: |

    Analyze code structure and quality

    I'll perform a comprehensive analysis of the codebase:

    • File types and lines of code
    • Directory structure
    • Code complexity metrics
    • Potential complex functions (>50 lines)
    • TODOs and FIXMEs
    • Potential architectural issues
    • Refactor to follow object callisthenics
    • Check for code smells

    The analysis report will be saved to .cursor/output/code_analysis_[timestamp].md

  • type: react conditions:

    • pattern: "Code.refactor:(.*)" action: |

    Extract the code file to refactor from the command

    Pattern will capture the file path

    I'll analyze the specified file and provide refactoring recommendations:

    • Look for @codes
    • Identify long functions that could be broken down
    • Find duplicated code patterns
    • Review naming conventions
    • Suggest code structure improvements
    • Generate refactored code

    The refactoring report will be saved to .cursor/output/refactor_[filename]_[timestamp].md

Evaluation Commands

  • type: react conditions:

    • pattern: "Eval.project" action: |

    Generate a comprehensive project evaluation report

    I'll evaluate the entire project:

    • Project overview and statistics
    • Task completion assessment
    • Specification coverage
    • Code quality assessment
    • Documentation assessment
    • Recommendations for improvement

    The evaluation report will be saved to .cursor/output/project_evaluation_[timestamp].md

  • type: react conditions:

    • pattern: "Eval.progress" action: |

    Generate a progress report comparing current state to project goals

    I'll analyze project progress:

    • Milestone status and completion
    • Weekly task completion trends
    • Burndown analysis with completion projections
    • Risk assessment
    • Recommendations to maintain momentum

Read the full file on GitHub · 236 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 · 236 lines · 1,506 tokens per session scan A 7d2c02e3613e

Subscribe to this mod's changes

command-rules is a cursor rule published in the GitHub repository brunogama/ios-cursor-rules (74 stars, last pushed 1y ago), licensed MIT. It adds 1,506 tokens to every session, about $0.0075 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.