# Scalably Agent Hooks: 8 guardrails

Canonical: https://scalably.io/hooks/
Source: https://github.com/scalably-io/agent-hooks at v1.0.0
JSON index: https://scalably.io/hooks/index.json
This is the machine-readable representation of the hub. Same facts, denser format.

## Install all of them

```
/plugin marketplace add scalably-io/agent-skills
/plugin install agent-hooks@scalably-agent-skills
```

For Codex, register the same scripts: https://github.com/scalably-io/agent-hooks/blob/main/docs/codex-hooks.md

## The hooks, in the order they run

- [bash-guard](https://scalably.io/_ai/hooks/bash-guard.md) (PreToolUse on Bash): PreToolUse (Bash) hook: triage destructive shell commands before they run.
- [verify-before-commit](https://scalably.io/_ai/hooks/verify-before-commit.md) (PreToolUse on Bash): PreToolUse (Bash) hook: run a project's own verification before commit or push.
- [guard-agent-nesting](https://scalably.io/_ai/hooks/guard-agent-nesting.md) (PreToolUse on Agent|Task): PreToolUse hook: one level of delegation.
- [guard-agent-background](https://scalably.io/_ai/hooks/guard-agent-background.md) (PreToolUse on Agent|Task): PreToolUse hook: a spawned subagent must run in the foreground, explicitly.
- [web-fetch-guard](https://scalably.io/_ai/hooks/web-fetch-guard.md) (PreToolUse on WebFetch and PostToolUse on WebFetch): PreToolUse and PostToolUse hook (WebFetch): stop asking a site that has already refused.
- [stuck-detector](https://scalably.io/_ai/hooks/stuck-detector.md) (PostToolUseFailure): PostToolUseFailure hook: catch an agent retrying the same failing call.
- [pre-compact-state](https://scalably.io/_ai/hooks/pre-compact-state.md) (PreCompact): PreCompact hook: write a small state snapshot before the context is compacted.
- [tidy-scan](https://scalably.io/_ai/hooks/tidy-scan.md) (Stop): Stop hook: surface untidy repository state at the end of a turn.

## Contract

Every hook reads JSON on standard input and answers with an exit code: 0 allows, 2 blocks and returns stderr to the model, anything else is a non-blocking error. Every hook exits 0 on malformed input rather than blocking a session.
