This repository contains shared cursor rules that can be integrated into multiple projects. These rules help maintain consistency across different codebases by providing reusable AI assistant instructions and behaviors.
cursor-rules/
├── sync-shared-rules.sh # Script to sync rules to your project
├── README.md # This file
├── three-step-issue-resolution.mdc # Example cursor rule
└── *.mdc # Additional cursor rule files
In your target repository, add this repository as a git submodule in the .cursor/shared_rules
directory:
# Navigate to your project root
cd your-project/
# Add the submodule
git submodule add https://github.com/awell-health/cursor-rules.git .cursor/shared_rules
# Commit the submodule addition
git add .gitmodules .cursor/shared_rules
git commit -m "Add shared cursor rules submodule"
Run the sync script to copy shared rules to your local cursor rules directory:
# Make the script executable (first time only)
chmod +x .cursor/shared_rules/sync-shared-rules.sh
# Run the sync script
./.cursor/shared_rules/sync-shared-rules.sh
To get the latest shared rules, simply run the sync script again:
./.cursor/shared_rules/sync-shared-rules.sh
- Updates Submodule: Pulls the latest changes from the shared rules repository
- Creates Directory: Ensures
.cursor/rules
directory exists - Copies Rules: Copies all
.mdc
files from shared rules to local rules - Provides Feedback: Shows detailed status and success messages
Note: This system assumes your cursor rules are stored as .mdc
files in the .cursor/rules
directory, which is the standard convention for Cursor AI editor.