claude-code-ops

claude-code-ops is a skill for Claude Code, Codex from 0xDarkMatter/claude-mods. It costs 95 tokens per session (2,450 once invoked), scanned B, original, MIT.

A reference guide to Claude Code’s hooks, skills, headless operation, and extension debugging. Hooks are automated actions tied to events; headless operation runs Claude from scripts or CI without an interactive session.

In plain words
What is it for?
Use it to write or fix hooks and skills, run Claude in scripts or CI, parse streamed output, validate plugins, and debug configuration.
Why use it?
It gives current guidance for configuring these fast-changing features and diagnosing why an extension or command is not working.

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 claude-mods plugin — 103 skills, 3 commands, 3 agents, 4 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 skills/0xdarkmatter/claude-mods/claude-code-ops
Any agent
npx skills add 0xDarkMatter/claude-mods --skill claude-code-ops
Clone the repo
git clone --depth 1 https://github.com/0xDarkMatter/claude-mods

Made for: Claude Code, Codex.

Or install claude-mods, the plugin that ships this one along with the rest of its 103 skills, 3 commands, 3 agents, 4 hooks.

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 claude-code-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/0xdarkmatter/claude-mods/claude-code-ops.svg)](https://agentmods.dev/skills/0xdarkmatter/claude-mods/claude-code-ops)
Your own site
<a href="https://agentmods.dev/skills/0xdarkmatter/claude-mods/claude-code-ops"><img src="https://agentmods.dev/badge/skills/0xdarkmatter/claude-mods/claude-code-ops.svg" alt="Measured on agentmods" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,450 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.00095 $0.02450
Opus 5 $0.00048 $0.01225
Sonnet 5 $0.00019 $0.00490
Haiku 4.5 $0.00010 $0.00245

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

Security

Grade B, and why

claude-code-ops 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 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/validate-hooks-json.py, tests/run.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.

Reads agent configuration directoriesmediumAgent snooping

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

Configure under the `"hooks"` key in `~/.claude/settings.json`, `.claude/settings.json`, `.claude/settings.local.json`, plugin `hooks/hooks.json`, or **skill/agent frontmatter**:
skills/claude-code-ops/SKILL.md · 127 lines

How it starts

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

Claude Code Internals

One skill for the machinery of Claude Code itself: the hook system, the skill format, headless/programmatic use, and debugging your configuration. Replaces the former claude-code-hooks / claude-code-headless / claude-code-debug skills, refreshed against the June 2026 docs.

Written against Claude Code ~v2.1.17x. These surfaces move fast — when precision matters, confirm against the live docs (links per section). Two contracts from older guides are dead: the $TOOL_INPUT env-var hook contract (hooks read stdin JSON now) and standalone command files as a separate system (commands merged into skills).

Route to the Right Reference

You're doing Load
Writing/fixing a hook; event contracts; blocking tools; audit logging references/hooks-reference.md
Authoring a skill; frontmatter fields; $ARGUMENTS; !`cmd` injection; triggering problems references/skills-reference.md
claude -p; CI scripts; output parsing; stream-json; structured output; background agents references/headless-reference.md
Anything configured isn't taking effect; plugin validation; /doctor references/debugging-reference.md
Designing a new extension — which surface to build, where to scope it, how to author the description/prompt references/extension-architecture.md

Resources

Resource Use
scripts/validate-hooks-json.py Lint a hooks.json (or a settings.json "hooks" block) against the 30-event contract before trusting it
assets/hooks.json.template Starter hooks.json — one of each common pattern (PreToolUse Bash, PostToolUse Edit|Write, SessionStart), ${CLAUDE_PLUGIN_ROOT}-rooted

Validate a hooks file (offline, structural — catches the unknown-event and matcher-as-array footguns the docs warn about):

Read the full file on GitHub · 127 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 · 127 lines · 95 tokens per session scan B 60ff83b65eae

Subscribe to this mod's changes

claude-code-ops is a skill published in the GitHub repository 0xDarkMatter/claude-mods (32 stars, last pushed 12d ago), licensed MIT. It adds 95 tokens to every session and 2,450 once invoked, about $0.0005 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

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

specification-writing

Write the full patent specification from claims and invention disclosure. Use when user says "撰写说明书", "write specification", "写说明书", "patent description", or wants to draft the complete patent specification.

wanshuiyin/Auto-claude-code-research-in-sleep · 49 tokens

training-check

Interactively monitor training metrics from the current Codex session, periodically checking WandB or fallback logs for NaN, divergence, plateaus, and broken runs.

wanshuiyin/Auto-claude-code-research-in-sleep · 35 tokens

golden-rss

Use when testing the rss golden build.

yusufkaraaslan/Skill_Seekers · 12 tokens

overleaf-sync

Two-way sync between a local paper directory and an Overleaf project, so ARIS audit/edit workflows stay on the local copy while collaborators edit in the Overleaf web UI. Use when user says "同步 overleaf", "overleaf sync", "推送到 overleaf", "connect overleaf", "Overleaf 桥接", "pull overleaf", "push overleaf", or wants to…

wanshuiyin/Auto-claude-code-research-in-sleep · 97 tokens

omh-code-review

This is a Hermes-native code-review workflow skill.

rlaope/oh-my-hermes · 46 tokens