hardline-mcp: Instructions file for Claude Code

CLAUDE.md

hardline-mcp CLAUDE.md is an instructions file for Claude Code from sushiHex/hardline-mcp. It costs 4,181 tokens per session, scanned A, original, MIT.

A set of project-specific instructions for developing hardline-mcp, including how its Python code, SQLite store, processes, tests, and deployment work together.

In plain words
What is it for?
Use it when changing hardline-mcp to follow its existing design rules and avoid breaking behavior involving messaging, jobs, sessions, or concurrent processes.
Why use it?
It explains constraints that are easy to miss, such as many processes sharing one live database while running different revisions of the code.

Instructions file for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is sushiHex/hardline-mcp's own configuration. It tells Claude Code how to work on hardline-mcp 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 hardline-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sushiHex/hardline-mcp. 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/sushiHex/hardline-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/sushiHex/hardline-mcp

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 hardline-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sushihex/hardline-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/sushihex/hardline-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/sushihex/hardline-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/sushihex/hardline-mcp/claude-md/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 hardline-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sushihex/hardline-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/sushihex/hardline-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,181 This file is loaded in full into every session.
When invoked 4,181 The same file — it is already loaded in full.
Security scan A 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.04181 $0.04181
Opus 5.5 $0.01672 $0.01672
Sonnet 5.5 $0.00836 $0.00836
Haiku 4.5 $0.00418 $0.00418

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

Security

Grade A, and why

hardline-mcp CLAUDE.md scanned grade A 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 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

last. `subprocess.run(text=True)` decodes as cp1252; `print()` encodes as
CLAUDE.md · 300 lines

How it starts

The opening of the file, as written. The whole thing — 300 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.

hardline-mcp — working notes

The README explains what this is. This file is for working on it: the conventions, the gotchas that cost real time, and the rules the code already follows so new code follows them too.

Commands

python -m pip install -e ".[dev,codex-watch]"   # codex-watch un-skips the Codex wake tests
python -m pytest tests/test_sessions.py -q      # one module
python -m pytest "tests/test_identity.py::test_verified_owner_token_survives_later_probe_failure" -q
python -m pytest -q -rs -n auto                 # full suite, as CI runs it
python scripts/mutate.py [case ...] [--jobs N]  # regression mutations (tests/mutations/*.json)
hardline-mcp report [--db PATH]                 # read-only audit of a store (report.py)

No linter or formatter is configured. CI (.github/workflows/ci.yml) runs three jobs side by side: the suite on Ubuntu + Windows + macOS, Python 3.10 and 3.14, in xdist workers, then an import of hardline_mcp.server to check that the tools register; the mutation catalog once; and the live sandbox tests on Linux and macOS. Don't run hardline-mcp by hand to test it. It is a stdio server and blocks waiting for input.

Module map

Dependencies point one way: procid <- mailbox <- jobs/sessions <- watch <- server.

  • cli.py picks the subcommand (serve / watch / watch-codex / report) before importing anything heavy, so the watchers never load mcp or websockets unless they need them.
  • server.py is the only module that imports mcp. Everything else is pure logic that takes an injectable db_path/now_fn, so tests can drive it directly. Every tool is async def and runs its blocking body through _in_thread (anyio.to_thread). A sync tool would block the event loop, pings included. mcp is pinned <2.0.0: 2.x removed mcp.server.fastmcp.
  • mailbox.py owns the SQLite connection, WAL, the messages table, and SCHEMA_VERSION. jobs.py (jobs table) and sessions.py (agent_sessions) reuse its _connect/_resolve_db. All three tables are in one file on purpose, so a job's result and its inbox notice can commit in one transaction.
  • procid.py handles liveness (ALIVE/DEAD/UNKNOWN) and creation-time process keys, Windows included.
  • adapters.py spawns the agent CLIs (hermes chat, codex exec, claude -p). It resolves the executables, sets sandbox/read controls, and decodes output. dispatch.py is the cancellable executor behind ask_*_async.
  • github_context.py is pure logic for github=: collect a PR through an injected gh runner, store snapshots content-addressed on disk, and render what one reviewer receives. adapters.py supplies the runner (under the call's on_spawn) and pipes the result to the child's stdin.
  • watch.py is a read-only, level-triggered observer of unread mail (what Claude's Monitor uses). wake_codex.py forwards the same observations to a bound Codex app-server thread.
  • channel.py decides what to push into a Claude Code session and when (pure logic, no MCP import); delivery.py records push facts and derives receipted/awaiting/unreceipted. server.serve serves through server.serve_streams - FastMCP's own Server.run with channel.tap and the pusher spliced onto the raw streams - not mcp.run(). See docs/push-delivery.md.
  • announce.py is the notice wake beside the pusher in the same loop: one constant notice outstanding until its own receipt returns, new mail only. Two subclasses supply the address and transport:
    • claude_inbox.py posts into the Claude Code session's own cross-session inbox (the pipe and token in hardline's environment, proven the host's by ~/.claude/sessions/<pid>.json). It replaces channel push whenever the inbox is proven; push is the fallback. See docs/claude-inbox-wake.md.
    • codex_queue.py pins the Codex thread from tools/call _meta (through the tap's on_call hook), steers a notice into the turn that last called hardline (codex_steer.py: turn/steer on the local daemon, over codex app-server proxy), and queues with codex queue when the daemon refuses. See docs/codex-queue-wake.md.
  • hints.py remembers which Claude conversation last held each claimed name (lane_hints), so a relaunched or reconnected conversation is told about its old names and their mail. Advice only: it never claims, routes or reads. See docs/session-continuity.md.
  • bindings.py records which Codex thread each claimed name belongs to (thread_names), written only by attributed claims, restorations, releases and dismissals. A Codex server's wake poll claims its thread's names back through the ordinary ownership rule (sessions.survey/sessions.restore, server._restore_pending), and async admission refuses a result addressed to the parent-derived lane while the thread has names the server does not hold. See "A Codex thread's names" in docs/session-continuity.md.
  • report.py audits a store read-only (mode=ro, one snapshot, never mailbox._connect): which revisions the registered servers run (recorded in process_revisions, keyed by process identity), whether the legacy sessions table still has live writers, and who acked each job notice against who dispatched the job. Evidence, not verdicts: see docs/architecture.md, "Who acked a message".

Read the full file on GitHub · 300 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 Changed · +2 lines · +37 tokens per session c75f3a5dc3e8
  2. 14d ago Changed · +23 lines · +402 tokens per session d4c41ece2696
  3. 16d ago Changed · +25 lines · +469 tokens per session d4f562cd9edb
  4. 17d ago Changed · +4 lines · +82 tokens per session 79225f4689dd
  5. 20d ago Changed · +20 lines · +364 tokens per session 9a2821b391a1
  6. 22d ago Changed · +5 lines · +89 tokens per session 372de32af2c1
  7. 23d ago Changed · +4 lines · +72 tokens per session 6420a3ed3f0c
  8. 27d ago Changed · +13 lines · +210 tokens per session ce413734d916
  9. 1mo ago Changed · +58 lines · +832 tokens per session af0a2d40f284
  10. 1mo ago First seen · 146 lines · 1,624 tokens per session scan A 05b95beb9fec

Subscribe to this mod's changes

hardline-mcp CLAUDE.md is an instructions file published in the GitHub repository sushiHex/hardline-mcp (1 stars, last pushed 2d ago), licensed MIT. It adds 4,181 tokens to every session, about $0.0167 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens