# Hook Setup

Inspect and install CCAM monitoring hooks for Claude Code and Codex.

- Repository: https://github.com/hoangsonww/Claude-Code-Agent-Monitor (1136 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill hook-setup -g -a claude-code -y`
Codex: `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill hook-setup -g -a codex -y`
Cursor: `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill hook-setup -g -a cursor -y`
Gemini CLI: `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill hook-setup -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor`

## Description

Inspect and install CCAM monitoring hooks for Claude Code and Codex. Use when onboarding a provider, repairing missing hooks, checking which provider is active, or validating that installation preserved unrelated user hooks.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Hook Setup

1. Inspect current state: `ccam hooks status`.
2. Show which provider hooks are missing or will be replaced.
3. Install only after confirmation:

```bash
ccam hooks install <selected-or-missing-providers> --yes
```

Replace the placeholder with `claude`, `codex`, or `claude codex` based on the
user's selected scope and the missing providers reported by `ccam hooks status`.

4. Read back `ccam hooks status`.
5. Start a real provider session and verify a new session/event reaches CCAM.

Installers replace only CCAM-owned entries and preserve unrelated hooks.
Hook execution must remain fail-safe and non-blocking.

