Claude Skill

hook-scope-guide

Select hook scope (plugin, project, global) by audience. Use when authoring a hook.

LLM Mart · 0 points · 8 views 0 listing impressions 0 install-command copies
Download athola-claude-night-market-plugins_abstract_skills_hook-scope-guide-9388cbb.zip · 1 KB

Install

skills CLI npx skills add https://github.com/athola/claude-night-market/tree/master/plugins/abstract/skills/hook-scope-guide
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install athola-claude-night-market@llmmart
Git git clone https://github.com/athola/claude-night-market.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole athola/claude-night-market collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Hook Scope Decision Guide

Overview

This skill helps you choose the right location for Claude Code hooks based on their purpose, audience, and persistence needs.

When NOT To Use

  • Writing the hook itself (use abstract:hook-authoring)
  • Scoring an existing hook (use abstract:hooks-eval)

Decision Framework

Three questions pick the scope: who needs this hook, should it be version controlled, and how long should it persist. Plugin hooks (hooks/hooks.json in the plugin) serve plugin users while the plugin is enabled. Project hooks (.claude/settings.json) serve the team and are committed. Global hooks (~/.claude/settings.json) serve only you, in every session, and are never committed.

The question tree, per-scope configuration and examples, loading precedence, security considerations, migration and troubleshooting are written once, in plugins/abstract/skills/hook-authoring/modules/scope-selection.md. Read it before choosing. Agent-aware SessionStart hooks are covered in abstract:hook-authoring under Hook Event Types.

Related Skills

  • abstract:hook-authoring - For hook rule syntax and patterns
  • abstract:validate-plugin - For validating plugin structure including hooks

References

Exit Criteria

  • A single scope (plugin / project / global) is selected and the rationale traces through at least two of the three decision questions (audience, version control, persistence).
  • The selected scope's file location (hooks/hooks.json, .claude/settings.json, or ~/.claude/settings.json) is confirmed to exist or is created at the correct path.
  • Plugin hooks do not add "hooks": "./hooks/hooks.json" to plugin.json (duplicate-load guard). This absence is verified before the hook is deployed.
  • Global hooks are flagged with a security note confirming they apply to all Claude sessions on this machine.
Files (claude-night-market)
  • SKILL.md 2.2 KB
    ---
    name: hook-scope-guide
    description: 'Select hook scope (plugin, project, global) by audience. Use when authoring a hook.'
    category: hook-development
    ---
    
    # Hook Scope Decision Guide
    
    ## Overview
    
    This skill helps you choose the right location for Claude Code hooks based on their purpose, audience, and persistence needs.
    
    ## When NOT To Use
    
    - Writing the hook itself (use `abstract:hook-authoring`)
    - Scoring an existing hook (use `abstract:hooks-eval`)
    
    ## Decision Framework
    
    Three questions pick the scope: who needs this hook, should it be
    version controlled, and how long should it persist. Plugin hooks
    (`hooks/hooks.json` in the plugin) serve plugin users while the plugin
    is enabled. Project hooks (`.claude/settings.json`) serve the team and
    are committed. Global hooks (`~/.claude/settings.json`) serve only you,
    in every session, and are never committed.
    
    The question tree, per-scope configuration and examples, loading
    precedence, security considerations, migration and troubleshooting are
    written once, in
    `plugins/abstract/skills/hook-authoring/modules/scope-selection.md`.
    Read it before choosing. Agent-aware SessionStart hooks are covered in
    `abstract:hook-authoring` under Hook Event Types.
    
    ## Related Skills
    
    - **abstract:hook-authoring** - For hook rule syntax and patterns
    - **abstract:validate-plugin** - For validating plugin structure including hooks
    
    ## References
    
    - [Claude Code Hooks Documentation](https://docs.anthropic.com/en/docs/claude-code/hooks)
    - [Settings Configuration](https://docs.anthropic.com/en/docs/claude-code/settings)
    
    ## Exit Criteria
    
    - [ ] A single scope (plugin / project / global) is selected and the rationale traces through at
      least two of the three decision questions (audience, version control, persistence).
    - [ ] The selected scope's file location (`hooks/hooks.json`, `.claude/settings.json`, or
      `~/.claude/settings.json`) is confirmed to exist or is created at the correct path.
    - [ ] Plugin hooks do not add `"hooks": "./hooks/hooks.json"` to `plugin.json` (duplicate-load
      guard). This absence is verified before the hook is deployed.
    - [ ] Global hooks are flagged with a security note confirming they apply to all Claude sessions
      on this machine.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.