Skip to content

Hooks

  • 31 ready-made templates — one-key install, toggle, or remove (edits settings.json safely), in seven families:

    • Formatting — Prettier, Ruff, ESLint and gofmt after every edit.
    • Safety guardrails that block dangerous tools (rm -rf, git reset --hard, force-push, sudo, curl; reading .env; writing secrets — exit-code-2 blocks).
    • Failure logging — every Bash command, every tool failure, every turn that ended in failure, and every denied permission (so the allowlist and auto-mode proposals have something to learn from).
    • Notifications — beep when a turn finishes, when Claude needs your input, when a subagent finishes, when an agent teammate goes idle, or when something changes settings.json under you.
    • Memory freshness — mark the files Claude edits stale so auto-refresh re-extracts just those, re-evaluate on a directory change, re-inject memory right after /compact discards the context, record what context actually loaded (pairs with the context weight audit), and record the session on exit so auto-memory has it to learn from.
    • Context injection — git status at session start; a compact code-minimization rule that curbs over-engineering (inspired by Ponytail); and suggest-subagent, which names the project subagent that fits your prompt by keyword match, with no model call.
    • Token savers — concise-output trims narration and re-printed code; filter-test-output pipes test runs through a failures-only filter before the output enters context.

    Plus run-tests-on-stop, which runs pytest when Claude finishes a turn. Guards/blocks run as bundled Python (shell-agnostic); formatters no-op when the tool is absent. - Write one yourself — pick when it fires from the plain-English list, give it a command and an optional matcher, and name it. The third way to get a hook: before this you could install a ready-made one, ask Claude to generate one, or hand-edit settings.json. - Name it, and file it — any hook, including one you wrote by hand or Claude generated, can be renamed and given a category. The name is what every screen shows; what it actually runs stays beside it, so a renamed hook is still recognisable. Both live in archeus's own settings, never in Claude Code's settings.json — that file belongs to another program, and an unrecognised key in it risks the whole block being refused. - AI-generate a hook — describe what you want in plain language; Claude returns a validated hook spec (event + matcher + command) you preview and confirm before it's saved. - Remove broken/legacy hooks — one action purges hook commands that error under a bash hook shell.

Hooks are written into Claude Code's own settings.json, read-modify-write and atomically, so your existing hooks, permissions and output style survive every edit. With multiple accounts configured, archeus sync-accounts places the same hooks in every account's config dir.

SessionStart hook injections are counted by the context weight audit — a hook that injects on every session is a per-turn cost like any other.

The plugin ships no hooks, on purpose

archeus's hook manager already places the recall, worklog and guard hooks per account. Bundling the same hooks in the Claude Code plugin would give one settings.json entry two owners: installing both runs the recall hook twice on every prompt, and uninstalling either leaves the other behind looking broken.