hook-updater
БесплатноБез исполняемых скриптовНе проверенResearch-backed hook refresh workflow for updating existing hooks with TDD checkpoints and settings.json registration validation.
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Hook Updater
Overview
Use this skill to refresh an existing hook safely: research current best practices, compare against current implementation, generate a TDD patch backlog, apply updates, and verify ecosystem integration including settings.json registration.
When to Use
- Reflection flags stale or malfunctioning hook behavior
- EVOLVE determines hook capability exists but quality is outdated
- User asks to audit/refresh an existing hook
- Hook exit code or stdin protocol issues detected
The Iron Law
Never update a hook blindly. Every refresh must be evidence-backed, TDD-gated, and integration-validated.
Workflow
Step 0: Evaluate Current State
- Read the hook file and understand its purpose
- Check settings.json registration (which events, which matchers)
- Run existing tests if they exist
- Identify issues: wrong API pattern, missing registration, broken requires
Step 1: Research Best Practices
- Read
.claude/hooks/CLAUDE.mdfor hook conventions - Review similar hooks in the same category for patterns
- Check
.claude/rules/hooks.mdfor hook rules - Use
Skill({ skill: 'research-synthesis' })if external research needed
Step 2: Generate Patch Backlog
- List specific changes needed (TDD-style: test first, then implement)
- Prioritize by risk: registration fixes > exit code fixes > logic improvements
- Estimate scope: <30 lines = auto-apply, >30 lines = plan mode
Step 3: Apply Updates
- Write or update tests first (RED phase)
- Apply hook changes (GREEN phase)
- Refactor for clarity (REFACTOR phase)
- Use
Edittool — never rewrite the entire file
Step 4: Verify Integration
- Confirm hook is registered in
.claude/settings.jsonfor correct events - Verify hook exit codes: 0=allow, 2=block, 1=error (SE-03)
- Verify stdin JSON parsing follows the standard protocol
- Run
pnpm lint:fix && pnpm format - Run hook-specific tests
Step 5: Record
- Log changes via
MemoryRecordif significant - Update CHANGELOG.md entry
Domain-Specific Validation
- Hook MUST be registered in settings.json under appropriate event
- Hook MUST use stdin JSON protocol (not programmatic function exports)
- Hook MUST exit 0 (allow) or 2 (block) — never exit 1 for blocking
- Hook MUST wrap body in try/catch, exit 0 on unexpected errors (SE-03)
- Hook require() paths MUST be file-relative (../../lib/...), not CWD-relative
Anti-Patterns
- Updating a hook without checking its settings.json registration
- Changing exit codes without understanding the 0/1/2 semantics
- Converting a stdin-protocol hook to programmatic API (or vice versa)
- Removing error handling to "simplify" the hook
Установить hook-updater в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGlobGrepBashSkillMemoryRecordFAQ
Что делает скилл hook-updater?
Research-backed hook refresh workflow for updating existing hooks with TDD checkpoints and settings.json registration validation.
Как установить скилл hook-updater?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hook-updater запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub