# Cursor Rules Collection

> Battle-tested rules for AI coding agents. 10 skills covering React, Next.js, TypeScript, Express, Python, error handling, testing, security, API design, and performance. Each rule targets specific, concrete behaviors that actually change agent output — not generic best practices. Use when writing, reviewing, or refactoring code in any of these stacks.

- Skill: `nedcodes-ok/cursor-rules-collection` (Agent Skill, multi-file: 13 files)
- Install (CLI): `npx skillmds@latest add nedcodes-ok/cursor-rules-collection`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nedcodes-ok/cursor-rules-collection/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- License: MIT
- Author: nedcodes-ok (https://skillmd.com/u/nedcodes-ok)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/nedcodes-ok/cursor-rules-collection

---


# Cursor Rules Collection

Battle-tested rules for AI coding agents. Every rule has been verified to actually change agent output — if a rule didn't produce measurably different code in testing, it's not here.

## What's Included

| Skill | Impact | What It Covers |
|-------|--------|----------------|
| react-patterns | HIGH | Hooks, composition, memoization, Server Components |
| nextjs-app-router | HIGH | App Router, Server Actions, caching, revalidation |
| typescript-strict | HIGH | Strict mode patterns, branded types, discriminated unions |
| express-api | HIGH | Middleware, error handling, validation, security headers |
| python-backend | HIGH | Type hints, async patterns, Pydantic, structured errors |
| error-handling | CRITICAL | Error boundaries, recovery, user-facing messages |
| security | CRITICAL | Auth, injection prevention, XSS, CSRF, secrets |
| testing-patterns | HIGH | Test structure, mocking, coverage, edge cases |
| api-design | MEDIUM | REST conventions, validation, versioning, pagination |
| performance | HIGH | Lazy loading, caching, bundle size, code splitting |

## When to Apply

Use these rules when:
- Writing new components, APIs, or backend services
- Refactoring existing code for better patterns
- Reviewing code for common mistakes
- Setting up new projects with good defaults

## What Makes These Different

Every rule contains something you can't get from a generic LLM prompt:
- Version-specific gotchas (e.g., Express 5 vs 4 patterns)
- Tested edge cases with before/after examples
- Anti-patterns with explanations of why they fail
- Framework-specific patterns, not language-generic advice

## Related Tools

- [cursor-doctor](https://github.com/nedcodes-ok/cursor-doctor) — lint your rules, detect conflicts, see load order
- [Full collection](https://github.com/nedcodes-ok/cursorrules-collection) — 98 rules across 30+ frameworks

