solmate-skills 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solmate-skills",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Curated skills for Solmate projects",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -0,0 +1,231 @@
1
+ {
2
+ "name": "stitch-to-react-pro",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "stitch-to-react-pro",
9
+ "version": "1.0.0",
10
+ "dependencies": {
11
+ "@swc/core": "^1.3.100"
12
+ },
13
+ "engines": {
14
+ "node": ">=18.0.0"
15
+ }
16
+ },
17
+ "node_modules/@swc/core": {
18
+ "version": "1.15.8",
19
+ "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.8.tgz",
20
+ "integrity": "sha512-T8keoJjXaSUoVBCIjgL6wAnhADIb09GOELzKg10CjNg+vLX48P93SME6jTfte9MZIm5m+Il57H3rTSk/0kzDUw==",
21
+ "hasInstallScript": true,
22
+ "license": "Apache-2.0",
23
+ "dependencies": {
24
+ "@swc/counter": "^0.1.3",
25
+ "@swc/types": "^0.1.25"
26
+ },
27
+ "engines": {
28
+ "node": ">=10"
29
+ },
30
+ "funding": {
31
+ "type": "opencollective",
32
+ "url": "https://opencollective.com/swc"
33
+ },
34
+ "optionalDependencies": {
35
+ "@swc/core-darwin-arm64": "1.15.8",
36
+ "@swc/core-darwin-x64": "1.15.8",
37
+ "@swc/core-linux-arm-gnueabihf": "1.15.8",
38
+ "@swc/core-linux-arm64-gnu": "1.15.8",
39
+ "@swc/core-linux-arm64-musl": "1.15.8",
40
+ "@swc/core-linux-x64-gnu": "1.15.8",
41
+ "@swc/core-linux-x64-musl": "1.15.8",
42
+ "@swc/core-win32-arm64-msvc": "1.15.8",
43
+ "@swc/core-win32-ia32-msvc": "1.15.8",
44
+ "@swc/core-win32-x64-msvc": "1.15.8"
45
+ },
46
+ "peerDependencies": {
47
+ "@swc/helpers": ">=0.5.17"
48
+ },
49
+ "peerDependenciesMeta": {
50
+ "@swc/helpers": {
51
+ "optional": true
52
+ }
53
+ }
54
+ },
55
+ "node_modules/@swc/core-darwin-arm64": {
56
+ "version": "1.15.8",
57
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.8.tgz",
58
+ "integrity": "sha512-M9cK5GwyWWRkRGwwCbREuj6r8jKdES/haCZ3Xckgkl8MUQJZA3XB7IXXK1IXRNeLjg6m7cnoMICpXv1v1hlJOg==",
59
+ "cpu": [
60
+ "arm64"
61
+ ],
62
+ "license": "Apache-2.0 AND MIT",
63
+ "optional": true,
64
+ "os": [
65
+ "darwin"
66
+ ],
67
+ "engines": {
68
+ "node": ">=10"
69
+ }
70
+ },
71
+ "node_modules/@swc/core-darwin-x64": {
72
+ "version": "1.15.8",
73
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.8.tgz",
74
+ "integrity": "sha512-j47DasuOvXl80sKJHSi2X25l44CMc3VDhlJwA7oewC1nV1VsSzwX+KOwE5tLnfORvVJJyeiXgJORNYg4jeIjYQ==",
75
+ "cpu": [
76
+ "x64"
77
+ ],
78
+ "license": "Apache-2.0 AND MIT",
79
+ "optional": true,
80
+ "os": [
81
+ "darwin"
82
+ ],
83
+ "engines": {
84
+ "node": ">=10"
85
+ }
86
+ },
87
+ "node_modules/@swc/core-linux-arm-gnueabihf": {
88
+ "version": "1.15.8",
89
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.8.tgz",
90
+ "integrity": "sha512-siAzDENu2rUbwr9+fayWa26r5A9fol1iORG53HWxQL1J8ym4k7xt9eME0dMPXlYZDytK5r9sW8zEA10F2U3Xwg==",
91
+ "cpu": [
92
+ "arm"
93
+ ],
94
+ "license": "Apache-2.0",
95
+ "optional": true,
96
+ "os": [
97
+ "linux"
98
+ ],
99
+ "engines": {
100
+ "node": ">=10"
101
+ }
102
+ },
103
+ "node_modules/@swc/core-linux-arm64-gnu": {
104
+ "version": "1.15.8",
105
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.8.tgz",
106
+ "integrity": "sha512-o+1y5u6k2FfPYbTRUPvurwzNt5qd0NTumCTFscCNuBksycloXY16J8L+SMW5QRX59n4Hp9EmFa3vpvNHRVv1+Q==",
107
+ "cpu": [
108
+ "arm64"
109
+ ],
110
+ "license": "Apache-2.0 AND MIT",
111
+ "optional": true,
112
+ "os": [
113
+ "linux"
114
+ ],
115
+ "engines": {
116
+ "node": ">=10"
117
+ }
118
+ },
119
+ "node_modules/@swc/core-linux-arm64-musl": {
120
+ "version": "1.15.8",
121
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.8.tgz",
122
+ "integrity": "sha512-koiCqL09EwOP1S2RShCI7NbsQuG6r2brTqUYE7pV7kZm9O17wZ0LSz22m6gVibpwEnw8jI3IE1yYsQTVpluALw==",
123
+ "cpu": [
124
+ "arm64"
125
+ ],
126
+ "license": "Apache-2.0 AND MIT",
127
+ "optional": true,
128
+ "os": [
129
+ "linux"
130
+ ],
131
+ "engines": {
132
+ "node": ">=10"
133
+ }
134
+ },
135
+ "node_modules/@swc/core-linux-x64-gnu": {
136
+ "version": "1.15.8",
137
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.8.tgz",
138
+ "integrity": "sha512-4p6lOMU3bC+Vd5ARtKJ/FxpIC5G8v3XLoPEZ5s7mLR8h7411HWC/LmTXDHcrSXRC55zvAVia1eldy6zDLz8iFQ==",
139
+ "cpu": [
140
+ "x64"
141
+ ],
142
+ "license": "Apache-2.0 AND MIT",
143
+ "optional": true,
144
+ "os": [
145
+ "linux"
146
+ ],
147
+ "engines": {
148
+ "node": ">=10"
149
+ }
150
+ },
151
+ "node_modules/@swc/core-linux-x64-musl": {
152
+ "version": "1.15.8",
153
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.8.tgz",
154
+ "integrity": "sha512-z3XBnbrZAL+6xDGAhJoN4lOueIxC/8rGrJ9tg+fEaeqLEuAtHSW2QHDHxDwkxZMjuF/pZ6MUTjHjbp8wLbuRLA==",
155
+ "cpu": [
156
+ "x64"
157
+ ],
158
+ "license": "Apache-2.0 AND MIT",
159
+ "optional": true,
160
+ "os": [
161
+ "linux"
162
+ ],
163
+ "engines": {
164
+ "node": ">=10"
165
+ }
166
+ },
167
+ "node_modules/@swc/core-win32-arm64-msvc": {
168
+ "version": "1.15.8",
169
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.8.tgz",
170
+ "integrity": "sha512-djQPJ9Rh9vP8GTS/Df3hcc6XP6xnG5c8qsngWId/BLA9oX6C7UzCPAn74BG/wGb9a6j4w3RINuoaieJB3t+7iQ==",
171
+ "cpu": [
172
+ "arm64"
173
+ ],
174
+ "license": "Apache-2.0 AND MIT",
175
+ "optional": true,
176
+ "os": [
177
+ "win32"
178
+ ],
179
+ "engines": {
180
+ "node": ">=10"
181
+ }
182
+ },
183
+ "node_modules/@swc/core-win32-ia32-msvc": {
184
+ "version": "1.15.8",
185
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.8.tgz",
186
+ "integrity": "sha512-/wfAgxORg2VBaUoFdytcVBVCgf1isWZIEXB9MZEUty4wwK93M/PxAkjifOho9RN3WrM3inPLabICRCEgdHpKKQ==",
187
+ "cpu": [
188
+ "ia32"
189
+ ],
190
+ "license": "Apache-2.0 AND MIT",
191
+ "optional": true,
192
+ "os": [
193
+ "win32"
194
+ ],
195
+ "engines": {
196
+ "node": ">=10"
197
+ }
198
+ },
199
+ "node_modules/@swc/core-win32-x64-msvc": {
200
+ "version": "1.15.8",
201
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.8.tgz",
202
+ "integrity": "sha512-GpMePrh9Sl4d61o4KAHOOv5is5+zt6BEXCOCgs/H0FLGeii7j9bWDE8ExvKFy2GRRZVNR1ugsnzaGWHKM6kuzA==",
203
+ "cpu": [
204
+ "x64"
205
+ ],
206
+ "license": "Apache-2.0 AND MIT",
207
+ "optional": true,
208
+ "os": [
209
+ "win32"
210
+ ],
211
+ "engines": {
212
+ "node": ">=10"
213
+ }
214
+ },
215
+ "node_modules/@swc/counter": {
216
+ "version": "0.1.3",
217
+ "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
218
+ "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==",
219
+ "license": "Apache-2.0"
220
+ },
221
+ "node_modules/@swc/types": {
222
+ "version": "0.1.25",
223
+ "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz",
224
+ "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==",
225
+ "license": "Apache-2.0",
226
+ "dependencies": {
227
+ "@swc/counter": "^0.1.3"
228
+ }
229
+ }
230
+ }
231
+ }
@@ -1,4 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: voltagent
4
-
@@ -1,46 +0,0 @@
1
- name: Design MD Request
2
- description: Request a DESIGN.md generated from a website
3
- title: "DESIGN.md for <your website>"
4
- labels: ["design-md"]
5
-
6
- body:
7
- - type: markdown
8
- attributes:
9
- value: |
10
- Fill out the form below to request a DESIGN.md generation for your website.
11
- - type: input
12
- id: website
13
- attributes:
14
- label: Website URL
15
- description: The website you want us to generate DESIGN.md for
16
- placeholder: https://example.com
17
- validations:
18
- required: true
19
-
20
- - type: input
21
- id: email
22
- attributes:
23
- label: Delivery Email
24
- description: Email address where we should send the generated DESIGN.md
25
- placeholder: you@example.com
26
- validations:
27
- required: true
28
-
29
- - type: dropdown
30
- id: sponsor
31
- attributes:
32
- label: Do you want to prioritize your DESIGN.md generation request?
33
- description: We receive many requests to generate DESIGN.md. As we maintain multiple open-source projects with limited bandwidth, sponsor-backed requests are prioritized. Select the "Priority DESIGN.md generation (awesome-design-md)" tier on [GitHub Sponsors](https://github.com/sponsors/VoltAgent).
34
- options:
35
- - "Yes, I am a GitHub Sponsor"
36
- - "No, I am not a sponsor"
37
- validations:
38
- required: true
39
-
40
- - type: textarea
41
- id: details
42
- attributes:
43
- label: Additional Details (optional)
44
- description: Anything else you'd like us to know about this request
45
- validations:
46
- required: false
@@ -1,3 +0,0 @@
1
- {
2
- "packages": {}
3
- }
@@ -1,21 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches:
7
- - main
8
-
9
- jobs:
10
- validate:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
-
15
- - uses: actions/setup-node@v4
16
- with:
17
- node-version: 20
18
- cache: npm
19
-
20
- - run: npm ci
21
- - run: npm run ci
@@ -1,51 +0,0 @@
1
- name: Release npm packages
2
-
3
- on:
4
- workflow_dispatch:
5
- push:
6
- branches:
7
- - main
8
- paths:
9
- - ".changeset/**"
10
- - ".github/workflows/release-npm.yml"
11
- - "package-lock.json"
12
- - "package.json"
13
- - "packages/**"
14
-
15
- permissions:
16
- contents: write
17
- pull-requests: write
18
- id-token: write
19
-
20
- # npm publishes authenticate with the repository-level NPM_TOKEN secret.
21
- # id-token stays enabled so npm can still attach provenance when supported.
22
-
23
- jobs:
24
- release:
25
- runs-on: ubuntu-latest
26
- steps:
27
- - uses: actions/checkout@v4
28
- with:
29
- fetch-depth: 0
30
-
31
- - uses: actions/setup-node@v4
32
- with:
33
- node-version: 24
34
- cache: npm
35
- registry-url: https://registry.npmjs.org
36
-
37
- - run: npm ci
38
- - run: npm run ci
39
-
40
- - name: Create npm release PR or publish changed packages
41
- uses: changesets/action@v1
42
- with:
43
- version: npm run version-packages
44
- publish: npm run release:npm
45
- commit: "chore: version packages"
46
- title: "chore: version packages"
47
- createGithubReleases: false
48
- env:
49
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51
- NPM_CONFIG_PROVENANCE: "true"
@@ -1,41 +0,0 @@
1
- name: Release Python packages
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- paths:
8
- - ".github/release-please/**"
9
- - ".github/workflows/release-python.yml"
10
- - "python-packages/**"
11
- workflow_dispatch:
12
-
13
- permissions:
14
- contents: write
15
- pull-requests: write
16
- id-token: write
17
-
18
- jobs:
19
- scaffold-only:
20
- if: ${{ hashFiles('python-packages/**/pyproject.toml') == '' }}
21
- runs-on: ubuntu-latest
22
- steps:
23
- - run: echo "No Python package exists yet. release-please remains scaffold-only."
24
-
25
- release:
26
- if: ${{ hashFiles('python-packages/**/pyproject.toml') != '' }}
27
- runs-on: ubuntu-latest
28
- steps:
29
- - uses: actions/checkout@v4
30
-
31
- - id: release
32
- uses: googleapis/release-please-action@v4
33
- with:
34
- config-file: .github/release-please/python-config.json
35
- manifest-file: .github/release-please/python-manifest.json
36
-
37
- - name: Reminder
38
- if: ${{ steps.release.outputs.releases_created == 'true' }}
39
- run: |
40
- echo "Python package release metadata was created."
41
- echo "Wire package-specific build/publish steps here when the first python package is added."
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- secrets_file="${1:-$HOME/.config/k-skill/secrets.env}"
5
-
6
- missing=0
7
-
8
- if [[ ! -f "$secrets_file" ]]; then
9
- echo "missing secrets file: $secrets_file"
10
- missing=1
11
- else
12
- perms=$(stat -f '%Lp' "$secrets_file" 2>/dev/null || stat -c '%a' "$secrets_file" 2>/dev/null)
13
- if [[ "$perms" != "600" ]]; then
14
- echo "insecure permissions on $secrets_file: $perms (expected 600)"
15
- missing=1
16
- fi
17
- fi
18
-
19
- if [[ "$missing" -ne 0 ]]; then
20
- cat <<EOF
21
- next steps:
22
- 1. create ~/.config/k-skill/secrets.env with your credentials
23
- 2. chmod 0600 ~/.config/k-skill/secrets.env
24
- 3. run this check again
25
- EOF
26
- exit 1
27
- fi
28
-
29
- echo "k-skill setup looks usable"
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
- SECRETS_FILE="${KSKILL_SECRETS_FILE:-$HOME/.config/k-skill/secrets.env}"
6
-
7
- if [[ -f "$SECRETS_FILE" ]]; then
8
- set -a
9
- # shellcheck disable=SC1090
10
- source "$SECRETS_FILE"
11
- set +a
12
- fi
13
-
14
- cd "$ROOT_DIR"
15
- exec node packages/k-skill-proxy/src/server.js
@@ -1,56 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
- status=0
6
-
7
- while IFS= read -r -d '' skill_dir; do
8
- skill_name="$(basename "$skill_dir")"
9
- skill_file="$skill_dir/SKILL.md"
10
-
11
- if [[ ! -f "$skill_file" ]]; then
12
- echo "missing SKILL.md: $skill_name"
13
- status=1
14
- continue
15
- fi
16
-
17
- if ! head -n 1 "$skill_file" | grep -qx -- "---"; then
18
- echo "missing frontmatter start: $skill_file"
19
- status=1
20
- fi
21
-
22
- if ! grep -q '^name: ' "$skill_file"; then
23
- echo "missing name field: $skill_file"
24
- status=1
25
- fi
26
-
27
- if ! grep -q '^description: ' "$skill_file"; then
28
- echo "missing description field: $skill_file"
29
- status=1
30
- fi
31
-
32
- declared_name="$(sed -n 's/^name: //p' "$skill_file" | head -n 1 | tr -d '"')"
33
- if [[ "$declared_name" != "$skill_name" ]]; then
34
- echo "name mismatch: $skill_file declares '$declared_name' but directory is '$skill_name'"
35
- status=1
36
- fi
37
- done < <(
38
- find "$root" -mindepth 1 -maxdepth 1 -type d \
39
- ! -name .git \
40
- ! -name .github \
41
- ! -name .omx \
42
- ! -name .changeset \
43
- ! -name docs \
44
- ! -name node_modules \
45
- ! -name packages \
46
- ! -name python-packages \
47
- ! -name scripts \
48
- ! -name examples \
49
- -print0
50
- )
51
-
52
- if [[ "$status" -ne 0 ]]; then
53
- exit "$status"
54
- fi
55
-
56
- echo "skill layout looks valid"
package/hooks/install.sh DELETED
@@ -1,131 +0,0 @@
1
- #!/usr/bin/env bash
2
- # solmate-skills: install.sh
3
- # Purpose: Install Solmate hook scripts into the current project's .claude/ directory
4
- # and merge hook configuration into .claude/settings.json.
5
- # Usage: bash .agent/skills/hooks/install.sh
6
- # (or run from any location: bash <path-to-hooks>/install.sh)
7
-
8
- set -euo pipefail
9
-
10
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11
- PROJECT_ROOT="$(pwd)"
12
- CLAUDE_DIR="$PROJECT_ROOT/.claude"
13
- HOOKS_DIR="$CLAUDE_DIR/hooks"
14
- SETTINGS_FILE="$CLAUDE_DIR/settings.json"
15
-
16
- echo "Solmate Skills — Hook Installer"
17
- echo "Project: $PROJECT_ROOT"
18
- echo ""
19
-
20
- # --- Step 1: Create .claude/hooks/ ---
21
- mkdir -p "$HOOKS_DIR"
22
- echo "[1/4] Created $HOOKS_DIR"
23
-
24
- # --- Step 2: Copy hook scripts ---
25
- cp "$SCRIPT_DIR/suggest-skills.sh" "$HOOKS_DIR/solmate-suggest.sh"
26
- cp "$SCRIPT_DIR/watch-files.sh" "$HOOKS_DIR/solmate-watch.sh"
27
- chmod +x "$HOOKS_DIR/solmate-suggest.sh"
28
- chmod +x "$HOOKS_DIR/solmate-watch.sh"
29
- echo "[2/4] Copied hook scripts:"
30
- echo " .claude/hooks/solmate-suggest.sh (UserPromptSubmit)"
31
- echo " .claude/hooks/solmate-watch.sh (PreToolUse)"
32
-
33
- # --- Step 3: Merge hook config into settings.json ---
34
- echo "[3/4] Merging hook config into $SETTINGS_FILE"
35
-
36
- python3 - "$SETTINGS_FILE" <<'PYEOF'
37
- import sys, json, os
38
-
39
- settings_path = sys.argv[1]
40
-
41
- # Load existing settings or start fresh
42
- if os.path.exists(settings_path):
43
- with open(settings_path, 'r') as f:
44
- try:
45
- settings = json.load(f)
46
- except json.JSONDecodeError:
47
- print(f" WARNING: {settings_path} has invalid JSON. Backing up and starting fresh.")
48
- os.rename(settings_path, settings_path + '.bak')
49
- settings = {}
50
- else:
51
- settings = {}
52
-
53
- hooks = settings.setdefault('hooks', {})
54
-
55
- # --- UserPromptSubmit hook ---
56
- suggest_cmd = "bash .claude/hooks/solmate-suggest.sh"
57
- submit_hooks = hooks.setdefault('UserPromptSubmit', [])
58
-
59
- # Check for duplicate
60
- already_has_suggest = any(
61
- h.get('command') == suggest_cmd
62
- for entry in submit_hooks
63
- for h in entry.get('hooks', [])
64
- )
65
- if not already_has_suggest:
66
- submit_hooks.append({
67
- "hooks": [{
68
- "type": "command",
69
- "command": suggest_cmd,
70
- "timeout": 5
71
- }]
72
- })
73
- print(" Added: UserPromptSubmit → solmate-suggest.sh")
74
- else:
75
- print(" Skipped (already exists): UserPromptSubmit → solmate-suggest.sh")
76
-
77
- # --- PreToolUse hook ---
78
- watch_cmd = "bash .claude/hooks/solmate-watch.sh"
79
- pre_hooks = hooks.setdefault('PreToolUse', [])
80
-
81
- already_has_watch = any(
82
- h.get('command') == watch_cmd
83
- for entry in pre_hooks
84
- for h in entry.get('hooks', [])
85
- )
86
- if not already_has_watch:
87
- pre_hooks.append({
88
- "matcher": "Read|Write|Edit|Bash",
89
- "hooks": [{
90
- "type": "command",
91
- "command": watch_cmd,
92
- "timeout": 5
93
- }]
94
- })
95
- print(" Added: PreToolUse (Read|Write|Edit|Bash) → solmate-watch.sh")
96
- else:
97
- print(" Skipped (already exists): PreToolUse → solmate-watch.sh")
98
-
99
- # Write back
100
- os.makedirs(os.path.dirname(settings_path), exist_ok=True)
101
- with open(settings_path, 'w') as f:
102
- json.dump(settings, f, indent=2, ensure_ascii=False)
103
- f.write('\n')
104
-
105
- print(f" Saved: {settings_path}")
106
- PYEOF
107
-
108
- # --- Step 4: Add .claude/hooks/ to .gitignore if not already there ---
109
- GITIGNORE="$PROJECT_ROOT/.gitignore"
110
- if [ -f "$GITIGNORE" ]; then
111
- if ! grep -q "\.claude/hooks/" "$GITIGNORE" 2>/dev/null; then
112
- echo "" >> "$GITIGNORE"
113
- echo "# Solmate hook scripts (project-local)" >> "$GITIGNORE"
114
- echo ".claude/hooks/" >> "$GITIGNORE"
115
- echo "[4/4] Added .claude/hooks/ to .gitignore"
116
- else
117
- echo "[4/4] .gitignore already excludes .claude/hooks/"
118
- fi
119
- else
120
- echo "[4/4] No .gitignore found — skipping"
121
- fi
122
-
123
- echo ""
124
- echo "Done. Hooks are active in this project."
125
- echo ""
126
- echo "What was installed:"
127
- echo " UserPromptSubmit → detects keywords in your prompts → suggests relevant skills"
128
- echo " PreToolUse → detects file patterns being edited → suggests relevant skills"
129
- echo ""
130
- echo "To review or disable hooks, open /hooks in Claude Code."
131
- echo "To uninstall, remove .claude/hooks/ and the 'hooks' section from .claude/settings.json."