From aida-core
List, add, remove, and validate Claude Code lifecycle hook entries in settings.json, routed through /aida extension management. Use for structured CRUD on the hooks block. For general settings.json edits or other harness behavior changes, use the native settings/config flow instead.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aida-core:hook-managerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- SPDX-FileCopyrightText: 2026 The AIDA Core Authors -->
Manages Claude Code lifecycle hook configurations. Hooks are shell commands that execute automatically at specific points in the Claude Code lifecycle, providing deterministic control over formatting, logging, blocking, and notifications.
This skill activates when:
/aida hook list/aida hook add/aida hook remove/aida hook validateShow all configured hooks across settings files.
python {base_directory}/scripts/manage.py --execute \
--context='{"operation": "list", "scope": "all"}'
Scopes:
user -- User-level hooks onlyproject -- Project-level hooks onlylocal -- Local overrides onlyall -- All hooks (default)Add a new hook using the two-phase API.
python {base_directory}/scripts/manage.py \
--get-questions \
--context='{"operation": "add", "description": "..."}'
Returns questions about event type, scope, and whether to use a built-in template.
python {base_directory}/scripts/manage.py --execute \
--context='{"operation": "add", "event": "PostToolUse", "matcher": "Write|Edit", "command": "prettier --write", "scope": "project"}'
Built-in templates:
| Template | Event | Purpose |
|---|---|---|
formatter | PostToolUse | Auto-format after writes |
logger | PostToolUse | Log commands for audit |
blocker | PreToolUse | Block sensitive file writes |
notifier | Notification | Desktop notifications |
Remove a hook by event and matcher.
python {base_directory}/scripts/manage.py --execute \
--context='{"operation": "remove", "event": "PostToolUse", "matcher": "Write|Edit", "scope": "project"}'
Validate hook configurations for correctness.
python {base_directory}/scripts/manage.py --execute \
--context='{"operation": "validate", "scope": "all"}'
Checks:
get_questions(context)Analyzes the operation context and returns:
execute(context, responses)Executes the operation with user responses and returns:
| Scope | Path | Use Case |
|---|---|---|
user | ~/.claude/settings.json | Personal hooks |
project | .claude/settings.json | Shared team hooks |
local | .claude/settings.local.json | Local overrides |
Script entry point:
{base_directory}/scripts/manage.py
Reference docs:
{base_directory}/references/hooks-reference.md
| Script | Purpose |
|---|---|
scripts/manage.py | Two-phase API entry point |
scripts/_paths.py | Path setup for shared utils |
scripts/operations/hooks.py | Hook operations |
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub aida-core/aida-core-plugin --plugin aida-core