$npx -y skills add girijashankarj/cursor-handbook --skill cursor-setupSet up cursor-handbook in a new project by cloning, configuring, and validating the .cursor directory. Use when the user asks to install cursor-handbook, set up a new project, or bootstrap Cursor configuration.
| 1 | # Skill: Cursor Setup |
| 2 | |
| 3 | Bootstrap cursor-handbook in any project — clone the repo, configure project settings, and validate the installation. |
| 4 | |
| 5 | ## Trigger |
| 6 | When the user asks to set up cursor-handbook in a new project, install the Cursor configuration, or bootstrap the `.cursor/` directory. |
| 7 | |
| 8 | ## Prerequisites |
| 9 | - [ ] `git` installed |
| 10 | - [ ] Target project directory exists |
| 11 | - [ ] No conflicting `.cursor/` directory (or user consents to backup) |
| 12 | |
| 13 | ## Usage |
| 14 | |
| 15 | Run the bundled script from the target project root: |
| 16 | |
| 17 | ```bash |
| 18 | scripts/setup-cursor.sh |
| 19 | ``` |
| 20 | |
| 21 | ### Environment Variables |
| 22 | - `CURSOR_CONFIG_REPO` — Override the default repository URL (optional) |
| 23 | |
| 24 | ## Steps |
| 25 | |
| 26 | ### Step 1: Check Prerequisites |
| 27 | - [ ] Verify `git` is installed |
| 28 | - [ ] Check if `.cursor/` already exists |
| 29 | - [ ] If exists, ask user whether to back up and replace |
| 30 | |
| 31 | ### Step 2: Run Setup |
| 32 | - [ ] Execute `scripts/setup-cursor.sh` using the Shell tool |
| 33 | - [ ] The script will: |
| 34 | 1. Back up existing `.cursor/` if needed |
| 35 | 2. Clone cursor-handbook into `.cursor/` |
| 36 | 3. Copy `project.json.template` to `project.json` |
| 37 | 4. Make hook scripts executable |
| 38 | |
| 39 | ### Step 3: Configure Project |
| 40 | - [ ] Open `.cursor/config/project.json` |
| 41 | - [ ] Guide the user to fill in: |
| 42 | - `project.name` — project identifier |
| 43 | - `techStack.language` — primary language (typescript, python, go, etc.) |
| 44 | - `techStack.framework` — framework (express, fastify, django, etc.) |
| 45 | - `techStack.database` — database (postgresql, mysql, mongodb, etc.) |
| 46 | - `techStack.cloud` — cloud provider (aws, gcp, azure) |
| 47 | - `paths.source` — source code root (e.g., `src/`) |
| 48 | - [ ] Replace all `{{PLACEHOLDER}}` values |
| 49 | |
| 50 | ### Step 4: Validate Installation |
| 51 | - [ ] Run the handbook validator to check structure |
| 52 | - [ ] Verify at least one `.mdc` rule exists |
| 53 | - [ ] Verify `project.json` has no remaining placeholders |
| 54 | |
| 55 | ### Step 5: Post-Setup |
| 56 | - [ ] Remind user to restart Cursor IDE |
| 57 | - [ ] Suggest testing with a quick command (e.g., `/type-check`) |
| 58 | - [ ] Point to `docs/getting-started/quick-start.md` for detailed guidance |
| 59 | |
| 60 | ## Rules |
| 61 | - **NEVER** overwrite `.cursor/` without user confirmation |
| 62 | - **ALWAYS** back up existing configuration before replacing |
| 63 | - **NEVER** hardcode repository credentials in the script |
| 64 | - The setup script is idempotent with user consent for overwrite |
| 65 | |
| 66 | ## Completion |
| 67 | cursor-handbook installed, `project.json` configured, and structure validated. User can restart Cursor and begin using commands and skills. |
| 68 | |
| 69 | ## If a Step Fails |
| 70 | - **Git not installed:** Direct user to install git |
| 71 | - **Clone fails:** Check network connectivity and repository URL |
| 72 | - **Backup fails:** Check disk space and permissions |
| 73 | - **No template found:** Create a minimal `project.json` manually |