solmate-skills 2.0.9 → 2.0.10
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/README.md +9 -0
- package/hooks/install.sh +2 -2
- package/hooks/watch-files.sh +14 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,6 +36,15 @@ The installer copies each selected skill folder into `.agent/skills/<skill-name>
|
|
|
36
36
|
- **Implementation workflow**: `/rules-workflow` keeps coding work tied to approved documents, preconditions, and acceptance criteria.
|
|
37
37
|
- **Release verification**: `/verify-implementation` runs the verification family for docs, UI, code, security, performance, DB schema, and skill package readiness.
|
|
38
38
|
|
|
39
|
+
## What's New in 2.0.10
|
|
40
|
+
|
|
41
|
+
`solmate-skills@2.0.10` fixes Claude Code hook false positives so read-only tool use no longer triggers edit-oriented skill suggestions.
|
|
42
|
+
|
|
43
|
+
- `install hooks` now registers the PreToolUse file watcher only for `Write|Edit`.
|
|
44
|
+
- `hooks/watch-files.sh` exits early for `Read`, `Bash`, and other non-edit tools, even when an older broad matcher is still installed.
|
|
45
|
+
- File-pattern suggestions now use `tool_input.file_path` only, avoiding false matches from shell command text such as `find . -name SKILL.md`.
|
|
46
|
+
- Existing projects can apply the fix by rerunning `npx solmate-skills@latest install hooks`.
|
|
47
|
+
|
|
39
48
|
## What's New in 2.0.9
|
|
40
49
|
|
|
41
50
|
`solmate-skills@2.0.9` adds a YAGNI/KISS/DRY Gate across development, workflow, and verification skills so agents avoid overengineering before and after implementation.
|
package/hooks/install.sh
CHANGED
|
@@ -88,14 +88,14 @@ already_has_watch = any(
|
|
|
88
88
|
)
|
|
89
89
|
if not already_has_watch:
|
|
90
90
|
pre_hooks.append({
|
|
91
|
-
"matcher": "
|
|
91
|
+
"matcher": "Write|Edit",
|
|
92
92
|
"hooks": [{
|
|
93
93
|
"type": "command",
|
|
94
94
|
"command": watch_cmd,
|
|
95
95
|
"timeout": 5
|
|
96
96
|
}]
|
|
97
97
|
})
|
|
98
|
-
print(" Added: PreToolUse (
|
|
98
|
+
print(" Added: PreToolUse (Write|Edit) → solmate-watch.sh")
|
|
99
99
|
else:
|
|
100
100
|
print(" Skipped (already exists): PreToolUse → solmate-watch.sh")
|
|
101
101
|
|
package/hooks/watch-files.sh
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# solmate-skills: watch-files.sh
|
|
3
|
-
# Event: PreToolUse (matcher:
|
|
3
|
+
# Event: PreToolUse (matcher: Write|Edit)
|
|
4
4
|
# Purpose: Detect file patterns being modified and inject relevant skill suggestions.
|
|
5
5
|
# Output: JSON with hookSpecificOutput.additionalContext (non-blocking)
|
|
6
6
|
|
|
@@ -8,18 +8,24 @@ set -euo pipefail
|
|
|
8
8
|
|
|
9
9
|
INPUT=$(cat)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
FILE_PATH=$(echo "$INPUT" | python3 -c "
|
|
11
|
+
TOOL_NAME=$(echo "$INPUT" | python3 -c "
|
|
13
12
|
import sys, json
|
|
14
13
|
data = json.load(sys.stdin)
|
|
15
|
-
|
|
16
|
-
# Write/Edit use file_path; Bash use command
|
|
17
|
-
print(inp.get('file_path', inp.get('command', '')))" 2>/dev/null || echo "")
|
|
14
|
+
print(data.get('tool_name', ''))" 2>/dev/null || echo "")
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
# Only react to actual file edits. Bash/Read can carry file-like strings (e.g.
|
|
17
|
+
# 'find ... SKILL.md') that would otherwise trigger false-positive suggestions,
|
|
18
|
+
# so guard here in case an older/broad matcher is still configured.
|
|
19
|
+
case "$TOOL_NAME" in
|
|
20
|
+
Write|Edit) ;;
|
|
21
|
+
*) exit 0 ;;
|
|
22
|
+
esac
|
|
23
|
+
|
|
24
|
+
# Write/Edit carry the target path in tool_input.file_path.
|
|
25
|
+
FILE_PATH=$(echo "$INPUT" | python3 -c "
|
|
20
26
|
import sys, json
|
|
21
27
|
data = json.load(sys.stdin)
|
|
22
|
-
print(data.get('
|
|
28
|
+
print(data.get('tool_input', {}).get('file_path', ''))" 2>/dev/null || echo "")
|
|
23
29
|
|
|
24
30
|
if [ -z "$FILE_PATH" ]; then
|
|
25
31
|
exit 0
|