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.
git clone --depth 1 https://github.com/holasoymalva/AI-PR-Reviewer-TasksWrote 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.
[](https://agentmods.dev/rules/holasoymalva/ai-pr-reviewer-tasks/detect-code-smells)<a href="https://agentmods.dev/rules/holasoymalva/ai-pr-reviewer-tasks/detect-code-smells"><img src="https://agentmods.dev/badge/rules/holasoymalva/ai-pr-reviewer-tasks/detect-code-smells.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.01519 |
| Opus 5 | $0.00005 | $0.00759 |
| Sonnet 5 | $0.00002 | $0.00304 |
| Haiku 4.5 | $0.00001 | $0.00152 |
Grade A, and why
detect-code-smells 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rule: Detect Code Smells and Anti-Patterns
Goal
To guide an AI assistant in systematically identifying code smells, anti-patterns, and quality issues in Pull Request changes, providing specific recommendations for improvement.
Process
-
Receive Code Files: Analyze the provided files using @ tags from the previous PR analysis.
-
Context Gathering: Understand the focus areas:
- Priority Areas: "Should I focus on specific aspects? (performance, maintainability, security)"
- Code Standards: "Are there specific coding standards or style guides to follow?"
- Language/Framework: "Any language-specific or framework-specific patterns to check?"
- Severity Filter: "What level of issues should I prioritize? (critical, major, minor)"
-
Systematic Code Smell Detection: Analyze code across multiple quality dimensions.
-
Generate Findings Report: Create detailed report with specific issues and improvement suggestions.
Code Smell Categories
🏗️ Structural Code Smells
Long Method/Function
- Functions exceeding 20-30 lines
- Complex nested logic
- Multiple responsibilities in single function
- Hard to understand or test
Large Class/Module
- Classes with too many methods or properties
- Modules handling multiple concerns
- God objects or utility classes
Duplicate Code
- Identical or very similar code blocks
- Copy-paste programming patterns
- Missing abstractions or utilities
Dead Code
- Unused variables, functions, or imports
- Unreachable code blocks
- Commented-out code left in place
🔄 Object-Oriented Code Smells
Feature Envy
- Methods using more features of other classes than their own
- Inappropriate intimacy between objects
- Poor encapsulation
Data Clumps
- Same group of parameters appearing together frequently
- Related data not grouped into objects
- Primitive obsession
Inappropriate Intimacy
- Classes knowing too much about each other's internals
- Tight coupling between unrelated components
- Breaking encapsulation principles
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.
- 7d ago First seen · 281 lines · 10 tokens per session scan A 2a0dc1c81ca7
detect-code-smells is a cursor rule published in the GitHub repository holasoymalva/AI-PR-Reviewer-Tasks (14 stars, last pushed 1y ago), licensed Apache-2.0. It adds 10 tokens to every session and 1,519 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.
Other cursor rules, from other repositories
refactoring
Refactoring: systematic approach, extract/inline, guard clauses, early returns.
clean-code
Clean code: naming, functions, simplicity.
code-review
Code review: reviewing approach, authoring PRs, feedback conventions.
git-workflow
Git workflow: commits, branches, PRs, history management.
refactor-test
Review and refactor generated unit tests for improved quality and coverage.
extract-functions
Extract and analyze functions from source code for unit test generation.