Cursor Project Rules Generator for Your Repo's Stack
Has Cursor inspect your repository and write 3-5 scoped .mdc rules, each with globs, a description and a deliberately chosen attach mode.
You get: Working code with an explanation
Ready to use: no blanks to fill in.
The prompt
mkdir -p .agents/skills/cursor-project-rules-generator-for-your-repo-s-stack && curl -sL "https://prompts-gpt.com/prompts/cursor-project-rules-generator-for-your-repo-s-stack/raw" -o .agents/skills/cursor-project-rules-generator-for-your-repo-s-stack/SKILL.mdAct as a senior engineer setting up Cursor project rules for this repository. Inspect the codebase first: read dependency manifests, config files, folder layout, test setup and a sample of source files to identify the stack and the conventions actually in use. If the stack or main workflow is unclear, ask me one or two short questions before writing anything.
Then draft 3 to 5 scoped rules for .cursor/rules/.
- Each rule covers one concern, such as UI components, API layer, tests or database migrations, and stays under 50 lines.
- Base every instruction on patterns you saw in this repo, and cite one example file path per rule.
- Choose the attach mode deliberately: Always (alwaysApply true) only for repo-wide essentials, Auto Attached with globs for file-type rules, Agent Requested with a precise description for task-based rules, Manual for rare cases.
- Replace generic advice like "write clean code" with concrete dos and don'ts.
Output for each rule: the file name, then the full .mdc file in a code block with frontmatter (description, globs, alwaysApply) and body. Finish with a table: rule, attach mode, why that mode, evidence file. Then list anything you could not verify. Do not create files until I approve.Example output
Tips and common edits
Run in Cursor Agent mode with the repo open, ideally at the project root. No paste needed; answer the one or two questions if Cursor asks.
Questions about this prompt
More like this
More in CursorCursor .mdc Rules to Portable AGENTS.md Converter
Converts your pasted Cursor .mdc rules into a single AGENTS.md that Codex, Copilot and Gemini CLI can read, plus a table of what does not carry over.
Lean CLAUDE.md Generator from Repo Inspection
Claude Code inspects your repository and writes a CLAUDE.md under 200 lines with verified commands first, checkable conventions, anti-patterns and the reasons behind key decisions.
Characterization Tests Before a Refactor
Writes tests that lock in a module's current behavior, including edge cases and quirks, so you can refactor safely.
Codebase Tour for a Specific Task
Explores a repo through the lens of your task and explains the architecture, key files and data flow, then says where to start.
Coding Agent Task Brief with Guardrails, Test Plan, and Rollback Steps
Creates a scoped brief for an AI coding agent that limits file changes, defines tests, and includes a rollback plan and review checklist.
Cursor Agent Bug Triage: Reproduce, Root-Cause, Fix, and Regression Test
Guides Cursor Agent through reproducing a bug, isolating the root cause with evidence, applying a minimal diff, and adding a regression test, ending with a verification checklist and risks.
Cursor Characterization-Test-First Refactor of a Legacy Module
Has Cursor lock in current behavior with characterization tests before restructuring a legacy module in small steps, so you can decide whether the refactor preserved behavior and is safe to merge.
Cursor Incremental Dependency Migration Plan and Codemod Execution
Plans and executes a library or framework version migration in Cursor in small, verifiable batches, with an impact inventory, rollback points, and per-batch test gates instead of one risky bulk edit.
Cursor Refactor of a Component With Zero Behaviour Change
Has the Cursor agent restructure a messy component into smaller pieces while proving the behaviour stays identical, using existing tests or new characterization tests first.
Dependency Graph Planner for a Multi-Agent Software Release Workflow
Turns a list of release tasks into a dependency graph with parallel batches, critical path, shared-resource conflicts, and agent assignments. Supports the decision on what to run now versus wait on.
Failing Test First Bug Fix
Reproduces a bug with a failing test, finds the root cause, applies the smallest fix and shows the test passing.
Plan Before Edit: Cursor Plan-Mode Prompt for a Feature Request
Produces a read-only Cursor plan listing files in scope, ordered steps, specific risks and tests to run before any code is changed.