|
| 1 | +--- |
| 2 | +name: tools-speckit-init |
| 3 | +description: Initialize a new directory with spec-kit (specify) and install the spec-kit-sync extension |
| 4 | +argument-hint: <directory-name> (e.g. my-new-component) |
| 5 | +--- |
| 6 | + |
| 7 | +This skill creates a new directory, initializes it with `specify init . --ai claude`, and installs the `spec-kit-sync` extension. |
| 8 | + |
| 9 | +## Input |
| 10 | + |
| 11 | +The user must provide a directory name as an argument (e.g. `/tools-speckit-init my-new-component`). |
| 12 | + |
| 13 | +If no argument is provided, show the hint and stop. |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | + |
| 17 | +- `specify` must be installed and available on PATH (`which specify` should succeed) |
| 18 | +- If not installed, inform the user that `specify` is required and stop |
| 19 | + |
| 20 | +## Steps |
| 21 | + |
| 22 | +1. Verify that `specify` is installed by running `which specify`. If it fails, tell the user to install specify first and stop. |
| 23 | + |
| 24 | +2. Check that the target directory does not already exist. If it does, inform the user and stop. |
| 25 | + |
| 26 | +3. Create the new directory: |
| 27 | + ```bash |
| 28 | + mkdir -p <directory-name> |
| 29 | + ``` |
| 30 | + |
| 31 | +4. Initialize spec-kit in the new directory: |
| 32 | + ```bash |
| 33 | + cd <directory-name> && specify init . --ai claude |
| 34 | + ``` |
| 35 | + |
| 36 | +5. Install the spec-kit-sync extension: |
| 37 | + ```bash |
| 38 | + cd <directory-name> && specify extension add spec-kit-sync --from https://github.com/bgervin/spec-kit-sync/archive/refs/heads/master.zip |
| 39 | + ``` |
| 40 | + |
| 41 | +6. Report success and tell the user: |
| 42 | + - The directory has been created and initialized |
| 43 | + - spec-kit-sync extension has been installed |
| 44 | + - They can now use specify commands in the new directory (e.g. `/speckit-specify`, `/speckit-clarify`) |
| 45 | + - The path to the new directory |
| 46 | + |
| 47 | +## Notes |
| 48 | + |
| 49 | +- The directory is created relative to the current working directory |
| 50 | +- If `specify init` or the extension install fails, report the error to the user with the command output |
0 commit comments