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.
curl -O https://raw.githubusercontent.com/charliehzm/medharness/main/.claude/skills/mocking-stubbing/SKILL.mdgit clone --depth 1 https://github.com/charliehzm/medharnessWrote 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.
[](https://agentmods.dev/skills/charliehzm/medharness/mocking-stubbing)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
- Load fixtures from
mock/阶段N-*/. - Stand up mock services (script:
scripts/test/up_mocks.sh). - Run test pyramid: unit → integration → e2e.
- Collect results as JUnit XML.
- If green → emit TEST_REPORT.md + hand off to Step 10.
- If red → hand off to
systematic-debugging.
Common failure modes
- "Just this once" real call — test reaches real LLM. Mitigation: hooks block production endpoints in test env.
- Flaky LLM stub — random response in stub. Mitigation: deterministic by seed.
- Fixture drift — fixtures stale vs schema. Mitigation: schema-driven generation.
- Mock leak — test uses real env var. Mitigation: explicit env clear before each test.
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.
- 11d ago First seen · 60 lines · 155 tokens per session scan A 5dffa81cbe03
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.
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.
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…
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…
Healthcare Compliance
HIPAA compliance, healthcare regulations, privacy and security standards for medical organizations and providers.
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…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.