agentleFS
imbhargav5imbhargav5/nextbase-nextjs-supabase-starter/.agents/skills/nextbase-testing/SKILL.md

nextbase-testing

Skill827 starsChanged 2 months agoMITView on GitHub

Use for choosing, writing, or running NextBase Vitest, Testing Library, Playwright, smoke, integration, or end-to-end tests and for deciding the required local verification commands.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not replace an integration test with mocks when cookie propagation, RLS, navigation, or framework behavior is the subject under test.

    line 18
  2. Very specific:

    Follow ./setup.sh and the root AGENTS.md for local setup.

    line 22
  3. Very specific:

    Keep environment files at the repository root.

    line 23
  4. Distinctive:

    Start local Supabase and sync its generated keys before auth, database, or E2E work.

    line 24
  5. Distinctive:

    Use the repository's pinned Node and pnpm versions rather than changing toolchains inside a test.

    line 25
  6. Distinctive:

    Run the smallest relevant command first, then expand in proportion to risk:

    line 37

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

NextBase Testing

Choose the Narrowest Honest Test

BehaviorTest layer
Pure utilities, schemas, action helpers, and error mappingVitest
React rendering and user interaction isolated from navigationTesting Library with Vitest
Auth, redirects, routing, browser state, and complete user flowsPlaywright
Schema, constraints, policies, and RLSpnpm --dir apps/database test-db
Fast page availability and obvious UI regressionsBrowser smoke check plus console inspection

Do not replace an integration test with mocks when cookie propagation, RLS, navigation, or framework behavior is the subject under test.

Environment

  • Follow ./setup.sh and the root AGENTS.md for local setup.
  • Keep environment files at the repository root. Never overwrite an existing .env.local or .env.development.local.
  • Start local Supabase and sync its generated keys before auth, database, or E2E work.
  • Use the repository's pinned Node and pnpm versions rather than changing toolchains inside a test.

Test Design

  • Select by accessible role, name, label, or an explicit stable test ID. Avoid marketing copy, generated class names, and positional selectors.
  • Give each test unique data and clean it up. Do not depend on execution order.
  • Assert user-visible outcomes and durable state, not implementation details.
  • Capture the failing regression before fixing it when practical.
  • For smoke checks, verify the expected HTTP status, the key interactive landmark, and browser console errors; a listening port alone is not success.

Verification Ladder

Run the smallest relevant command first, then expand in proportion to risk:

pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm test:e2e

Database changes also require pnpm --dir apps/database test-db. Report any skipped layer and the concrete external prerequisite that blocked it.

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.