@spardutti/claude-skills 2.7.0 → 2.8.1
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 +1 -0
- package/lib/setup-hook.mjs +31 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,6 +98,7 @@ Portable slash commands installed to `.claude/commands/`. Some orchestrate paral
|
|
|
98
98
|
| Command | What it does |
|
|
99
99
|
|---------|--------------|
|
|
100
100
|
| `/ship` | Unified delivery pipeline — commit → PR → merge → release. No argument steps through interactively; `/ship pr` runs through PR creation; `/ship release` runs the full pipeline |
|
|
101
|
+
| `/discover` | Find the right problem before deciding what to build — diverges first: names competing interpretations of what you said, stress-tests the framing with a blind critic subagent, then converges on a mental model. Run before `/preplan` |
|
|
101
102
|
| `/preplan` | Resolve a fuzzy feature idea into concrete decisions — 6 fixed phases, one question at a time, ends with a decision log. Run before `/plan-feature` |
|
|
102
103
|
| `/plan-feature` | Integration-first feature planning — 3 parallel subagents scan for reusable code, patterns, and touch points before producing a short plan |
|
|
103
104
|
| `/refactor` | Detect size / complexity / duplication / coupling issues via 4 parallel subagents, then refactor |
|
package/lib/setup-hook.mjs
CHANGED
|
@@ -89,45 +89,56 @@ if [ ! -f "/tmp/claude-skill-gate-$SESSION_ID" ]; then
|
|
|
89
89
|
exit 0
|
|
90
90
|
fi
|
|
91
91
|
|
|
92
|
-
#
|
|
93
|
-
# blocked write will surface the next skill).
|
|
92
|
+
# Collect every loaded-but-unacked skill so a single ack clears them all.
|
|
94
93
|
UNACKED=""
|
|
95
94
|
for marker in /tmp/claude-skill-loaded-$SESSION_ID-*; do
|
|
96
95
|
[ ! -f "$marker" ] && continue
|
|
97
96
|
skill_name="\${marker##/tmp/claude-skill-loaded-$SESSION_ID-}"
|
|
98
97
|
if [ ! -f "/tmp/claude-skill-acked-$SESSION_ID-$skill_name" ]; then
|
|
99
|
-
UNACKED="$skill_name"
|
|
100
|
-
break
|
|
98
|
+
UNACKED="$UNACKED $skill_name"
|
|
101
99
|
fi
|
|
102
100
|
done
|
|
101
|
+
UNACKED="\${UNACKED# }"
|
|
103
102
|
|
|
104
103
|
if [ -z "$UNACKED" ]; then
|
|
105
104
|
exit 0
|
|
106
105
|
fi
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
# One touch call with explicit paths — brace expansion is not used because
|
|
108
|
+
# bash leaves a single-element {name} literal, creating a garbage marker.
|
|
109
|
+
ACK_CMD="touch"
|
|
110
|
+
NAMES=""
|
|
111
|
+
RULES_BLOCKS=""
|
|
112
|
+
for skill in $UNACKED; do
|
|
113
|
+
ACK_CMD="$ACK_CMD /tmp/claude-skill-acked-$SESSION_ID-$skill"
|
|
114
|
+
NAMES="$NAMES, '$skill'"
|
|
115
|
+
SKILL_MD="$PROJECT_DIR/.claude/skills/$skill/SKILL.md"
|
|
116
|
+
RULES=""
|
|
117
|
+
if [ -f "$SKILL_MD" ]; then
|
|
118
|
+
RULES=$(awk '/^## Rules/{flag=1} /^## /{if(flag && !/^## Rules/)exit} flag' "$SKILL_MD")
|
|
119
|
+
fi
|
|
120
|
+
if [ -z "$RULES" ]; then
|
|
121
|
+
RULES="(Rules section not found in $SKILL_MD — refer to the loaded skill content already in context.)"
|
|
122
|
+
fi
|
|
123
|
+
RULES_BLOCKS="$RULES_BLOCKS
|
|
124
|
+
### Rules from $skill/SKILL.md
|
|
116
125
|
|
|
117
|
-
|
|
126
|
+
$RULES
|
|
127
|
+
"
|
|
128
|
+
done
|
|
129
|
+
NAMES="\${NAMES#, }"
|
|
130
|
+
|
|
131
|
+
MSG="BLOCKED: loaded skills not yet applied to your work: $NAMES
|
|
118
132
|
|
|
119
133
|
Before this Write/Edit, you must:
|
|
120
134
|
|
|
121
|
-
1.
|
|
135
|
+
1. For each skill listed above, state the specific rules that apply to the file you're about to write.
|
|
122
136
|
2. State how your next write respects each rule.
|
|
123
|
-
3. Then ack
|
|
124
|
-
|
|
137
|
+
3. Then ack all of them in a single Bash tool call:
|
|
138
|
+
$ACK_CMD
|
|
125
139
|
|
|
126
140
|
One ack per skill per session. After acking, retry the Write/Edit.
|
|
127
|
-
|
|
128
|
-
Rules from $UNACKED/SKILL.md:
|
|
129
|
-
|
|
130
|
-
$RULES"
|
|
141
|
+
$RULES_BLOCKS"
|
|
131
142
|
|
|
132
143
|
json_escape() {
|
|
133
144
|
local s="$1"
|