cc-hooks

cc-hooks is a skill for Claude Code, Codex from gobing-ai/superskill. It costs 71 tokens per session (3,613 once invoked), scanned A, original, Apache-2.0.

A system for defining coding-agent hooks once and deploying them to several agent tools. Hooks are actions that run when specified events occur during an agent session.

In plain words
What is it for?
Use it to create command, prompt, or web-request hooks for security checks, quality rules, loading context, or workflow automation across supported agents.
Why use it?
It avoids writing and maintaining separate event rules for each coding agent while preserving shared safety and workflow settings.

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 cc plugin — 6 skills, 17 commands, 5 agents 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/gobing-ai/superskill/cc-hooks
Any agent
npx skills add gobing-ai/superskill --skill cc-hooks
Clone the repo
git clone --depth 1 https://github.com/gobing-ai/superskill

Made for: Claude Code, Codex.

Or install cc, the plugin that ships this one along with the rest of its 6 skills, 17 commands, 5 agents.

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 cc-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/gobing-ai/superskill/cc-hooks.svg)](https://agentmods.dev/skills/gobing-ai/superskill/cc-hooks)
Your own site
<a href="https://agentmods.dev/skills/gobing-ai/superskill/cc-hooks"><img src="https://agentmods.dev/badge/skills/gobing-ai/superskill/cc-hooks.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,613 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00071 $0.03613
Opus 5 $0.00036 $0.01806
Sonnet 5 $0.00014 $0.00723
Haiku 4.5 $0.00007 $0.00361

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

Security

Grade A, and why

cc-hooks scanned grade A with 0 findings 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 5d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (examples/load-context.sh, examples/validate-bash.sh, examples/validate-write.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cc/skills/cc-hooks/SKILL.md · 278 lines

How it starts

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

cc:cc-hooks — Multi-Agent Hook System

Author hooks once in the rulesync-canonical format, deploy to Claude Code, Codex, OpenCode, Pi, and Gemini CLI.

Overview

Hooks execute in response to specific events during a coding agent session. Use this skill when implementing hooks for security validation, quality enforcement, context loading, or workflow automation across multiple coding agents: author once in the canonical hooks.json (HookDefinitionSchema), deploy to 5+ agents.

Canonical Schema (HookDefinitionSchema)

Hooks are authored as a rulesync-canonical hooks.json in the .rulesync/ directory of a plugin. The schema is defined in vendors/rulesync/src/types/hooks.ts:26 as HookDefinitionSchema:

{
  "hooks": {
    "<HookEvent>": [
      {
        "type": "command",            // "command" | "prompt" | "http"
        "command": "superskill hook run <plugin> <hook-id>", // portable PATH command (see below)
        "matcher": "Write|Edit",       // tool-name regex (control chars stripped)
        "timeout": 5000,               // ms; optional
        "failClosed": true,            // optional — block action on hook failure (Cursor)
        "loop_limit": 3,               // optional — prompt re-injection cap
        "name": "write-guard",         // optional
        "description": "Block dangerous writes" // optional
      }
    ]
  }
}

Field semantics:

  • type: "command" (deterministic, runs anywhere), "prompt" (Claude Code only — natural-language validation), "http" (webhook).
  • command / matcher / prompt: safeString — must not contain \n, \r, or \0 (they are embedded in generated code).
  • timeout: milliseconds before the hook is killed.
  • failClosed: when true, a hook failure (crash, timeout, invalid JSON) blocks the action instead of allowing it through. Default failOpen where unsupported.
  • loop_limit: cap on prompt re-injections; null means unlimited.

HookEvent Taxonomy

Canonical event names are camelCase. Each tool supports a subset — see vendors/rulesync/src/types/hooks.ts:49 for the full HookEvent union.

Read the full file on GitHub · 278 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. 5d ago First seen · 278 lines · 71 tokens per session scan A 8135a7b190fc

Subscribe to this mod's changes

cc-hooks is a skill published in the GitHub repository gobing-ai/superskill (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 71 tokens to every session and 3,613 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agtx-review

Self-review completed work. Check for correctness, edge cases, and code quality. Write review to .agtx/review.md and stop.

fynnfluegge/agtx · 32 tokens

cmux-architecture

Skill "cmux-architecture" from manaflow-ai/cmux, covering cmux architecture, package architecture, layers, file organization and documentation.

manaflow-ai/cmux · 63 tokens

fabric-exec

Troubleshooting and advanced API reference for fabricexec TypeScript programs, dynamic providers, agents, and schema recovery. Routine pi. coding calls are documented by ambient guidance; load this skill only after an argument-shape error or when an advanced surface needs exact contracts.

monotykamary/pi-fabric · 61 tokens

fabric-fusion

Multi-model deliberation. Two to 8 distinct models answer in parallel with web-capable tools, then a judge compares consensus, contradictions, coverage gaps, unique insights, and blind spots. Act mode runs 1–4 read-only references, then one actor reconciles and executes. Use when the cost of being wrong justifies…

monotykamary/pi-fabric · 74 tokens

cmux-browser

End-user browser automation with cmux. Use when you need to open sites, inspect or interact with browser surfaces, wait for page state, and extract data without stealing focus.

manaflow-ai/cmux · 39 tokens

cmux-cloud-vm

Route work to cmux Cloud machines (persistent cloud VMs) from the CLI — cmux vm route/run/agent pick a machine for you; vm tree / surface ls show the surface catalog (This Mac and every machine: terminals, VNC screens, browsers) and vm open / surface open put any of them in a pane; plus create, exec, push/pull, ports…

manaflow-ai/cmux · 0 tokens