setup-hooks

setup-hooks is a skill for Claude Code, Codex from Kasempiternal/Claude-Agent-System. It costs 27 tokens per session (932 once invoked), scanned B, original, MIT.

A setup and verification workflow for CAS safety hooks, which are checks that control risky tool actions such as reading secrets or running sensitive Git commands.

In plain words
What is it for?
Use it to verify the CAS plugin, confirm its hooks are registered, check protection for secrets and sensitive commands, and retire the older broad hooks it replaces.
Why use it?
It helps identify missing or duplicated safety hooks and removes obsolete duplicate installations, reducing unexpected approval prompts while preserving checks for sensitive actions.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the cas plugin — 19 skills, 7 agents, 3 hooks, 2 MCP servers shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kasempiternal/claude-agent-system/setup-hooks
Any agent
npx skills add Kasempiternal/Claude-Agent-System --skill setup-hooks
Clone the repo
git clone --depth 1 https://github.com/Kasempiternal/Claude-Agent-System

Made for: Claude Code, Codex.

Or install cas, the plugin that ships this one along with the rest of its 19 skills, 7 agents, 3 hooks, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/kasempiternal/claude-agent-system/setup-hooks.svg)](https://agentmods.dev/skills/kasempiternal/claude-agent-system/setup-hooks)
Your own site
<a href="https://agentmods.dev/skills/kasempiternal/claude-agent-system/setup-hooks"><img src="https://agentmods.dev/badge/skills/kasempiternal/claude-agent-system/setup-hooks.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 932 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.00932
Opus 5 $0.00014 $0.00466
Sonnet 5 $0.00005 $0.00186
Haiku 4.5 $0.00003 $0.00093

Measured 4d ago against content hash 08f2b263f02b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

setup-hooks scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Read `~/.claude/settings.json` and confirm `enabledPlugins["cas@claude-agent-system"]` is `true`.
claude-agent-system-plugin/skills/setup-hooks/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CAS Safety Hooks

Verify the current CAS hook contract. The plugin owns its hooks through ${CLAUDE_PLUGIN_ROOT}; no version-pinned manual installation is required.

Intended behavior

Guard Tool matcher Decision
Secret and environment protection `Read Edit
Sensitive command approval Bash Ask for every rm, git commit, git commit-tree, or git push, including common wrappers and nested shell commands
GPT Architect backend guard Agent While GPT Architect is ON, deny native Claude teammates and direct delegation to Codex instead

Ordinary builds, tests, formatters, package managers, file edits, and non-sensitive shell commands must remain automatic. The broad legacy dangerous-commands.js and push-guard.js hooks are retired and no longer ship.

Procedure

1. Verify the plugin

Read ~/.claude/settings.json and confirm enabledPlugins["cas@claude-agent-system"] is true.

If it is not enabled, stop and tell the user to run:

/plugin marketplace add Kasempiternal/Claude-Agent-System
/plugin install cas

2. Verify automatic hook registration

Locate the active CAS plugin root, read hooks/hooks.json, and verify these commands are registered exactly once:

  • protect-secrets.js
  • sensitive-command-approval.cjs
  • gpt-architect-mode-guard.cjs
  • gpt-architect-standing-orders.cjs

Also verify orchestrate-resume.js remains the sole CAS SessionStart hook and gpt-architect-standing-orders.cjs the sole CAS UserPromptSubmit hook.

Do not add a second user-level copy of an automatic plugin hook.

3. Find obsolete manual entries

Inspect only hooks.PreToolUse entries in ~/.claude/settings.json. Mark an entry as obsolete when its command contains any of:

  • plugins/cache/claude-agent-system/cas/
  • push-guard.js
  • dangerous-commands.js
  • protect-secrets.js
  • claude-sensitive-command-approval.cjs
  • sensitive-command-approval.cjs
  • gpt-architect-native-agent-guard.cjs
  • gpt-architect-mode-guard.cjs
  • gpt-architect-standing-orders.cjs

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 101 lines · 27 tokens per session scan B 08f2b263f02b

Subscribe to this mod's changes

setup-hooks is a skill published in the GitHub repository Kasempiternal/Claude-Agent-System (15 stars, last pushed 1mo ago), licensed MIT. It adds 27 tokens to every session and 932 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

google-ads-audit

Google Ads account audit and business context setup. Run this first — it gathers business information, analyzes account health, and saves context that all other ads skills reuse. Trigger on "audit my ads", "ads audit", "set up my ads", "onboard", "account overview", "how's my account", "ads health check", "what should…

nowork-studio/notfair-plugin · 114 tokens

review

5-pass structured code review — correctness, security, performance, readability, consistency.

SethGammon/Citadel · 17 tokens

alive:system-upgrade

Upgrade ALIVE to the current version. Handles v1/v2/v3.x source states, multi-surface aware (alive-mcp / Hermes / Codex), retroactive version detection, partial-failure resume, dry-run previews, and rollback inspection.

alivecontext/alive · 57 tokens

codex-test-gen

Generate unit tests for specified functions using Codex MCP.

sd0xdev/sd0x-harness · 15 tokens

ensure-pipelines-host

Ensures the tenant has a usable Power Platform Pipelines host environment before any pipeline operation runs. Detects host state via the same resolution order as the Power Apps UI (org-db setting → BAP env metadata → default-custom-host setting); if any existing host (Platform or Custom) is found, uses it. If no host…

microsoft/power-platform-skills · 222 tokens