/fde-core:test-data-strategyfrom fde-core
Guides creation of realistic test data when production data cannot be copied, covering synthesis, subsetting, masking with referential integrity, and edge-case fixtures. Use when tests need representative data, verification is blocked, or bugs only reproduce against real-shaped data.
Ships in fde-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Getting data you're allowed to have that behaves like data you aren't.
In a regulated organization, production data cannot be copied into a test environment. Not "shouldn't" — cannot, without a legal basis, and often not even then. GDPR, PCI-DSS, HIPAA, and internal data policies all land in the same place: the realistic data you need to verify anything is the data you are least allowed to touch.
The result is a specific and very common failure. Tests run against three hand-written rows containing "Test User" and "123 Test Street." They pass. The change ships. It breaks immediately on a customer whose name contains an apostrophe, an address with no postcode, an order placed before the 2019 migration, or an account with forty thousand transactions.
The data wasn't wrong. It was unrepresentative, which is harder to notice.
This is frequently the real bottleneck to shipping in an enterprise — not the code, and not the tests, but having anything sensible to run them against.
access-and-onboardingResolve <workspace> before reading or writing artifacts: read ../_shared/workspace-conventions.md and follow its location and header rules. All artifact paths below use that resolved workspace. Preserve existing sections when appending.
<workspace>/03-requirements.md — the criteria determine what data must exist<workspace>/02-system-map.md — where data lives and what shape it takes../_shared/enterprise-constraints.md.Ask before designing anything, because the answer determines the whole approach and people's assumptions about it are usually wrong in both directions.
Where a masking pipeline already exists, use it. Building a parallel one because you didn't ask is a real and avoidable mistake.
Never copy production data as an interim measure "just to unblock myself." It's the one shortcut in this portfolio that can end an engagement, and it is not recoverable by apologizing.
The failure mode of synthetic data is that it's too clean. To generate data that exercises the code, you need to know what real data actually looks like — which you can learn without seeing any of it.
Query for shape, never content:
-- ANSI-shaped aggregates. No personal data returned.
-- Some engines want FILTER (WHERE …); if that fails, use the SUM(CASE) form.
SELECT COUNT(*), COUNT(DISTINCT customer_id),
MIN(created_at), MAX(created_at)
FROM orders;
SELECT
SUM(CASE WHEN postcode IS NULL THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS pct_null_postcode,
SUM(CASE WHEN postcode = '' THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS pct_empty_postcode
FROM addresses;
SELECT status, COUNT(*) FROM orders GROUP BY status ORDER BY 2 DESC;
SELECT n_orders, COUNT(*) FROM (
SELECT customer_id, COUNT(*) AS n_orders FROM orders GROUP BY customer_id
) t GROUP BY n_orders ORDER BY 1 DESC;
These queries are the home for shape analysis. data-archaeology (fde-data) points here rather than pasting a second copy.
Aggregate queries are usually permitted where row access isn't, and they tell you what matters: null rates, value distributions, the long tail, the enum values still in the data that the code no longer produces.
That last one is a reliable source of production bugs. A status column with a value the current code can't handle, left over from a system three migrations ago, exists in most mature databases.
| Approach | Use when | Cost | Realism |
|---|---|---|---|
| Hand-written fixtures | Specific scenarios, unit tests | Low | Low — only what you thought of |
| Generated synthetic | Volume, distributions, most integration tests | Medium | Medium — as good as your shape analysis |
| Masked production subset | High realism needed and a pipeline exists | High | High |
| Recorded production traffic | Characterizing existing behavior | Medium | High — real shapes, redact before storing |
| Shared seeded environment | Team already has one | Low to use | Varies |
Most engagements need two: generated data for volume and distribution, hand-written fixtures for the specific awkward cases. They answer different questions and neither substitutes for the other.
The most common failure in generated data, and the one that produces the most confusing bugs. An order referencing a customer that doesn't exist doesn't test anything real — it tests your generator.
Generate in dependency order, carrying real keys forward. Preserve:
REFUNDED order needs a payment to have existedThis is where the value is. Synthetic data is uniformly well-behaved unless you make it otherwise, and uniform data tests nothing interesting.
Build in, explicitly:
O'Brien, Smith-Jones. The classic, still breaking things.Each of these corresponds to a real production incident somewhere. They're cheap to include and they're the reason to build the dataset rather than hand-write six rows.
Test data that can't be regenerated identically produces flaky tests and unreproducible bugs.
The dataset's limitations are part of the verification story. If your data has no records predating the 2019 migration, then "the migration path is verified" is false, and verification-plan needs to know.
State the coverage explicitly, so a later reader doesn't over-trust a green test run.
Write to <workspace>/03c-test-data.md:
# Test data strategy
**Engagement:** <name>
**Author:** FDE
**Date:** <YYYY-MM-DD>
**Status:** draft
**Confidence:** <how well this represents production>
**Source revision:** <repo>@<short SHA>, or "no repository yet"
## Policy position
**Production data in lower environments:** not permitted `[confirmed: per data policy, J. Okafor 03-14]`
**Existing masking pipeline:** none
**Approved synthetic dataset:** none
## Approach
<Which of the five, and why. Usually two in combination.>
## Shape analysis
| Aspect | Production | Source |
|---|---|---|
| `orders` row count | ~40M | `SELECT COUNT(*)` |
| Orders per customer | median 2, p99 340, max 4,112 | aggregate query |
| `postcode` null rate | 3.2% | aggregate query |
| `status` values | 7 active, **2 legacy still present** | `GROUP BY status` |
## Generated dataset
**Generator:** `tools/gen-testdata.<ext>` · **Seed:** `20260326` · **Volume:** 5,000 customers / 12,000 orders
**Deliberate edge cases:**
| Case | Why | Count |
|---|---|---|
| Apostrophe in name | Historic escaping bugs | 50 |
| Null postcode | 3.2% in production | 160 |
| Pre-migration format | Migration path coverage | 200 |
| Legacy `status` values | Still present in prod | 40 |
| Extreme cardinality customer | Pagination / N+1 | 1 @ 4,000 orders |
| Unicode + emoji | Encoding path | 30 |
## What this does NOT represent
<The honest limits. Feeds the gap list in `07-verification.md`.>
- No data older than 2019 — pre-migration path is **not** covered by this dataset
- Volume is 5k customers vs 40M production — not suitable for performance verification
- No multi-currency records — added in a later phase
## Refresh
<How to regenerate, and when it must be updated — e.g. on any schema migration.>
Copying production data to unblock yourself. The one shortcut that can end an engagement.
Data that's too clean. Uniformly well-behaved synthetic data passes tests that real data fails. The awkward cases are the point.
Broken referential integrity. Tests your generator, not the system.
Uniform cardinality. Every customer with exactly three orders never finds the pagination bug. Real distributions are long-tailed.
Unseeded generation. Flaky tests and bugs that won't reproduce.
Committing a large dataset instead of the generator. Unreviewable, and it rots against the schema.
Not updating it with migrations. The data silently stops being valid and the tests silently stop meaning anything.
Overstating coverage. If there's no pre-migration data, the migration path isn't verified. Say so — verification-plan needs it in the gap list.
Building a masking pipeline that already exists. Ask first.
Stop when one generator (or fixture set) exists, the awkward-case table is filled, and "What this does NOT represent" is written. Do not keep generating.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
test-data, data-synthesis, data-masking, test-fixtures, data-subsetting
npx claudepluginhub rpraharaj/forward-deployed-engineer --plugin fde-core34 skills in this plugin
/access-and-onboardingTurn getting access into a tracked critical path instead of a passive wait. Enumerate every credential, permission, environment, and account the engagement needs, identify who approves each and its lead time, request long-lead items first, find workarounds for what is blocked, and keep a queue of useful work that does not depend on the blocker. Use in the first days at a new organization, whenever you are blocked on permissions, VPN, repository access, database grants, pipeline rights, or environment credentials, or when someone says "I'm still waiting for access". Use for access and permissions, not a failing login in application code and not a CAB that will not approve a deploy./adoption-planPlan and assess how intended end users move to a new business workflow, including barriers, process ownership, a bounded pilot, support, fallback, and successful-use measures. Use when a live solution is underused, users keep an old workaround, or rollout needs changes to daily work. Training the receiving technical team to operate the system is enablement-handoff; deploying code is deploy-runbook./blast-radiusMap everything a proposed change could break before making it - direct callers, cross-repository consumers, published contracts, event subscribers, feature flags, shared database objects, and config coupling - ending with a risk rating and the specific things to verify. Use before any non-trivial change, when asked "what breaks if we touch this", before modifying anything shared or published, or before a schema change. Do not use for a release go/no-go - that is release-readiness; this skill supplies the consumer list./change-control-navigationFind and work with the organization's change process before it blocks you - which gates apply, what evidence each requires, submission deadlines, freeze periods, release calendars, and segregation of duties - then work backwards from the release window. Use early in any engagement that will reach production, when a CAB or stage gate exists, when a release calendar or freeze period constrains the plan, or when work is technically complete and cannot ship. Discovering the process at go-live is a self-inflicted slip./characterization-testsPin the current behavior of untested legacy code before changing it - including behavior that looks like a bug, because something downstream may depend on it - using golden master and approval test patterns so a refactor or fix can be verified as behavior-preserving. Use before modifying code with thin or no test coverage, before any refactor of legacy code, when a change site has no tests and you need a safety net, or when someone says "we can't change that, nobody knows what it does". This is what makes legacy change safe rather than brave./context-strategyWork effectively in a codebase far larger than any context window, across an engagement that spans many sessions. Decide what to read versus search versus script versus delegate, maintain a durable working guide so each session does not re-derive the same map, define a working set, and hand off cleanly when context runs low. Use when a repository is too large to explore file-by-file, when context is filling up mid-task, when starting a multi-session engagement, when you catch yourself re-discovering something you already worked out, or when someone says "this repo is huge". Run before repo-recon when the tree is large; this sets the budget, it does not replace the system map.Other plugins' skills for the same job