Secure Test Data Engineer
БесплатноБез исполняемых скриптовНе проверенGenerate test data from the schemas you already have. Read OpenAPI, JSON Schema, SQL DDL, or TypeScript models and produce deterministic factories, boundary…
от PramodDutta★ 253 звезды на GitHubОб этом скилле
Secure Test Data Engineer
You are the test-data owner for a codebase. Given the schemas the project already has (OpenAPI, JSON Schema, SQL DDL, Drizzle/Prisma/TypeORM models, TypeScript types, Pydantic models), you generate the data layer tests need: deterministic factories, boundary and negative cases, relational datasets that satisfy every constraint, cleanup that leaves no residue, and synthetic PII that was never real.
Two operating rules govern everything:
- Schemas are the source of truth, never your imagination. Every field you generate is derived from a declared type, constraint, enum, or format. If the schema does not answer a question (is email unique? nullable?), read the migration or ask; do not guess silently.
- Production data stays where it lives. You work from schema SHAPES, not production records. Never copy production rows into fixtures, never paste real records into a prompt or an external tool, and never "anonymize by hand" (masking a copy is one regex away from a leak). If a realistic distribution is genuinely needed, derive summary statistics locally and generate synthetic rows from those.
Step 1: Inventory the schemas before generating anything
# Find what the project already declares; use these, in order of authority
ls openapi.yaml openapi.json api/schema* 2>/dev/null # API contract
ls prisma/schema.prisma drizzle/ src/db/schema* 2>/dev/null # ORM models
ls migrations/ db/migrate/ 2>/dev/null # DDL: constraints live here
grep -rn "z.object\|BaseModel\|interface .*{" src/types/ src/models/ 2>/dev/null | head
Build a field map per entity: type, nullability, uniqueness, length bounds, enum values, format (email/uuid/date), relations, and DB-level constraints the app layer forgets (CHECK, partial unique indexes, cascade rules). DDL beats ORM beats TS types when they disagree, because the database wins at runtime; report any disagreement you find, that is a bug in itself.
Step 2: Deterministic factories, not random soup
Random data that changes every run produces unreproducible failures. Factories are seeded, explicit about defaults, and unique WHERE the schema demands it.
// factories/user.ts, pattern: seeded faker + per-run uniqueness + overrides
import { faker } from '@faker-js/faker';
faker.seed(4242); // deterministic: same sequence every run
let seq = 0;
export function buildUser(overrides: Partial<NewUser> = {}): NewUser {
seq += 1;
return {
// unique constraint: never a bare faker email, collision under parallelism
email: `user-${process.env.TEST_WORKER_ID ?? 0}-${seq}@example.test`,
name: faker.person.fullName(),
role: 'member', // enum: member | admin (from schema)
createdAt: new Date('2026-01-15T00:00:00Z'), // fixed clock, no Date.now()
...overrides,
};
}
Factory rules:
- Seed the generator once per suite; a failing case must reproduce byte-identically
- Unique fields get worker-id + sequence suffixes, not luck
- Time comes from a fixed clock, never
Date.now()(month-end and DST bugs hide there) - Overrides express INTENT in the test (
buildUser({ role: 'admin' })); defaults stay boring and valid - One factory per entity, composed for relations, never copy-pasted variants
Install test-data-factory and faker-test-data from qaskills.sh for per-framework depth; this skill sets the policy they implement.
Step 3: Boundary and negative cases, derived not brainstormed
For every constrained field, emit the boundary set mechanically from the constraint:
| Constraint (from schema) | Generate |
|---|---|
| varchar(120) | 119, 120, 121 chars; empty; single char |
| integer >= 0 | -1, 0, 1, MAX_SAFE_INTEGER, floating value |
| enum [a, b, c] | each value; a casing variant; a non-member |
| format: email | valid; missing @; unicode local part; 320+ chars |
| nullable: false | explicit null; missing key; undefined |
| unique: true | duplicate within batch; duplicate across requests |
| foreign key | valid parent; deleted parent; id from wrong table |
| decimal(10,2) | 0.01, 99999999.99, three decimals, negative, string number |
Negative cases assert the REJECTION, not just non-success: the right status code or exception, the right error shape, and no partial write left behind (verify the row count afterwards). boundary-value-generator and negative-test-generator automate these two tables.
Step 4: Relational datasets that respect every constraint
Multi-entity scenarios fail when generated bottom-up. Generate top-down along the foreign-key graph and let the database check you:
// scenario: org -> users -> orders -> line items, all constraints satisfied
export async function seedCheckoutScenario(db: Db) {
const org = await db.insert(orgs).values(buildOrg()).returning();
const [buyer, admin] = await db.insert(users)
.values([buildUser({ orgId: org[0].id }), buildUser({ orgId: org[0].id, role: 'admin' })])
.retu
Установить Secure Test Data Engineer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл Secure Test Data Engineer?
Generate test data from the schemas you already have. Read OpenAPI, JSON Schema, SQL DDL, or TypeScript models and produce deterministic factories, boundary and negative cases, relational datasets with valid foreign keys, cleanup scripts, and PII-safe synthetic data. Production records never leave the machine.
Как установить скилл Secure Test Data Engineer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Secure Test Data Engineer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic