handling-sensitive-test-data
БесплатноБез исполняемых скриптовНе проверенKeeps test data legally and operationally safe: classifies personal data, replaces production copies with synthetic or anonymized fixtures, manages secrets in…
от jaktestowac★ 124 звезды на GitHubОб этом скилле
Handling Sensitive Test Data
Use this skill when the data a test suite touches would matter if it leaked.
Test environments are where personal data goes to be forgotten about. A production dump copied to staging "just for this migration" outlives the migration by years; a HAR fixture recorded from a real session carries a real session token into the repository; a failing test uploads a screenshot of a customer's address to a CI artifact store with public read access. None of these are exotic. All of them are the ordinary result of nobody having decided anything.
This skill is about doing testing work safely. It is not legal advice, and where a regime's specific obligations are in play, the data protection owner decides, not the tester.
When to Use
- a test environment is seeded from a production dump
- fixtures contain real names, emails, phone numbers, or addresses
- HAR files, traces, videos, or screenshots are committed or uploaded to CI
- secrets are needed for local runs and nobody knows where they should live
- a data protection review, audit, or certification is coming
- a test suite is being set up for a product handling health, financial, or identity data
Operating Principles
- Synthetic first. Generated data that satisfies the same constraints is safer than any transformation of real data, and usually easier to reason about.
- Anonymization is a claim that must survive re-identification. Replacing a name while keeping a date of birth, postcode, and purchase history re-identifies most people. Assess the combination, not the field.
- Minimize before you protect. The safest record is the one you did not copy. Take the smallest slice that makes the test work.
- Artifacts leak. Traces, HARs, videos, screenshots, and logs all capture whatever was on screen or on the wire. They need the same treatment as fixtures.
- Secrets never enter the repository, the trace, or the log. Not in a fixture, not in a URL, not in a committed
.env. - Retention is a decision, not a default. Data with no deletion date accumulates until an incident finds it.
Workflow
Phase 0: Inventory what the suite touches
List every place data lives, including the ones that are not obviously data:
- fixture files and factories
- seeded databases and their source
- recorded HAR files and network fixtures
- CI artifacts: traces, videos, screenshots, logs, coverage
- test reports and their hosting
- local
.envfiles and developer machines - third-party services the tests send data to
The artifacts are where teams are surprised. A Playwright trace holds every request body, every response, and a screenshot of every step.
Phase 1: Classify
Use ./resources/pii-classification.md to sort what you found:
| Class | Examples | Handling |
|---|---|---|
| Direct identifiers | Name, email, phone, national id, account number | Never in test data |
| Quasi-identifiers | Date of birth, postcode, gender, job title, timestamps | Dangerous in combination; three are usually enough to re-identify |
| Special category | Health, biometrics, ethnicity, religion, sexual orientation, trade union membership | Strictest handling; usually forbidden outside production |
| Financial | Card numbers, IBANs, transaction records | PCI scope; use provider test values only |
| Credentials | Passwords, tokens, keys, session cookies | Never committed, never in artifacts |
| Business confidential | Pricing, contracts, internal metrics | Handled per company policy |
The quasi-identifier row is the one that gets missed. Anonymizing names while keeping birth date and postcode is not anonymization.
Phase 2: Choose the data strategy
Ranked by safety. Take the highest one that works.
| Strategy | Safety | Cost | Use when |
|---|---|---|---|
| Synthetic, generated | Highest | Building factories | Default for everything |
| Synthetic, shaped by production statistics | High | Analysis of distributions | Load tests, realistic volume |
| Anonymized production copy | Medium | Pipeline plus verification | Migration and reporting tests that need real shape |
| Pseudonymized production copy | Low | Key management | Almost never; the mapping is itself personal data |
| Raw production copy | None | None | Never |
If the answer lands below synthetic, write down the specific test that cannot be satisfied by generated data. Usually there is one real constraint, such as a data distribution or a legacy record shape, and it can be met by generating data with that property rather than by copying.
Phase 3: Build the synthetic path
./resources/anonymization-recipes.md covers both generation and transformation.
For generated data:
- seeded and deterministic, so a failure reproduces
- satisfying the real constraints: valid checksums where the system validates them, plausible lengths, correct formats
- including the awkward cases: apostrophes in names, non-La
Установить handling-sensitive-test-data в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл handling-sensitive-test-data?
Keeps test data legally and operationally safe: classifies personal data, replaces production copies with synthetic or anonymized fixtures, manages secrets in local runs and CI, strips personal data from traces and HAR files, and sets retention rules. Use when tests run against a production data copy, when fixtures contain real names or emails, when a data protection review is coming, or when test artifacts might carry personal data into CI logs.
Как установить скилл handling-sensitive-test-data?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл handling-sensitive-test-data запускает скрипты?
Нет, скилл состоит только из инструкций (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