Cursor Rules File Generator skill for Claude and Codex
Generates a Cursor rules file with short imperative rules, ranked constraints and clear no-go areas, so suggestions match how the project really works.
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a team wants a Cursor rules file that makes the editor's AI follow the project's stack, conventions and protected areas. Do not use for rules files for other editors or a one-off task brief. Related topics: AI, Coding, Engineering.
What it will ask you for
- Project name (free text, e.g. "Billing service")
- Main language and framework (free text, e.g. "TypeScript with Next.js")
- Folder structure and where things live (longer free text)
- Coding conventions to enforce (longer free text)
- Working habits (choose any: Prefer small diffs, Always add tests, No new dependencies without asking, Match existing patterns, Explain non-obvious changes)
- Files or areas the AI must not touch (longer free text)
- Include commit-message conventions (choose one: Yes, No)
How it works
- List the stack, structure and conventions from the inputs and drop anything the model would do by default.
- Rank the constraints by cost of violation and place the highest-cost ones at the top of the file.
- Write each rule as a short imperative that can be verified in a code diff.
- Add the boundaries section naming protected paths exactly, plus commit conventions if requested.
- Check that no rule contradicts another and the file reads cleanly in under two minutes.
What you get
A single rules file with short headed sections, imperative one-line rules, the strictest constraints first, and no filler prose.
What it watches out for
- Writing aspirational rules like 'write clean code' that cannot be checked.
- Burying the do-not-touch list at the bottom where it carries least weight.
- Restating defaults, which pads the file and hides the rules that matter.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.