Engineering Advanced CursorAI EditorRules

Cursor Rules Engineer

Create optimized .cursorrules and AI editor configuration files from codebase analysis. Boost AI coding assistant accuracy and consistency.

A meta-engineering skill that analyzes your codebase and generates optimized AI editor configuration — .cursorrules, .cursor/rules/*.mdc, and related files. It identifies your tech stack, coding conventions, testing patterns, and anti-patterns, then encodes them into rules that make AI coding suggestions consistent with your actual codebase.

Added Mar 20, 2026

$npx skills add johnefemer/skillfish --skill cursor-rules-engineer

What This Skill Can Do

Concrete capabilities you get when you install this skill.

Analyze a codebase and extract implicit conventions for AI editor rules

Generate .cursorrules and .cursor/rules/*.mdc files from codebase patterns

Write scoped rules (auto-attached vs always-on) for different file types and directories

Encode project-specific anti-patterns as negative rules to prevent AI regressions

Create rules for test file patterns, import conventions, and naming standards

Audit existing cursor rules for conflicts, redundancy, and missing coverage

Real Conversations

See how the Cursor Rules Engineer skill responds to actual requests. These are representative examples of what your AI agent will produce.

You

I have a React + TypeScript monorepo. Can you help me create effective cursor rules based on our codebase conventions?

Agent

To generate accurate rules, I need to analyze your codebase patterns first. Share samples of:

  1. A typical component file
  2. A typical hook
  3. A test file
  4. Your tsconfig.json and any eslint config

Based on common React/TypeScript monorepo patterns, here's a starting template to customize:

# .cursor/rules/react-typescript.mdc
---
glob: "**/*.{tsx,ts}"
---

## TypeScript Conventions
- Use `type` for object shapes, `interface` for class contracts and extension
- Prefer `const` assertions and `satisfies` over type casting
- No `any` — use `unknown` and narrow with type guards

## React Patterns
- Functional components only — no class components
- Custom hooks in `src/hooks/use*.ts`, co-located with feature if single-use
- Component props: inline type definitions for simple props, named `type ComponentNameProps` for reuse
- Event handlers: `handle` prefix (handleClick, handleSubmit)

## Imports
- Absolute imports via `@/` alias (maps to `src/`)
- Group: external deps → internal modules → relative imports → styles
- No barrel re-exports from index.ts (causes circular dep risk)

## Testing
- Tests co-located: `ComponentName.test.tsx` next to `ComponentName.tsx`
- Use `testing-library/react` — no Enzyme
- Prefer `userEvent` over `fireEvent` for interaction tests

## Anti-patterns (never generate these)
- `useEffect` for data fetching — use React Query or SWR
- Inline styles — use Tailwind classes or CSS modules
- Default exports from non-page components

Share your actual files and I'll refine the rules to match your real conventions precisely.

Get Started

How to install and use this skill in your preferred environment.

Skills are designed for AI coding agents (Claude Code, Cursor, Windsurf) and IDE-based workflows where the agent can read files, run scripts, and act on your codebase.

Models & Context

Which AI models and context windows work best with this skill.

Recommended Models

Works well with Claude Sonnet or GPT-4o. Codebase analysis and rule generation benefits from models that can reason about code patterns and conventions.

Context Window

SKILL.md is ~7KB. Load representative source files and existing rules in context — the more codebase samples, the more accurate the generated rules.

Pro tips for best results

1

Be specific

Include numbers — users, budget, RPS — so the skill can size the architecture.

2

Share constraints

Compliance needs, team size, and existing stack all improve the output.

3

Iterate

Start with a high-level design, then ask follow-ups for IaC, cost analysis, or security review.

4

Combine skills

Pair with companion skills below for end-to-end coverage.

Works Great With

These skills complement Cursor Rules Engineer for end-to-end coverage. Install them together for better results.

$ skillfish add johnefemer/skillfish --all # install all skills at once

Ready to try Cursor Rules Engineer?

Install the skill and start getting expert-level guidance in your workflow — any agent, any IDE.

$npx skills add johnefemer/skillfish --skill cursor-rules-engineer
← Browse all skills