cc-discipline 2.12.0 → 2.12.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/init.sh +22 -2
- package/package.json +1 -1
package/init.sh
CHANGED
|
@@ -367,12 +367,32 @@ cp "$SCRIPT_DIR/templates/.claude/agents/investigator.md" .claude/agents/
|
|
|
367
367
|
echo -e "${GREEN}Installing skills...${NC}"
|
|
368
368
|
# Install every skill directory under templates/ — no per-skill enumeration,
|
|
369
369
|
# so adding a new skill needs zero changes here.
|
|
370
|
+
#
|
|
371
|
+
# Copy into an EXPLICIT destination directory. Do not use `cp -r "$skill_dir"
|
|
372
|
+
# .claude/skills/` here: the `*/` glob gives $skill_dir a trailing slash, and
|
|
373
|
+
# GNU and BSD cp disagree about what that means. GNU copies the directory;
|
|
374
|
+
# BSD (macOS) copies its *contents*, so every skill's SKILL.md landed on top of
|
|
375
|
+
# the previous one at .claude/skills/SKILL.md and no skill was ever updated.
|
|
376
|
+
# Shipped broken in v2.11.0 (the "directory-driven install" change) and fixed in
|
|
377
|
+
# v2.12.1. Symptom on an affected machine: a stray .claude/skills/SKILL.md plus
|
|
378
|
+
# skill dirs frozen at their first-install date. status/doctor could not catch
|
|
379
|
+
# it because they glob `skills/*/` and a bare file is not a directory.
|
|
370
380
|
for skill_dir in "$SCRIPT_DIR"/templates/.claude/skills/*/; do
|
|
371
381
|
[ -d "$skill_dir" ] || continue
|
|
372
|
-
|
|
373
|
-
|
|
382
|
+
skill_name=$(basename "$skill_dir")
|
|
383
|
+
mkdir -p ".claude/skills/$skill_name"
|
|
384
|
+
cp -R "$skill_dir"* ".claude/skills/$skill_name/"
|
|
385
|
+
echo " ✓ /$skill_name"
|
|
374
386
|
done
|
|
375
387
|
|
|
388
|
+
# Clean up the stray file left behind by the v2.11.0–v2.12.0 bug above. A bare
|
|
389
|
+
# SKILL.md directly under skills/ is never a valid skill (skills live in
|
|
390
|
+
# subdirectories), so this only ever removes that debris.
|
|
391
|
+
if [ -f ".claude/skills/SKILL.md" ]; then
|
|
392
|
+
rm -f ".claude/skills/SKILL.md"
|
|
393
|
+
echo -e " ${YELLOW}✓ removed stray .claude/skills/SKILL.md (v2.11.0 macOS install bug)${NC}"
|
|
394
|
+
fi
|
|
395
|
+
|
|
376
396
|
# ─── Handle CLAUDE.md ───
|
|
377
397
|
if [ ! -f "CLAUDE.md" ]; then
|
|
378
398
|
# No CLAUDE.md exists — generate from template
|