plugins/agent-scaffolders/skills/create-hook/SKILL.md
Scaffolds a new event-driven hook in a plugin. NOT for creating interactive slash commands (use `create-command`) and NOT for GitHub Actions agentic workflows (use `create-agentic-workflow`).
npx skillsauth add richfrem/agent-plugins-skills create-hookInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Follow the create-hook skill workflow to design and generate a hook configuration.
$ARGUMENTS — optional hook event type (e.g. PreToolUse, Stop, PermissionRequest)
or a use-case description (e.g. "block dangerous bash commands"). Omit for discovery.$ARGUMENTS names an event or use case, use it to seed Phase 1 questionsvalidate_hook_schema.py and test with test_hook.pyhooks.json vs skill-scoped frontmatter) and next stepshooks.json entry or SKILL.md frontmatter block with complete hook configuration
(event, matcher, handler type, command/prompt body, output schema).
When generating a Python hook script, always apply these two rules:
Cross-platform python command — use python3 ... || python ... in hooks.json so the hook works on both macOS/Linux (python3) and Windows (python):
{ "type": "command", "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/script.py || python ${CLAUDE_PLUGIN_ROOT}/hooks/script.py" }
Project-type guard — hooks run in every project, not just ones that have initialized this plugin. Add an early-exit guard at the top of main() so the script skips silently in projects that lack the required context:
def main():
project_root = Path(os.environ.get("CLAUDE_PROJECT_DIR", os.getcwd()))
if not (project_root / "context").exists():
return # Not an initialized project — skip silently
...
Adapt the guard to whatever directory/file your hook requires (e.g. .agent/, context/os-state.json).
$ARGUMENTS is empty: begin with the event selection question in Phase 1testing
Skill for creating and managing isolated git worktrees (`.worktrees/issue-NNN`) for issue execution branches. USE ONLY when setting up or cleaning up isolated git worktrees for specific issue execution. DO NOT USE for managing local task files (use `task-agent`) or escalating tasks to issues (use `github-issue-backlog-agent`).
data-ai
Skill for orchestrating the end-to-end GitHub issue lifecycle flow: Issue -> Worktree -> Implementation -> PR Creation -> Resolution Closure. USE ONLY when running or dry-running full lifecycle orchestration for resolving an issue with a PR. DO NOT USE for isolated worktree management only (use `issue-worktree-agent`) or logging issues (use `github-issue-agent`).
tools
Automatically ranks GitHub issues (P0-P3) based on friction tier, frequency, and blockages, synchronizing priority labels and GitHub Projects v2 custom fields.
testing
Bridge skill for escalating ephemeral local task scratchpad items (`tasks/*.md`) into durable, taxonomy-validated, evidence-rich GitHub Issues. USE ONLY when promoting a single-session local task into durable repository backlog. DO NOT USE for managing local kanban boards (use `task-agent` instead) or directly querying/commenting on issues (use `github-issue-agent` instead).