agentleFS
firebasefirebase/genkit/.agents/skills/genkit-tools-testing/SKILL.md

genkit-tools-testing

Skill6.6k starsChanged 6 days agoApache-2.0View on GitHub

Guide for writing and reviewing Vitest unit tests (*.test.ts) in genkit-tools/. Use when creating, modifying, fixing, or reviewing tests under genkit-tools/.

1 other project uses a version of this.

Trending

Steady talk.about the whole repository

Jan 2026: 3 mentionsFeb 2026: 0 mentionsMar 2026: 4 mentionsApr 2026: 3 mentionsMay 2026: 0 mentionsJun 2026: 3 mentionsJul 2026: 0 mentionsAug 2026: 5 mentionsSep 2026: 7 mentionsOct 2026: 7 mentionsNov 2026: 5 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the firebase/genkit repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about firebase/genkit

The biggest 5 of 65 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 65

Talked about on GitHub, Bluesky, Hacker News and Stack Overflow (65 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 10

5 more on Bluesky

On Stack Overflow · 2

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. genkit-ai/genkit★ 6.6k100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

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

    One behavior per test: Keep each it(...) block focused on a single behavior following arrange -> act -> assert with a clear, …

    line 10
  2. Very specific:

    Prefer single structured assertions: Use one toMatchObject / toEqual assertion on structured outputs instead of scattering field-by-field …

    line 11
  3. Very specific:

    Parameterized variations (it.each): Use it.each when verifying the same behavior across multiple input variations and a table …

    line 12
  4. Very specific:

    Prefer separate it(...) blocks when cases exercise distinct behaviors or branches, need different setup or assertions, or are simple enough …

    line 13
  5. Very specific:

    Prefer named-object rows (it.each([{ name: '...', ..., expected: ...

    line 14
  6. Distinctive:

    Test our logic, not library internals: Do not write unit tests that merely verify third-party library or Zod schema validation behavior.

    line 15
  7. Very specific:

    Mirror src/ in tests/: Place tests in tests/<subpath>/<name>.test.ts (kebab-case) mirroring src/<subpath>/<name>.ts.

    line 19
  8. Very specific:

    Keep fixtures separate from test suites: Put reusable test builders and fixture constants in dedicated testing/mock_data.ts helpers rather …

    line 20

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

Genkit Tools Testing Guide

1. Test Structure & Philosophy

  • One behavior per test: Keep each it(...) block focused on a single behavior following arrange -> act -> assert with a clear, behavior-driven description. Split tests that assert multiple independent functions or behaviors.
  • Prefer single structured assertions: Use one toMatchObject / toEqual assertion on structured outputs instead of scattering field-by-field expect(...) calls on the same object, and avoid asserting incidental ordering (e.g. Object.keys(...) insertion order) when order isn't part of the contract.
  • Parameterized variations (it.each): Use it.each when verifying the same behavior across multiple input variations and a table meaningfully reduces duplication:
    • Prefer separate it(...) blocks when cases exercise distinct behaviors or branches, need different setup or assertions, or are simple enough that it.each adds more indirection than clarity.
    • Prefer named-object rows (it.each([{ name: '...', ..., expected: ... }]) with $name in the test title) over positional tuples whenever rows have 3+ fields or complex objects; simple 2-element [input, expected] scalar tuples are fine for concise mappings.
  • Test our logic, not library internals: Do not write unit tests that merely verify third-party library or Zod schema validation behavior. Focus on our domain logic, transformations, edge-case fallbacks, and error handling.

2. File Layout & Shared Fixtures

  • Mirror src/ in tests/: Place tests in tests/<subpath>/<name>.test.ts (kebab-case) mirroring src/<subpath>/<name>.ts.
  • Keep fixtures separate from test suites: Put reusable test builders and fixture constants in dedicated testing/mock_data.ts helpers rather than duplicating large inline objects across *.test.ts files.

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.