quality

A code and interface quality checklist for reviewing work before release. It covers code structure, type safety, accessibility, responsive design, and visual consistency.

In plain words
What is it for?
Use it as a pre-release review guide for frontend code and designs, including component structure, shared types, API organization, spacing, typography, animation, and accessibility.
Why use it?
It helps catch oversized components, duplicated logic, weak validation, unclear interaction states, poor contrast, and mobile-design problems before shipping.

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/chihebnabil/lovable-boilerplate/quality
Clone the repo
git clone --depth 1 https://github.com/chihebnabil/lovable-boilerplate

Made for: Cursor.

Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 684 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.00011 $0.00684
Opus 5 $0.00005 $0.00342
Sonnet 5 $0.00002 $0.00137
Haiku 4.5 $0.00001 $0.00068

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

Security

Grade A, and why

quality 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/quality.mdc · 95 lines

How it starts

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

Quality Checklist Rules

Pre-Ship Quality Gates

Code Architecture Quality

  • No monolithic components - Each component under 300 lines with single responsibility
  • Logic extraction - Reusable logic moved to custom hooks, not duplicated
  • Type safety - Shared interfaces defined in lib/types.ts and reused
  • Service layer - API calls abstracted to service functions, not inline
  • Proper imports - Using path aliases (@/) and organized import groups
  • Validation schemas - Zod schemas shared and reused across components
  • Component composition - Complex UI built from smaller, focused components

Design Quality

  • Uses intentional color palette that serves the design purpose
  • Has proper visual hierarchy with varied typography scales
  • Includes subtle animations and micro-interactions
  • Features generous whitespace and purposeful spacing
  • All interactive elements have clear hover/active states
  • Accessibility standards are met (proper contrast, focus states)
  • Mobile experience is thoughtfully designed
  • Maintains cohesive visual story throughout
  • Design feels custom-crafted, not template-like
  • Visual identity matches target industry and audience
  • Color choices enhance user experience and brand message

Essential Commands Check

npm run lint         # MUST pass before shipping
npm run build        # MUST succeed without errors

NEVER Ship Code That:

  • Contains components over 300 lines mixing multiple concerns
  • Has duplicated logic that could be extracted to hooks
  • Uses inline API calls instead of service layer
  • Lacks proper TypeScript interfaces
  • Has accessibility contrast violations
  • Contains copy-pasted code blocks
  • Mixes business logic with presentation layer
  • Has console errors or warnings
  • Fails ESLint checks

Development Workflow

  1. Run npm run dev to start development
  2. Follow component size limits (300 lines max)
  3. Extract reusable logic to hooks
  4. Test responsive design on mobile/desktop
  5. Verify accessibility contrast ratios
  6. Run npm run lint and fix all issues
  7. Ensure no console errors before shipping

Read the full file on GitHub · 95 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 · 95 lines · 11 tokens per session scan A 4811285e2fca

Subscribe to this mod's changes

quality is a cursor rule published in the GitHub repository chihebnabil/lovable-boilerplate (65 stars, last pushed 1mo ago), licensed MIT. It adds 11 tokens to every session and 684 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.