medharness: Skill for Claude Code

.claude/skills/mocking-stubbing/SKILL.md

mocking-stubbing is a skill for Claude Code from charliehzm/medharness. It costs 155 tokens per session (631 once invoked), scanned A, original, Apache-2.0.

A testing skill that runs software tests against synthetic data and mocked services. Mocking replaces real databases, APIs, language models, clocks, and storage with controlled test versions.

In plain words
What is it for?
It helps load test fixtures, start mock services, run unit, integration, and end-to-end tests where applicable, and produce a JUnit test report.
Why use it?
It prevents tests from contacting real services or using real personal health information. Fixed test responses also make failures repeatable instead of dependent on outside systems.

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/mocking-stubbing/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 mocking-stubbing

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/charliehzm/medharness/mocking-stubbing"><img src="https://agentmods.dev/badge/skills/charliehzm/medharness/mocking-stubbing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 155 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 631 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.00155 $0.00631
Opus 5 $0.00077 $0.00316
Sonnet 5 $0.00031 $0.00126
Haiku 4.5 $0.00015 $0.00063

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

Security

Grade A, and why

mocking-stubbing 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 11d 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/mocking-stubbing/SKILL.md · 60 lines

What it actually says

Mocking Stubbing

The "tests must pass against synthetic data" gate.

Mock layers

Layer What's mocked How
DB All persistence sqlite-in-memory or testcontainers + synthetic fixtures
External APIs Hospital HIS / 3rd party responses library / wiremock
LLM Model calls deterministic stub via mcp-model-router test mode
Time clocks freezegun / fake clock
Storage Object store localstack / minio

Discipline

  • No real service contacted during Step 9. If a test "needs prod", the test is wrong.
  • No real PHI in fixtures (enforced upstream by test-data-generation).
  • Deterministic — LLM stubs return canned responses; flaky tests are bugs.

Workflow

  1. Load fixtures from mock/阶段N-*/.
  2. Stand up mock services (script: scripts/test/up_mocks.sh).
  3. Run test pyramid: unit → integration → e2e.
  4. Collect results as JUnit XML.
  5. If green → emit TEST_REPORT.md + hand off to Step 10.
  6. If red → hand off to systematic-debugging.

Common failure modes

  1. "Just this once" real call — test reaches real LLM. Mitigation: hooks block production endpoints in test env.
  2. Flaky LLM stub — random response in stub. Mitigation: deterministic by seed.
  3. Fixture drift — fixtures stale vs schema. Mitigation: schema-driven generation.
  4. Mock leak — test uses real env var. Mitigation: explicit env clear before each test.
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. 11d ago First seen · 60 lines · 155 tokens per session scan A 5dffa81cbe03

Subscribe to this mod's changes

mocking-stubbing is a skill published in the GitHub repository charliehzm/medharness (86 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 155 tokens to every session and 631 once invoked, about $0.0008 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