SKILLS/EVOKORE EXTENSIONS/hooks-automation/SKILL.md
Use when you need to implement or debug Claude Code hooks using the 3-phase memory sync pattern (STATUS→PROGRESS→COMPLETE) with JSON flow-control responses.
npx skillsauth add mattmre/evokore-mcp hooks-automationInstall 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.
Implements Claude Code hooks using the STATUS→PROGRESS→COMPLETE 3-phase memory sync pattern for reliable hook orchestration.
Use this skill when:
| Hook | Trigger | Control Response |
|------|---------|-----------------|
| PreToolUse | Before any tool call | {decision: "block"\|"ask"\|"allow", reason?} |
| PostToolUse | After any tool call | {suppress?: true} (suppress tool result from context) |
| UserPromptSubmit | On each user message | {additionalContext: "..."} (inject context) |
| Stop | Before session ends | {decision: "block", reason} (prevent exit) |
All hooks should implement the STATUS→PROGRESS→COMPLETE lifecycle:
On hook invocation, emit status to session manifest:
appendEvent(sessionId, { type: 'stop_check', payload: { status: 'checking', ts: Date.now() } });
During computation, write incremental state (for long-running hooks):
appendEvent(sessionId, { type: 'stop_check', payload: { status: 'in_progress', step: 'checking_tasks' } });
On completion, emit final result:
appendEvent(sessionId, { type: 'stop_check', payload: { status: 'complete', result: decision } });
Hooks communicate with Claude Code via stdout JSON:
// Allow (default if no output)
// No output needed
// Block with reason
console.log(JSON.stringify({ decision: 'block', reason: 'X incomplete tasks remain' }));
// Ask for approval
console.log(JSON.stringify({ decision: 'ask', reason: 'Destructive action detected', reason }));
// Inject context into next prompt
console.log(JSON.stringify({ additionalContext: 'Current session has 3 pending tasks:\n1. ...' }));
All hooks must fail-open:
try {
// hook logic
console.log(JSON.stringify({ decision: 'allow' }));
} catch (err) {
// fail-open: don't block Claude Code on hook error
process.stderr.write('Hook error: ' + err.message + '\n');
process.exit(0); // exit 0 = allow
}
All hooks live under scripts/hooks/*.js and delegate to scripts/*.js via:
const { requireHookSafely } = require('../fail-safe-loader.js');
requireHookSafely('../../scripts/actual-hook-logic.js');
development
Core orchestration framework for model-agnostic multi-agent workflows with handoff protocol, policy governance, and configuration schemas
testing
Specialized skill for triage issue skill workflows.
development
Complete workflow for building, implementing, and testing goal-driven agents. Orchestrates hive-* skills. Use when starting a new agent project, unsure which skill to use, or need end-to-end guidance.
development
Iterative agent testing with session recovery. Execute, analyze, fix, resume from checkpoints. Use when testing an agent, debugging test failures, or verifying fixes without re-running from scratch.