update

An update command for cc-hooks, a collection of automated actions used by Claude Code.

In plain words
What is it for?
Use it to detect plugin or standalone installation and install an available cc-hooks update.
Why use it?
It checks how cc-hooks is installed and whether a newer version is available, reducing manual update work.

Command

Part of the cc-hooks-plugin plugin — 2 commands, 9 hooks 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 commands/husniadil/cc-hooks/update
Clone the repo
git clone --depth 1 https://github.com/husniadil/cc-hooks

Or install cc-hooks-plugin, the plugin that ships this one along with the rest of its 2 commands, 9 hooks.

Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,550 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00009 $0.01550
Opus 5 $0.00005 $0.00775
Sonnet 5 $0.00002 $0.00310
Haiku 4.5 $0.00001 $0.00155

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

Security

Grade B, and why

update scanned grade B with 2 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 3d 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.

settings_file = os.path.expanduser('~/.claude/settings.json')

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:12222/version/status 2>/dev/null || \
commands/update.md · 252 lines

How it starts

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

cc-hooks Update Assistant

Check for cc-hooks updates and install them if available.

Update Check Flow

1. Detect Installation Mode

Determine if cc-hooks is running in plugin mode or standalone mode by checking the hooks configuration:

# Detect installation mode
python3 -c "
import json, sys, os

# Check 1: Plugin mode - hooks defined in plugin directory
plugin_hooks_file = os.path.expanduser('~/.claude/plugins/marketplaces/cc-hooks-plugin/hooks/hooks.json')
if os.path.isfile(plugin_hooks_file):
    try:
        with open(plugin_hooks_file, 'r') as f:
            config = json.load(f)
            # Verify it has hooks configuration
            if config.get('hooks') and len(config['hooks']) > 0:
                # Verify hooks.py exists
                plugin_hooks_py = os.path.expanduser('~/.claude/plugins/marketplaces/cc-hooks-plugin/hooks.py')
                if os.path.isfile(plugin_hooks_py):
                    print('plugin')
                    sys.exit(0)
    except:
        pass

# Check 2: Standalone mode - hooks defined in settings.json
settings_file = os.path.expanduser('~/.claude/settings.json')
if os.path.isfile(settings_file):
    try:
        with open(settings_file, 'r') as f:
            config = json.load(f)
            hooks = config.get('hooks', {})
            # Check if any hook points to hooks.py
            for event_hooks in hooks.values():
                if isinstance(event_hooks, list):
                    for matcher_group in event_hooks:
                        for hook in matcher_group.get('hooks', []):
                            command = hook.get('command', '')
                            if 'hooks.py' in command:
                                print('standalone')
                                sys.exit(0)
    except:
        pass

print('unknown')
"

Detection Logic:

  1. Check Plugin Mode First:
    • Look for ~/.claude/plugins/marketplaces/cc-hooks-plugin/hooks/hooks.json
    • Verify it contains valid hooks configuration
    • Verify hooks.py exists at ~/.claude/plugins/marketplaces/cc-hooks-plugin/hooks.py
    • If all checks pass → Plugin mode

Read the full file on GitHub · 252 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. 3d ago First seen · 252 lines · 9 tokens per session scan B 43013081262d

Subscribe to this mod's changes

update is a command published in the GitHub repository husniadil/cc-hooks (19 stars, last pushed 7mo ago), licensed MIT. It adds 9 tokens to every session and 1,550 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.