test-data-generation
Skill85 starsChanged 6 months agoApache-2.0View on GitHub
Use this skill at Step 5 of the v2 SOP to generate stage-isolated synthetic test fixtures (mock data) for an OpenSpec change. Outputs fixtures into mock/阶段N-<名称>/, computes fingerprints, declares synthetic-only source, and runs the fingerprint match against the real-sample fingerprint library. Chinese trigger examples: "生成测试数据", "Mock 数据生成", "Step 5", "合成 fixture", "生成 mock", "测试数据 generation". Do NOT use to sample from production, do NOT use real PHI as seed even after redaction. Success = fixtures generated, fingerprints computed, fingerprint match against real-sample library returns zero collisions, source declaration marked synthetic-only.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- NinjaSln-labs/agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ask-questions-if-underspecifiedSkill
- audit-snapshot-microSkill
- audit-snapshotSkill
- compliance-precheckSkill
- compliance-reviewSkill
- memory-curateSkill
- mocking-stubbingSkill
- openspec-apply-changeSkill
- openspec-continue-changeSkill
- openspec-new-changeSkill
- openspec-verify-changeSkill
- phi-desensitizeSkill
- prd-authorSkill
- prd-implementation-precheckSkill
- prd-precheckSkill
- prdSkill
- prompt-injection-scanSkill
- quick-fixSkill
- requesting-code-reviewSkill
- systematic-debuggingSkill
- task-decompositionSkill
- tdd-alignmentSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Read schema from change specs (data model section in design.md).
- Distinctive: line 47
If any collision/near-match: stop, escalate, do not write fixtures.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Read schema from change specs (data model section in design.md).
- Choose generation mode; document choice in
source_declaration.md. - Generate per-stage directory:
mock/阶段N-<名称>/. - For each output file, compute fingerprints (sha256 of canonical-sorted rows).
- Compare fingerprints against the real-sample fingerprint library (held by Data Steward).
- If any collision/near-match: stop, escalate, do not write fixtures.
- 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
- "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.
- Distribution-matched without DP — releasing means/variances can leak. Mitigation: differential privacy budget recorded in source declaration.
- Forgetting fingerprint match — fixtures written but never checked. Mitigation: this skill MUST run fingerprint compare before write.
- Cross-stage mixing — same fixture used across stages. Mitigation: per-stage directory; do not symlink.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

