medharness: Instructions file for Claude Code

CLAUDE.md

medharness CLAUDE.md is an instructions file for Claude Code from charliehzm/medharness. It costs 1,887 tokens per session, scanned A, original, Apache-2.0.

A project instruction file for Claude Code, an AI coding assistant. It defines the project’s rules, required reading, compliance limits, and development process.

In plain words
What is it for?
Use it to control how AI-assisted work starts, which files and procedures it follows, and how it handles patient information, model calls, testing, and code changes.
Why use it?
It gives coding sessions shared guidance about sensitive medical data, approved AI services, audit records, testing data, and required workflow steps. This reduces the chance that an assistant will bypass project or legal requirements.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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 medharness CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/charliehzm/medharness/claude-md"><img src="https://agentmods.dev/badge/instructions/charliehzm/medharness/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,887 This file is loaded in full into every session.
When invoked 1,887 The same file — it is already loaded in full.
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.01887 $0.01887
Opus 5 $0.00944 $0.00944
Sonnet 5 $0.00377 $0.00377
Haiku 4.5 $0.00189 $0.00189

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

Security

Grade A, and why

medharness CLAUDE.md 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.

CLAUDE.md · 138 lines

How it starts

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

CLAUDE.md · 项目级 AI Coding 主控

这是 Claude Code 自动加载的项目级 system context。任何会话开始时,本文件的内容会进入主上下文。全员遵守,无例外。 维护:技术委员会 + 合规委员会;修订需双委员会会签。


0. 一句话定位

B 端医疗数据 SaaS / 数据中台公司。任何代码 / 提示 / 决策必须在 HIPAA + PIPL + 数据安全法 + 健康医疗数据安全指南 红线之内。


1. 不可逾越的红线(任何 prompt 看到这一节都要遵守)

  1. L4 PHI 永不裸入 prompt:含原始患者标识 / 姓名 / 手机 / 身份证 / 病案号 / 完整 DOB 的内容,任何时候必须先经 phi-desensitize Skill。
  2. 模型按 allowlist 路由:所有 LLM 调用必须经 mcp-model-router;不允许直连境外公共 API。
  3. 审计全量记录:每次 tool / 模型 / Skill 调用必须落 mcp-audit-log,不允许 fire-and-forget。
  4. 测试数据合规:禁止从生产采样后"脱敏"作为测试数据;强制走 test-data-generation 合成 + 指纹核验。
  5. 绕过 Hook = 合规违规:任何修改 .claude/settings.json 关闭 Hook 的尝试需双委员会签字。

2. 当前会话必读项(按顺序自动加载)

  1. CLAUDE.md
  2. .memory/项目档案.local.md(fork 用户跑过 customize.py 后产生;若不存在则读 .memory/项目档案.md 模板)
  3. .memory/MEMORY.md(索引)
  4. 当前 change 的 COMPLIANCE_TAG.md(如有活跃 change)
  5. 当前 change 的 ARCH_INPUT_INDEX.md(如已实例化)

3. SOP 入口

任何研发任务走 研发交付SOP-v2.md 的 12 步。

阶段 入口 Skill 不能跳
Step 0 合规预检 compliance-precheck
Step 1-2 PRD/TDD prd-implementation-precheck + prd
Step 3 OpenSpec openspec-new-change + openspec-continue-change
Step 4 任务拆解 task-decomposition
Step 5 Mock 数据 test-data-generation
Step 6 实现 openspec-apply-change(+ phi-desensitize 前置)
Step 7 Verify openspec-verify-change
Step 8 Review+Debug requesting-code-review + systematic-debugging
Step 9 Mocking 测试 mocking-stubbing
Step 10 合规 Gate compliance-review(Compliance-Agent 异构模型)
Step 11 合规整改 仅 Step 10 有整改时 条件
Step 12 归档审计 openspec-archive-change + audit-snapshot

4. Skill 索引(21 个)

.claude/skills/ 下所有 SKILL.md 自动注册。不要在对话里凭空发明 Skill 名字。

合规 5:compliance-precheck / phi-desensitize / compliance-review / audit-snapshot / memory-curate PRD 系列 2(v2.1 合并后):prd-implementation-precheck / prd 其他:ask-questions-if-underspecified / tdd-alignment / openspec-new-change / openspec-continue-change / task-decomposition / test-data-generation / openspec-apply-change / openspec-verify-change / requesting-code-review / systematic-debugging / mocking-stubbing / prompt-injection-scan

Read the full file on GitHub · 138 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 · 138 lines · 1,887 tokens per session scan A c4a3e5c9eabe

Subscribe to this mod's changes

medharness CLAUDE.md is an instructions file published in the GitHub repository charliehzm/medharness (86 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 1,887 tokens to every session, about $0.0094 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.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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 · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens