account-rotation
Switch coding-agent accounts and verify runtime identity. Use when: the caller requests an account change; never rotate automatically to evade a quota.
Configure Claude Code hooks and narrow enforcement guards. Use when: the caller requests hook installation, repair or policy changes; a hook is not required to use other skills.
$ npx -y skills add boshu2/agentops --skill cc-hooks --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cc-hooksContext preview
The summary Claude sees to decide when to auto-load this skill.
Configure Claude Code hooks and narrow enforcement guards. Use when: the caller requests hook installation, repair or policy changes; a hook is not required to use other skills.
name: cc-hooks user-invocable: true skill_api_version: 1 hexagonal_role: supporting consumes: [] produces: [] context_rel: [] metadata: dependencies: [] capabilities: [cc_hooks] effects: [write_hook_config, append_guardrail_telemetry, write_session_sentinel] canonical_status: canonical disposition: keep_optional_adapter tier: execution description: 'Configure Claude Code hooks and narrow enforcement guards. Use when: the caller requests hook installation, repair or policy changes; a hook is not required to use other skills.' practices: - pragmatic-programmer output_contract: a hooks block in ~/.claude or project settings.json (matcher + command entries), or a hook script signalling allow/deny/ask via exit codes and hookSpecificOutput JSON; installs write hook config and guard fires append hashed telemetry
Shell commands that fire at specific points in Claude Code's lifecycle.
Hooks enforce mechanically what prose cannot: a model can reason its way past an instruction, but it cannot reason its way past an exit 2 — which is exactly why every hook must be narrow, silent, and reversible.
Named failure mode — **chatty happy path**: a hook that emits stdout on exit 0 corrupts the tool call it was guarding; silence on success is part of the contract, not a style preference.
Add a PreToolUse hook to fleet-router/.claude/settings.json that blocks `git push --force` on the main branch. Keep it silent on exit 0, exit 2 with a message on block, and confirm it fires with a manual test invocation before committing the change.
<!-- TOC: Quick Start | Events | Blocking | Writing Hooks | Anti-Patterns | References -->
Add to `~/.claude/settings.json` (user) or `.claude/settings.json` (project):
{"hooks":{"PreToolUse":[{"matcher":"Bash","hooks":[{"type":"command","command":"my-validator.sh"}]}]}}| Event | When | Blocks? | Common Use | |-------|------|---------|------------| | `PreToolUse` | Before tool runs | Yes | Block/modify commands | | `PostToolUse` | After tool succeeds | Feedback | Auto-format, lint | | `PermissionRequest` | Permission dialog | Yes | Auto-approve/deny | | `UserPromptSubmit` | Prompt submitted | Yes | Add context, validate | | `Stop` | Claude finishes | Yes | Force continue | | `SessionStart` | Session begins | No | Load context, set env | | `Notification` | Notifications | No | Desktop alerts |
Full schemas: [HOOK-EVENTS.md](references/HOOK-EVENTS.md)
"Bash" → exact match "Edit|Write" → regex OR "mcp__.*__write" → MCP tools "*" or "" → all tools
Tools: `Bash`, `Read`, `Write`, `Edit`, `Glob`, `Grep`, `Task`, `WebFetch`, `WebSearch`
| Code | Effect | |------|--------| | 0 | Success - JSON parsed from stdout | | 2 | **Block** - stderr fed to Claude | | Other | Non-blocking error |
**Simple (exit 2):**
echo "Blocked: reason" >&2 && exit 2
**JSON (exit 0):**
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"Blocked"}}Decisions: `"allow"` (auto-approve), `"deny"` (block), `"ask"` (show dialog)
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow",
"updatedInput":{"command":"modified-command"}}}{"hooks":{"PreToolUse":[{"matcher":"Bash","hooks":[
{"type":"command","command":"dcg"},
{"type":"command","command":"rch"}
]}]}}Details: [DCG-RCH.md](references/DCG-RCH.md)
A copy-paste PreToolUse recipe that nudges agents to **load the coordination skill before hand-rolling the `am`/`atm`/`ntm`/`tmux send-keys` CLI**. This recipe auto-installs nothing; you opt in per host (unlike the policy dispatcher, which ships by default).
**Context-budget doctrine for hooks:** hooks are the most powerful enforcement (mechanical, can't be reasoned past) but they pollute context — use sparingly. A hook must be SILENT on the happy path (exit 0, no stdout/stderr), fire ONLY on a real violation (ideally once per session, sentinel-gated), prefer PreToolUse violation-guards over `UserPromptSubmit`/`SessionStart` per-turn injectors, and NEVER emit stray stdout on an exit-0 PreToolUse path (it is parsed as JSON and breaks the tool call). Block via exit 2 + stderr.
The recipe ships both scripts verbatim, a precise head-only matcher (so a `br create --body "...am/atm/ntm..."` never false-fires), th
AgentOps gives Claude Code and Codex reusable instructions, called skills, for investigating code, writing useful tests, and independently reviewing changes.
Switch coding-agent accounts and verify runtime identity. Use when: the caller requests an account change; never rotate automatically to evade a quota.
Coordinate selected writers with Agent Mail messages and advisory file reservations. Use when: this adapter is requested; mail does not own tracker status.
Dispatch independent tasks to parallel workers or selected persistent roles. Use when: delegation is authorized with disjoint scopes; execution does not…
Run a supplied task in AGY Antigravity and collect its result. Use when: the caller selects AGY; never a fallback for native coding.
Search agent session logs and cited episodes with CASS. Use when: past prompts, decisions or failures may answer a question; repeated text is not a proven…
Run one prompt through headless Codex and capture its result. Use when: requesting a single noninteractive Codex process. Not for worker batches or retries.