← ClaudeAtlas

hooks-authoringlisted

Author AgentOps runtime hooks.
boshu2/agentops · ★ 384 · API & Backend · score 79
Install: claude install-skill boshu2/agentops
# $hooks-authoring - Hook Authoring Workflow > Purpose: create or review AgentOps runtime hooks with portable behavior, clear matchers, deterministic tests, and CI-compatible validation. **Execute this workflow. Do not only describe it.** ## Route Use this skill when work touches `hooks/hooks.json`, `hooks/*.sh`, `lib/hook-helpers.sh`, hook schemas, or tests that exercise runtime hooks. ## Workflow 1. Locate (or create) your hook surface. - Runtime manifest: your own `hooks/hooks.json` (the AgentOps default ships none) - Hook scripts: your own `*.sh` - Schema to validate against: `schemas/hooks-manifest.v1.schema.json` 2. Select the lifecycle event and matcher. - For event behavior, read [references/event-taxonomy.md](references/event-taxonomy.md). - For matcher shape, read [references/matcher-patterns.md](references/matcher-patterns.md). 3. Define the contract before editing. - Inputs consumed from hook JSON. - Output schema and exit-code behavior. - Fail-open vs fail-closed decision. - Kill switch, timeout, and portability constraints. 4. Implement narrowly. - Use `set -euo pipefail` in shell hooks. - Resolve paths from the manifest/plugin root rather than the caller CWD. - Avoid `eval`, backticks, unquoted variables, and implicit globbing. - Keep hook output to the portable subset both Claude and Codex accept (avoid `hookSpecificOutput.updatedInput`, which Codex silently drops). 5. Wire the manifest. - Use the narrowest