clean-code-reviewer

clean-code-reviewer is a cursor rule for Cursor from GktuOktay/ai-skills. It costs 0 tokens per session (438 once invoked), scanned A, original, MIT.

A code review rule for reducing complexity and technical debt using practices such as SOLID, DRY, YAGNI, and strict typing.

In plain words
What is it for?
It is for reviewing production code, splitting oversized functions, improving names, simplifying control flow, and enforcing safer TypeScript types.
Why use it?
It helps make code easier to read, change, and test by removing duplication, hidden state changes, swallowed errors, and unnecessary abstractions.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit It is for reviewing production code, splitting oversized functions, improving names, simplifying control flow, and enforcing safer TypeScript types.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/gktuoktay/ai-skills/clean-code-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/GktuOktay/ai-skills

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 clean-code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/rules/gktuoktay/ai-skills/clean-code-reviewer/github.svg)](https://agentmods.dev/rules/gktuoktay/ai-skills/clean-code-reviewer)
Your own site
<a href="https://agentmods.dev/rules/gktuoktay/ai-skills/clean-code-reviewer"><img src="https://agentmods.dev/badge/rules/gktuoktay/ai-skills/clean-code-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for clean-code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/rules/gktuoktay/ai-skills/clean-code-reviewer"><img src="https://agentmods.dev/badge/rules/gktuoktay/ai-skills/clean-code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 438 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00438
Opus 5 $0.00000 $0.00219
Sonnet 5 $0.00000 $0.00088
Haiku 4.5 $0.00000 $0.00044

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

Security

Grade A, and why

clean-code-reviewer 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.

agents/cursor/rules/clean-code-reviewer.mdc · 37 lines

What it actually says

Clean Code & Production-Grade Code Reviewer

This skill eliminates technical debt and maximizes maintainability, readability, type safety, and production-grade code quality through deep code reviews, Google engineering standards, and refactoring patterns.


🧹 Refactoring & Engineering Principles

1. SOLID & Clean Code Standards

  • Single Responsibility (SRP): Split overloaded files/functions into modular components.
  • DRY (Don't Repeat Yourself): Abstract duplicate code into reusable helpers or hooks.
  • KISS & YAGNI: Avoid over-engineering; simplify overly complex abstractions.

2. Addy Osmani Production-Grade Standards

  • Zero Implicit State Mutation: Never mutate global or private third-party state directly; keep mutations scoped and immutable.
  • Strict Guard Clauses: Flatten nested if/else loops using early returns and validation gates.
  • Explicit Error Boundaries: Never swallow exceptions or return dummy fallbacks silently; handle errors gracefully or propagate.
  • Type Safety Discipline: Remove all any types; enforce strict TypeScript types and type guards.

3. Complexity Reduction & Naming

  • Intent-Revealing Naming: Replace vague variables (data, temp, x) with domain-specific names.
  • Memory & Resource Safety: Verify that all subscriptions, timers, and listeners have proper cleanup hooks.

Output Template

  1. 🔍 Code Review Findings: Code strengths, anti-patterns, and technical debt detected.
  2. 🔄 Refactoring Proposal (Before / After):
    • Before: Problematic code.
    • After: Refactored, production-ready Clean Code.
  3. Impact & Benefits: Performance, readability, and maintenance advantages gained.
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 · 37 lines · 438 tokens per session scan A 7cb28fb141de

Subscribe to this mod's changes

clean-code-reviewer is a cursor rule published in the GitHub repository GktuOktay/ai-skills (2 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 438 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-09-03.