Cc-skills hooks
Install/uninstall RU hooks. TRIGGERS - ru hooks, install ru hooks, autonomous hooks, ru hook manager.
install
source · Clone the upstream repo
git clone https://github.com/terrylica/cc-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/terrylica/cc-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/ru/skills/hooks" ~/.claude/skills/terrylica-cc-skills-hooks-e833aa && rm -rf "$T"
manifest:
plugins/ru/skills/hooks/SKILL.mdsource content
RU: Hooks
Manage RU hooks in
~/.claude/settings.json.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Usage
/ru:hooks install # Add hooks to settings.json /ru:hooks uninstall # Remove hooks from settings.json /ru:hooks status # Show current hook status
Important
After installing hooks, you MUST restart Claude Code for them to take effect.
Execution
/usr/bin/env bash << 'RALPH_UNIVERSAL_HOOKS' SETTINGS="$HOME/.claude/settings.json" COMMAND="${ARGUMENTS:-status}" MARKER="ru/hooks/" # Ensure settings.json exists if [[ ! -f "$SETTINGS" ]]; then echo '{}' > "$SETTINGS" fi case "$COMMAND" in install) echo "Installing RU hooks..." # Record installation timestamp date +%s > "$HOME/.claude/ru-hooks-installed-at" # Check if already installed if grep -q "$MARKER" "$SETTINGS" 2>/dev/null; then echo "Hooks already installed." echo "" echo "IMPORTANT: Restart Claude Code if you haven't already." exit 0 fi echo "" echo "Hooks will be registered when you run:" echo " /plugin install ru@cc-skills" echo "" echo "Then restart Claude Code for hooks to take effect." ;; uninstall) echo "Uninstalling RU hooks..." # Remove timestamp rm -f "$HOME/.claude/ru-hooks-installed-at" echo "Hooks will be removed when you run:" echo " /plugin uninstall ru@cc-skills" echo "" echo "Restart Claude Code after uninstalling." ;; status) echo "RU Hooks Status" echo "============================" echo "" if grep -q "$MARKER" "$SETTINGS" 2>/dev/null; then echo "Status: INSTALLED" HOOK_COUNT=$(grep -o "$MARKER" "$SETTINGS" | wc -l | tr -d ' ') echo "Hooks: $HOOK_COUNT registered" else echo "Status: NOT INSTALLED" echo "" echo "Run: /ru:hooks install" fi if [[ -f "$HOME/.claude/ru-hooks-installed-at" ]]; then INSTALL_TS=$(cat "$HOME/.claude/ru-hooks-installed-at") INSTALL_DATE=$(date -r "$INSTALL_TS" '+%Y-%m-%d %H:%M:%S' 2>/dev/null || echo "unknown") echo "Installed at: $INSTALL_DATE" fi ;; *) echo "Usage: /ru:hooks [install|uninstall|status]" exit 1 ;; esac RALPH_UNIVERSAL_HOOKS
Examples
# Check current hook status /ru:hooks status # Install RU hooks /ru:hooks install # Uninstall hooks /ru:hooks uninstall
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Already installed | Hooks already registered | Restart Claude Code session |
| Hooks not working | Session not restarted | Restart Claude Code session |
| Status shows wrong | Stale timestamp | Re-run install command |
Post-Execution Reflection
After this skill completes, check before closing:
- Did the command succeed? — If not, fix the instruction or error table that caused the failure.
- Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
- Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.
Only update if the issue is real and reproducible — not speculative.