Hook Development
Skill Verifiziert AktivThis 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.
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
- Identify events to hook into
- Choose between prompt-based or command hooks
- Write hook configuration in `hooks/hooks.json`
- Create hook scripts (for command hooks)
- Use portable paths (`${CLAUDE_PLUGIN_ROOT}`)
- Validate configuration and scripts
- Test hooks thoroughly
- 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-pluginsQualitätspunktzahl
VerifiziertVertrauenssignale
Ähnliche Erweiterungen
Safe Mode
100Prevent 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.
Project Session Manager
100Worktree-first dev environment manager for issues, PRs, and features with optional tmux sessions
Public Google Drive
100Erstellen 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.
Oh My Claudecode
100Process-first advisor routing for Claude, Codex, or Gemini via `omc ask`, with artifact capture and no raw CLI assembly
Use My Browser
100Verwenden 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.
X Twitter Scraper
100Verwenden 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.