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.mdcin 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
.cursorfolder in thenew_codebasealong withgit initinnew_codebase. Inside the.cursorfolder, I run the bash script. Note that the bash script will be located at the originalmy_cursor_rulesrepo. - The bash script clones the
my_cursor_rulesinto the.cursorfolder. 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.cursorfolder into the.gitignoreof the parent git, the parent git will ignore the.cursorfolder. This setup will allow you to pull and push themy_cursor_rulesfrom the different repos you are working on.