ops-codegraph-tool: Skill for Claude Code

.claude/skills/titan-gate/SKILL.md

titan-gate is a skill for Claude Code from optave/ops-codegraph-tool. It costs 37 tokens per session (5,202 once invoked), scanned C, original, Apache-2.0.

A validation step for staged code changes before they are committed. It checks the project's structure, lint rules, build, and tests, then reports whether the changes pass, need attention, or fail.

In plain words
What is it for?
Use it to validate files prepared for commit, check dependency and architecture rules, run linting, builds, and tests, and decide whether a commit should proceed.
Why use it?
It catches broken or risky changes before they become part of the project and can undo changes when validation fails.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

This is optave/ops-codegraph-tool's own configuration. It tells Claude Code how to work on ops-codegraph-tool itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ops-codegraph-tool configures →

Reuse

Borrowing it

Nothing to install: this file belongs to optave/ops-codegraph-tool. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/optave/ops-codegraph-tool/main/.claude/skills/titan-gate/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/optave/ops-codegraph-tool

Made for: Claude Code.

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 titan-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/titan-gate/github.svg)](https://agentmods.dev/skills/optave/ops-codegraph-tool/titan-gate)
Your own site
<a href="https://agentmods.dev/skills/optave/ops-codegraph-tool/titan-gate"><img src="https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/titan-gate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for titan-gate

Your own site · 80×15
<a href="https://agentmods.dev/skills/optave/ops-codegraph-tool/titan-gate"><img src="https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/titan-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,202 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00037 $0.05202
Opus 5.5 $0.00015 $0.02081
Sonnet 5.5 $0.00007 $0.01040
Haiku 4.5 $0.00004 $0.00520

Measured 2mo ago against content hash 40d9f2865043, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

titan-gate scanned grade C 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$TITAN_ARCH_DIR"
.claude/skills/titan-gate/SKILL.md · 449 lines

How it starts

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

Titan GATE — Change Validation & State Machine

You are running the GATE phase (State Machine) of the Titan Paradigm.

Your goal: validate staged changes against codegraph quality checks AND the project's own lint/build/test. Produce a clear PASS/WARN/FAIL verdict. Auto-rollback on failure.

Context budget: Lightweight — only checks staged changes. Should complete quickly.

Force mode: If $ARGUMENTS contains --force, warnings are downgraded (failures still block).


Step 0 — Pre-flight

  1. Worktree check:

    git rev-parse --show-toplevel && git worktree list
    

    If not in a worktree, stop: "Run /worktree first."

  2. Staged changes?

    git diff --cached --name-only
    

    If nothing staged, stop: "Nothing staged. Use git add first."

  3. Load state (optional). Read .codegraph/titan/titan-state.json if it exists — use for thresholds, baseline comparison, and sync alignment. If missing or corrupt, proceed with defaults.


Step 1 — Structural validation (codegraph)

Run the full change validation predicates in one call:

codegraph check --staged --cycles --blast-radius 30 --boundaries -T --json

This checks: manifesto rules, new cycle introduction, blast radius threshold, and architecture boundary violations. Exit code 0 = pass, 1 = fail.

The blast-radius predicate is call-graph-shape-aware: a touched function's absolute transitive-caller count only counts toward the threshold if the diff actually changed that function's own declaration line or the set of call targets referenced in its body. A function whose body changed without touching a call expression or its own signature (e.g. an inline literal replaced by a named constant) is exempt even with a high absolute caller count — that fan-in is pre-existing risk already accepted by the codebase, not risk this diff introduced. This is the authoritative blast-radius pass/fail — see Step 8.

Also run detailed impact analysis:

codegraph diff-impact --staged -T --json

Read the full file on GitHub · 449 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. 2mo ago First seen · 449 lines · 37 tokens per session scan C 40d9f2865043

Subscribe to this mod's changes

titan-gate is a skill published in the GitHub repository optave/ops-codegraph-tool (99 stars, last pushed 5d ago), licensed Apache-2.0. It adds 37 tokens to every session and 5,202 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). 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