agentleFS
sayurionishisayurionishi/playwright-scaffold/.claude/skills/data-strategy/SKILL.md

data-strategy

Skill1 starsChanged 3 months agoMITView on GitHub

Use when you need test data — dynamic happy-path values (Faker factories) or curated invalid/boundary inputs (static). Defines where each kind of value lives.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is 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.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    .ts with as const: only — never .json, never logic.

    line 32
  2. Distinctive:

    No arrays/objects >3 items hardcoded in a spec — externalize.

    line 39
  3. Distinctive:

    No invalid values mixed into factories.

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Data Strategy

One right home per kind of value. No hardcoded test content in specs.

Classify the value

KindHomeForm
Dynamic happy-path (a valid user, product, payload)test-data/factories/{area}/*.factory.tsFaker + typed output
Universal invalid / malicious (type-mismatch, SQLi, XSS)test-data/static/util/invalid-values.tsas const; import, never redefine
Domain-specific invalid settest-data/static/{area}/*.tsas const
One-off field boundary (this test only)inline in the testliteral

Factories

  • Faker-based, return a typed object, accept overrides and an optional seed for reproducibility.
  • Produce valid happy-path data. Invalid data does NOT belong in a factory.
export function makeUser(overrides: Partial<NewUser> = {}, seed?: number): NewUser { … }
  • Consume in payloads/content: await api.post(path, { data: makeUser({ email: pinned }) }).

Static data (the three-tier rule)

  • .ts with as const only — never .json, never logic.
  • Universal sets live once in static/util/ and are imported everywhere (don't copy arrays into specs).
  • Drive for…of loops over them in format-error / security tests.

Don't

  • No Date.now()-based uniqueness collisions across parallel workers — prefer Faker or a per-test seed.
  • No arrays/objects >3 items hardcoded in a spec — externalize.
  • No invalid values mixed into factories.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.