Cc-skills hooks
Install/uninstall statusline-tools Stop hook to ~/.claude/settings.json. TRIGGERS - statusline hooks, install statusline hook, statusline stop hook.
git clone https://github.com/terrylica/cc-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/terrylica/cc-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/statusline-tools/skills/hooks" ~/.claude/skills/terrylica-cc-skills-hooks-d6c032 && rm -rf "$T"
plugins/statusline-tools/skills/hooks/SKILL.mdNavigation: Plugin CLAUDE.md | Root CLAUDE.md
Status Line Hooks Manager
Manage Stop hook installation for link validation and path linting.
The Stop hook runs at session end to:
- Validate markdown links using lychee
- Check for relative path violations using lint-relative-paths
- Cache results for status line display
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.
Actions
| Action | Description |
|---|---|
| Add Stop hook to settings.json |
| Remove Stop hook from settings.json |
| Show current hook configuration |
Coexistence Note
This hook can coexist with other Stop hooks (like check-links-hybrid.sh). Both will run on session end - statusline-tools caches results for display, while other hooks may take different actions.
Execution
Skip Logic
- If action provided (
,install
,uninstall
) -> execute directlystatus - If no arguments -> check current status, then use AskUserQuestion flow
Workflow
- Check Current State: Run
to show current hook configurationstatus - Action Selection: Use AskUserQuestion to select action:
- "Install hook" -> add Stop hook for link validation
- "Uninstall hook" -> remove Stop hook
- "Just show status" -> display and exit
- Execute: Run the management script
- Verify: Confirm changes applied
AskUserQuestion Flow (No Arguments)
When invoked without arguments, guide the user interactively:
Question: "What would you like to do with the statusline-tools Stop hook?" Options: - "Install" -> "Add Stop hook for link validation and path linting on session end" - "Uninstall" -> "Remove the Stop hook from settings.json" - "Status" -> "Show current hook configuration"
Direct Execution (With Arguments)
Parse
$ARGUMENTS and run the management script:
/usr/bin/env bash << 'HOOKS_SCRIPT_EOF' PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/statusline-tools}" ACTION="${ARGUMENTS:-status}" bash "$PLUGIN_DIR/scripts/manage-hooks.sh" $ACTION HOOKS_SCRIPT_EOF
Post-Action Reminder
After install/uninstall operations:
IMPORTANT: Restart Claude Code session for changes to take effect.
Hooks are loaded at session start. Modifications to settings.json require a restart.
Examples
# Check current installation status /statusline-tools:hooks status # Install the Stop hook for link validation /statusline-tools:hooks install # Uninstall hooks /statusline-tools:hooks uninstall
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| jq not found | jq not installed | |
| lychee not found | Link validator not installed | |
| Hooks not working | Session not restarted | Restart Claude Code session |
| lint-relative-paths errors | Invalid path patterns | Check file paths in SKILL.md files |
| Cache stale | Stop hook failed | Check and in the git repo root |
Note on hooks.json Hooks
cron-tracker.ts and stop-cron-gc.ts are registered directly in hooks.json and are not managed by manage-hooks.sh. They run automatically via the hooks framework and do not need manual install/uninstall.
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.