Files
asepharyana-hub-guide/install.sh
T
asepharyana 95c77c694f fix(hooks): restore Superpowers-style SessionStart command hook
Properly follow Superpowers 6.1.1 pattern:
- SessionStart command hook (type: command) runs run-hook.cmd session-start
- run-hook.cmd is a cross-platform polyglot wrapper (Unix/Windows)
- session-start script reads engineering-principles/SKILL.md and injects
  it as additionalContext wrapped in EXTREMELY_IMPORTANT tags
- The 29 engineering principles are active in context from turn 1

plugin.json: remove sessionStart.skill, keep skills: ./skills/
The command hook is the primary mechanism (just like Superpowers' using-superpowers).
2026-07-26 14:24:52 +07:00

45 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# install.sh — code-guide installer for Claude Code
# Installs the entire code-guide directory as one unit into ~/.claude/skills/.
# Skills auto-discover. SessionStart hook injects engineering-principles into context.
# Usage:
# ./install.sh # Copy code-guide to ~/.claude/skills/
# ./install.sh --link # Symlink (edits live)
# Requires: Claude Code
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILLS_DIR="${HOME}/.claude/skills"
LINK_MODE=false
for arg in "$@"; do
case "$arg" in
--link) LINK_MODE=true ;;
--*) echo "Unknown: $arg"; exit 1 ;;
esac
done
echo "code-guide installer"
echo " target: ${SKILLS_DIR}/code-guide/"
echo " mode: $([ "$LINK_MODE" = true ] && echo 'symlink' || echo 'copy')"
mkdir -p "$SKILLS_DIR"
DST="${SKILLS_DIR}/code-guide"
if [ "$LINK_MODE" = true ]; then
rm -rf "$DST"
ln -sf "$SCRIPT_DIR" "$DST"
else
rm -rf "$DST"
cp -r "$SCRIPT_DIR" "$DST"
fi
echo " installed to ${DST}/"
if [ "$LINK_MODE" = true ]; then
echo " (symlink — edits in this repo are live)"
fi
echo ""
echo "Done. Restart Claude Code or run /reload."
echo "Skills auto-trigger. SessionStart hook injects engineering-principles into context."