chp-core CLAUDE.md

Repository instructions for chp-core, a public generated mirror of a private project that defines the Capability Host Protocol. They explain which files must be changed upstream and how to run tests and install Claude Code hooks.

In plain words
What is it for?
Use them when contributing to chp-core, especially when running its Python tests, installing hooks, or deciding whether a file can be edited directly.
Why use it?
They prevent direct edits to generated files and describe the required synchronization and validation process for this mirror repository.

Instructions file

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 instructions/capabilityhostprotocol/chp-core/claude-md
Clone the repo
git clone --depth 1 https://github.com/capabilityhostprotocol/chp-core
Per session 2,586 This file is loaded in full into every session.
When invoked 2,586 The same file — it is already loaded in full.
Security scan C 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.02586 $0.02586
Opus 5 $0.01293 $0.01293
Sonnet 5 $0.00517 $0.00517
Haiku 4.5 $0.00259 $0.00259

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

Security

Grade C, and why

chp-core CLAUDE.md 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 2d 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.

- Blocks `rm -rf` outside `/tmp`
CLAUDE.md · 211 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

This repository is a GENERATED PUBLIC MIRROR of the private chp-dev repo. Do not hand-edit generated content (packages/, spec/, schemas/, conformance/, examples/, docs/, registry/, provenance/). Make the change in chp-dev and publish it with scripts/sync-to-public.sh --publish, which opens a PR into protected main (gated by the Python reference host check) plus a signed Radicle patch; --land <pr#> merges the PR and mirrors rad. Two backstops enforce this: a local pre-commit guard rejects hand-edits to generated paths, and the Mirror provenance CI check (.github/workflows/mirror-provenance.yml) rejects any PR that changes them from a non-sync/* branch. Mirror-native files (this file, .github/, README, LICENSE) may be edited here via a normal PR.

Commands

# Tests
cd packages/python && python -m pytest tests/ -m "not slow" -q --no-cov   # fast suite (~6s)
cd packages/python && python -m pytest tests/ -q --no-cov                 # full suite

# Install CHP hooks into Claude Code (PostToolUse + Stop)
PYTHONPATH=packages/python chp hooks install
PYTHONPATH=packages/python chp hooks install --with-precommit   # also installs git pre-commit hook
PYTHONPATH=packages/python chp hooks install --with-prepush     # also installs git pre-push RC guard
PYTHONPATH=packages/python chp hooks status

# Session evidence (MCP tools available in-loop — prefer these over CLI)
PYTHONPATH=packages/python python -m tools.chp_inspector --store .chp/claude-code-sessions.sqlite sessions
PYTHONPATH=packages/python python -m tools.chp_inspector --store .chp/claude-code-sessions.sqlite breakdown
PYTHONPATH=packages/python python -m tools.chp_inspector --store .chp/claude-code-sessions.sqlite show <session_id>

# Policy
PYTHONPATH=packages/python chp policy lint .chp/policy.json
PYTHONPATH=packages/python chp ci check --store .chp/claude-code-sessions.sqlite --policy .chp/policy.json

# CI visibility
PYTHONPATH=packages/python chp ci status            # show latest GitHub Actions runs (uses gh CLI)
PYTHONPATH=packages/python chp ci status --limit 10 # show last 10 runs

# Development governance (emit events to .chp/codex-self-observation.sqlite)
PYTHONPATH=packages/python chp work check-alignment --repo-root .    # 41 spec/schema/type checks
PYTHONPATH=packages/python chp work vc precommit --check tests --check alignment --repo-root .
PYTHONPATH=packages/python chp work conformance-matrix --repo-root .
PYTHONPATH=packages/python chp work vc diff --repo-root .

# Web dashboard
PYTHONPATH=packages/python python -m tools.chp_dashboard --store .chp/claude-code-sessions.sqlite

# Conformance runner (direct)
PYTHONPATH=packages/python python conformance/runner.py

Read the full file on GitHub · 211 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. 2d ago First seen · 211 lines · 2,586 tokens per session scan C 3e8e66de2015

Subscribe to this mod's changes

chp-core CLAUDE.md is an instructions file published in the GitHub repository capabilityhostprotocol/chp-core (1 stars, last pushed 6d ago), licensed Apache-2.0. It adds 2,586 tokens to every session, about $0.0129 per session on Opus 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-31.