medharness: Skill for Claude Code

.claude/skills/test-data-generation/SKILL.md

test-data-generation is a skill for Claude Code from charliehzm/medharness. It costs 5 tokens per session (804 once invoked), scanned A, original, Apache-2.0.

A tool for creating synthetic test data—made-up records that follow a data model without representing real patients.

In plain words
What is it for?
Use it to create fixtures for tests, model realistic data distributions, compare generated data with real-data fingerprints, and document how test data was produced.
Why use it?
It lets teams test software without exposing or accidentally reproducing identifiable patient information.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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/skills/test-data-generation/SKILL.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 test-data-generation

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/charliehzm/medharness/test-data-generation"><img src="https://agentmods.dev/badge/skills/charliehzm/medharness/test-data-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 804 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.00005 $0.00804
Opus 5 $0.00003 $0.00402
Sonnet 5 $0.00001 $0.00161
Haiku 4.5 $0.00001 $0.00080

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

Security

Grade A, and why

test-data-generation 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/skills/test-data-generation/SKILL.md · 69 lines

How it starts

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

Test Data Generation

Generates fixtures the change can be tested against, with the strong invariant: never reversible to real patients.

Generation modes (pick one)

Mode When Risk
Pure synthetic (faker-style) Default Low
Schema-driven random When distribution matters less than shape Low
Distribution-matched synthetic (DP) When ML features depend on realistic distributions Medium — guard against re-identification
Real → fully-decoupled (rare) Only with Data Steward signoff + 18-id strip + outlier removal + k-anonymity ≥ 5 High — extra audit

Forbidden mode: "sample from production then mask names". Cannot prevent re-identification. Refuse.

Workflow

  1. Read schema from change specs (data model section in design.md).
  2. Choose generation mode; document choice in source_declaration.md.
  3. Generate per-stage directory: mock/阶段N-<名称>/.
  4. For each output file, compute fingerprints (sha256 of canonical-sorted rows).
  5. Compare fingerprints against the real-sample fingerprint library (held by Data Steward).
  6. If any collision/near-match: stop, escalate, do not write fixtures.
  7. Else: write fixtures + fingerprints.txt + source_declaration.md.

Source declaration template

# Source Declaration · 阶段N-<名称>

- 生成模式: <pure-synthetic / schema-driven / distribution-matched / real-decoupled>
- 生成时间: <ts>
- 生成器: <tool + version>
- 真实样本接触: 否(默认)/ 是(需 Data Steward 签字)
- 指纹核验: <PASS / FAIL>,对比库版本 <x.y>
- 合规等级承诺: 本数据集等同 L1,可在所有 allowlist 模型上使用

Common failure modes

  1. "Looks real" generators — Faker with locale 'zh_CN' produces plausible Chinese names but no link to real patients; this is fine. The trap is when devs seed with real values.
  2. Distribution-matched without DP — releasing means/variances can leak. Mitigation: differential privacy budget recorded in source declaration.
  3. Forgetting fingerprint match — fixtures written but never checked. Mitigation: this skill MUST run fingerprint compare before write.
  4. Cross-stage mixing — same fixture used across stages. Mitigation: per-stage directory; do not symlink.

Read the full file on GitHub · 69 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 · 69 lines · 0 tokens per session scan A 9d29bc848ebe

Subscribe to this mod's changes

test-data-generation is a skill published in the GitHub repository charliehzm/medharness (86 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 5 tokens to every session and 804 once invoked, about $0.0000 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 skills, from other repositories

HIPAA Compliance Testing

Testing HIPAA compliance for healthcare applications including PHI handling, audit logging, access controls, and data encryption verification.

PramodDutta/qaskills · 28 tokens

hipaa-review

Performs a HIPAA Security Rule compliance review against all Administrative, Physical, and Technical Safeguards defined in 45 CFR Part 164, Subpart C. Auto-invoked when discussing healthcare data security, ePHI protection, HIPAA audit readiness, or business associate compliance. Evaluates required and addressable…

UnitOneAI/SecuritySkills · 86 tokens

accessibility-compliance-accessibility-audit

Accessibility Audit and Testing workflow skill. Use this skill when the user needs You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance and the operator should preserve the upstream…

diegosouzapw/awesome-omni-skills · 74 tokens

Healthcare Compliance

HIPAA compliance, healthcare regulations, privacy and security standards for medical organizations and providers.

jmsktm/claude-settings · 19 tokens

evaluating-with-leakage-gates

Evaluate an OpenMed de-identification or clinical NER model against the leakage-first release gates G1a through G8, which gate releases on residual PHI leakage rather than on F1. Use when the user wants to run the OpenMed eval harness on a synthetic golden set, decide whether a de-id model is RELEASABLE or…

maziyarpanahi/openmed · 158 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens