contract-hook-router

contract-hook-router is a skill for Claude Code, Codex from blackzhanzhan/Cyber-Ming-Protocol. It costs 52 tokens per session (1,456 once invoked), scanned A, original, MIT.

A routing system for turning planning and execution requests into approved work agreements and the correct follow-up process.

In plain words
What is it for?
Starting work, taking over a project, continuing interrupted work, and directing each request to the appropriate planning or execution procedure.
Why use it?
It prevents a plan from being treated as permission to make changes and helps keep repository work aligned with its required rules and current state.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions Codex; mentions OpenCode.

Good fit Starting work, taking over a project, continuing interrupted work, and directing each request to the appropriate planning or execution procedure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blackzhanzhan/cyber-ming-protocol/contract-hook-router
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.

Any agent
npx skills add blackzhanzhan/Cyber-Ming-Protocol --skill contract-hook-router
Clone the repo
git clone --depth 1 https://github.com/blackzhanzhan/Cyber-Ming-Protocol

Made for: Claude Code, Codex.

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 contract-hook-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/blackzhanzhan/cyber-ming-protocol/contract-hook-router/github.svg)](https://agentmods.dev/skills/blackzhanzhan/cyber-ming-protocol/contract-hook-router)
Your own site
<a href="https://agentmods.dev/skills/blackzhanzhan/cyber-ming-protocol/contract-hook-router"><img src="https://agentmods.dev/badge/skills/blackzhanzhan/cyber-ming-protocol/contract-hook-router/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 contract-hook-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/blackzhanzhan/cyber-ming-protocol/contract-hook-router"><img src="https://agentmods.dev/badge/skills/blackzhanzhan/cyber-ming-protocol/contract-hook-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00052 $0.01456
Opus 5 $0.00026 $0.00728
Sonnet 5 $0.00010 $0.00291
Haiku 4.5 $0.00005 $0.00146

Measured 10d ago against content hash cbee6cb2bca4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

contract-hook-router 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 10d 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.

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.

skill/contract-hook-router/SKILL.md · 176 lines

How it starts

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

Contract Hook Router

Prerequisite: read and obey the repository parent policy at skill/global_rules/SKILL.md first.

Role

This skill is the runtime hook router.

It does not replace:

  • approval-first-planner
  • approved-checklist-executor
  • legacy-project-handover
  • probe-first-scout
  • free-development-mode

It decides which hook is active, what truth must be loaded, and which downstream skill owns the next move.

Core Law

Host-native plan modes are not contracts.

Treat Claude Code plan mode, Codex ask/plan-like mode, Cursor planning, OpenCode planning, and similar "think before edit" surfaces as plan-start only. A plan becomes actionable only after plan-compile produces a Cyber-Ming contract and the human approves it or the current run mode already authorizes it.

Hook Lifecycle

bootstrap-read

Use when entering a repository, taking over a project, or recovering from context decay.

Required reads:

  • repository starter law
  • dev_repo/state.json, journal.jsonl, evidence_index.json, tree.md when present
  • dev_repo/architecture/README.md, ARCHITECTURE.md, graph.json, index.json, invariants.md when present
  • dev_repo/architecture/data-model/README.md, ER.md, entities.json, relationships.json, invariants.md, migrations.md when present

If runtime truth is missing, downstream execution should bootstrap it.

If architecture truth is missing during old-project takeover, downstream planning must open or require an architecture census before broad implementation.

If data-model truth is missing during old-project takeover and durable data semantics matter, downstream planning must open or require an ER/data-model census before broad data-changing implementation.

plan-start

Use when the user asks for a plan, asks to implement, or the host enters planning mode.

Required action:

  • identify whether the request is ordinary implementation, probe, takeover, free development, architecture amendment, or data-model amendment
  • route to the smallest valid downstream skill

Read the full file on GitHub · 176 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. 10d ago First seen · 176 lines · 52 tokens per session scan A cbee6cb2bca4

Subscribe to this mod's changes

contract-hook-router is a skill published in the GitHub repository blackzhanzhan/Cyber-Ming-Protocol (56 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 1,456 once invoked, about $0.0003 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-30.