Hooks
What ouroboros runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
> /plugin marketplace add Q00/ouroboros > /plugin install ouroboros@ouroboros
Ships with ouroboros. Installing the plugin gets these hooks.
What fires, and when
SessionStart
Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.
- Matches
*ROOT="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"; if [ -z "$ROOT" ]; then printf '%s\n' 'Ouroboros hook skipped: plugin root is unavailable.' >&2; exit 0; fi; SCRIPT="$ROOT/scripts/session-start.py"; if [ ! -r "$SCRIPT" ]; then printf '%s\n' "Ouroboros hook skipped: $SCRIPT is unavailable." >&2; exit
UserPromptSubmit
Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.
- Matches
*ROOT="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"; if [ -z "$ROOT" ]; then printf '%s\n' 'Ouroboros hook skipped: plugin root is unavailable.' >&2; exit 0; fi; SCRIPT="$ROOT/scripts/keyword-detector.py"; if [ ! -r "$SCRIPT" ]; then printf '%s\n' "Ouroboros hook skipped: $SCRIPT is unavailable." >&2; ex
PostToolUse
- Matches
Write|EditROOT="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"; if [ -z "$ROOT" ]; then printf '%s\n' 'Ouroboros hook skipped: plugin root is unavailable.' >&2; exit 0; fi; SCRIPT="$ROOT/scripts/drift-monitor.py"; if [ ! -r "$SCRIPT" ]; then printf '%s\n' "Ouroboros hook skipped: $SCRIPT is unavailable." >&2; exit
Agent OS: the agent gets smarter on its own. We just hold the line: Interview-gated, staged evaluation, budgeted evolution loop. MCP server, 14 runtimes: Claude Code, Codex CLI, Gemini CLI, OpenCode, Copilot, Kiro and more.
Repo: Q00/ouroboros

