Zum Hauptinhalt springen
Dieser Inhalt ist noch nicht in Ihrer Sprache verfügbar und wird auf Englisch angezeigt.

Hook Development

Skill Verifiziert Aktiv

This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.

Zweck

To guide users in creating robust and secure event-driven automation hooks for Claude Code plugins, enabling advanced workflow control and validation.

Funktionen

  • Guidance on prompt-based and command hooks
  • Explanation of hook types, events, and configuration
  • Security best practices for hook development
  • Debugging utilities and testing strategies
  • Examples for common hook patterns and scenarios

Anwendungsfälle

  • Implementing validation for tool use (PreToolUse, PostToolUse)
  • Setting up event-driven automation for the development lifecycle
  • Blocking dangerous commands or sensitive file operations
  • Loading project context and environment variables at session start

Nicht-Ziele

  • Providing specific hook scripts to copy-paste without understanding
  • Handling the core logic of external tools or services
  • Replacing the need for fundamental bash or prompt engineering knowledge

Workflow

  1. Identify events to hook into
  2. Choose between prompt-based or command hooks
  3. Write hook configuration in `hooks/hooks.json`
  4. Create hook scripts (for command hooks)
  5. Use portable paths (`${CLAUDE_PLUGIN_ROOT}`)
  6. Validate configuration and scripts
  7. Test hooks thoroughly
  8. Implement hooks in Claude Code and test with `--debug`

Praktiken

  • Security validation
  • Test enforcement
  • Context loading
  • Code quality checks

Voraussetzungen

  • Claude Code environment
  • Basic understanding of bash scripting (for command hooks)
  • Basic understanding of prompt engineering (for prompt hooks)

Code Execution

  • info:LoggingWhile the extension doesn't directly perform logging, it provides examples of how to implement audit logging for hook actions using bash scripts.

Installation

Zuerst Marketplace hinzufügen

/plugin marketplace add anthropics/claude-code
/plugin install plugin-dev@claude-code-plugins

Qualitätspunktzahl

Verifiziert
99 /100
Analysiert 1 day ago

Vertrauenssignale

Letzter Commit1 day ago
Sterne123.1k
Lizenzcommercial-terms
Status
Quellcode ansehen

Ähnliche Erweiterungen

Safe Mode

100

Prevent destructive operations using Claude Code hooks. Three modes — cautious (warn on dangerous commands), lockdown (restrict edits to one directory), and clear (remove restrictions). Uses PreToolUse matchers for Bash, Edit, and Write.

Skill
rohitg00

Project Session Manager

100

Worktree-first dev environment manager for issues, PRs, and features with optional tmux sessions

Skill
Yeachan-Heo

Public Google Drive

100

Erstellen Sie öffentliche Google Docs- oder Google Sheet-Dateien, ohne OAuth zu benötigen. Verwenden Sie diese Fähigkeit, um Google Docs und Sheets zu erstellen und zu bearbeiten, keine Google-Anmeldung erforderlich. Dokumente sind unter teilbaren Links sichtbar. Die Registrierung erfolgt automatisch bei der ersten Verwendung.

Skill
zagmoai

Oh My Claudecode

100

Process-first advisor routing for Claude, Codex, or Gemini via `omc ask`, with artifact capture and no raw CLI assembly

Skill
Yeachan-Heo

Use My Browser

100

Verwenden Sie dies, wenn die Arbeit von den Live-Browsersitzungs- oder gerenderten Zustand des Benutzers abhängt und nicht von statischen Abrufen, insbesondere für Browser-Debugging-Kontexte oder von DevTools ausgewählte Elemente oder Anfragen, angemeldeten Dashboards oder CMS-Flows, localhost-Apps, Formularen, Uploads, Downloads, Medieninspektion, DOM- oder iframe-Inspektion, Shadow DOM oder Browserfehlern, die wie Soft-404s, Authentifizierungswände, Anti-Bot-Prüfungen oder Ratenbegrenzungen aussehen.

Skill
xixu-me

X Twitter Scraper

100

Verwenden Sie dies, wenn der Benutzer X (Twitter)-Daten oder durch Bestätigung gesicherte X-Aktionen über Xquik benötigt: Tweet-Suche, Benutzer-Lookup, Follower-Extraktion, Mediendownload, Überwachung, Webhooks, MCP, SDKs, Posting, Likes, DMs und Profilaktualisierungen. Erfordert einen Xquik API-Schlüssel. Fordern Sie niemals X-Login-Materialien an.

Skill
Xquik-dev