This repository contains prompt rules for the coding agent in Cursor.
My typical workflow consists of the following steps:
- Plan the codebase development using an advanced reasoning LLM.
- Once the high-level plan is complete, use
plan_creation.mdc
in Cursor to generate a detailed, step-by-step coding plan. - The step-by-step plan is then executed by the Cursor agent using
plan_execution.mdc
.
The remaining rules are used for debugging and for controlling general coding behavior.
I used the following references to create the rules:
- This GitHub post
- This and this Twitter post
Setting up the cursor rules in a new codebase (called new_codebase
here) is quite easy:
- I create a
.cursor
folder in thenew_codebase
along withgit init
innew_codebase
. Inside the.cursor
folder, I run the bash script. Note that the bash script will be located at the originalmy_cursor_rules
repo. - The bash script clones the
my_cursor_rules
into the.cursor
folder. This will lead to nested git repos, which is not good practice but the only reasonable way to manage cursor rules across many repos. Since the bash script automatically puts the.cursor
folder into the.gitignore
of the parent git, the parent git will ignore the.cursor
folder. This setup will allow you to pull and push themy_cursor_rules
from the different repos you are working on.