Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 .env files 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
Полный SKILL.md на GitHub

Установить handling-sensitive-test-data в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

resources/anonymization-recipes.mdresources/data-handling-checklist.mdresources/pii-classification.mdresources/secrets-in-ci.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить handling-sensitive-test-data с