feat: migrate 12 personal skills + add build/install scripts
- skills/: editable sources for all 12 personal skills (caveman family, find-skills, project-bootstrap, task-status-wiki, using-context7, using-markitdown, wiki-maintainer, compress) - dist/: built .skill archives, committed (cross-machine deploy without needing zip on the target) - scripts/build.sh + build.ps1: zip skills/<name>/ into dist/<name>.skill; Windows fallback uses .NET ZipArchive (PS 5.1 Compress-Archive writes backslashes that break extraction on *nix) - scripts/install.sh: copy skills/<name>/ into ~/.claude/skills/<name>/ ($CLAUDE_SKILLS_DIR overrides target) - .wiki/source/repo-layout.md, build-notes.md: design + gotchas - .gitignore: keep dist/ tracked Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
32
scripts/install.sh
Normal file
32
scripts/install.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install skills/<name>/ into ~/.claude/skills/<name>/ (or $CLAUDE_SKILLS_DIR)
|
||||
# Usage: install.sh [name...] (no args = all)
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
SRC="$ROOT/skills"
|
||||
TARGET="${CLAUDE_SKILLS_DIR:-$HOME/.claude/skills}"
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
mapfile -t names < <(find "$SRC" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort)
|
||||
else
|
||||
names=("$@")
|
||||
fi
|
||||
|
||||
mkdir -p "$TARGET"
|
||||
|
||||
for name in "${names[@]}"; do
|
||||
src_dir="$SRC/$name"
|
||||
dst_dir="$TARGET/$name"
|
||||
if [ ! -d "$src_dir" ]; then
|
||||
echo "skip: $name (not found in skills/)" >&2
|
||||
continue
|
||||
fi
|
||||
if [ ! -f "$src_dir/SKILL.md" ]; then
|
||||
echo "skip: $name (missing SKILL.md)" >&2
|
||||
continue
|
||||
fi
|
||||
rm -rf "$dst_dir"
|
||||
cp -R "$src_dir" "$dst_dir"
|
||||
echo "installed: $name → $dst_dir"
|
||||
done
|
||||
Reference in New Issue
Block a user