Agent skill

Write Tests

by remix-run in remix-run/remix

Write, refactor, or review tests in the Remix repository. An agent skill from remix-run/remix.

MITAuto-check passedTesting & QA

Install Write Tests

skills CLI
$ npx skills add remix-run/remix --skill write-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install remix-run/remix write-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/remix-run/remix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/write-tests .claude/skills/write-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
write-tests
GitHub stars
33k
Token cost
~1.3k tokens
SKILL.md length
565 words
Files
2
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Write, refactor, or review tests in the Remix repository. An agent skill from remix-run/remix.

  • Works in 5 steps: Read the nearest package.json,… → Identify whether the package can depend… → Keep the test close to the behavior… → …
  • Changing .test.ts/.test.tsx files
  • SKILL.md covers Overview, Workflow, Runner Choice and Test Structure, plus 4 more sections
  • Calls pnpm

What it does

Write Tests is an agent skill from remix-run/remix. Write, refactor, or review tests in the Remix repository. Use when adding or changing .test.ts/.test.tsx files, package test scripts, test fixtures, mocks, coverage tests, e2e tests, or package metadata for test-only dependencies.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Testing & QA, covering Test generation, Test data and fixtures and React components. It works with Remix. The repository describes itself as: The fully-stacked web framework. The licence is MIT.

When your agent uses it

  • Changing .test.ts/.test.tsx files
  • Package test scripts
  • Package metadata for test-only dependencies

Example prompts

  • “/write-tests”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Read the nearest package.json, tsconfig.json, and existing sibling tests before choosing a runner or fixture style.
  2. Identify whether the package can depend on @remix-run/test, or whether it is a dependency of @remix-run/test and must avoid a circular…
  3. Keep the test close to the behavior owner. Prefer local helpers and direct Web/Node primitives over importing higher-level workspace…
  4. Put test-only workspace packages in devDependencies with workspace:^; do not add them to runtime dependencies.
  5. Run the package test and typecheck commands. Refresh pnpm-lock.yaml when package metadata changes.

What it can do on your machine

Read from SKILL.md and the folder at commit ef2c594. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Write Tests loads about 1.3k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 565 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from remix-run/remix at commit ef2c594, republished under its MIT licence (© remix-run). 565 words, ~1,262 tokens.

Download SKILL.mdSave it as .claude/skills/write-tests/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
write-tests
description
Write, refactor, or review tests in the Remix repository. Use when adding or changing `.test.ts`/`.test.tsx` files, package test scripts, test fixtures, mocks, coverage tests, e2e tests, or package metadata for test-only dependencies.

Write Tests

Overview

Write tests that prove behavior with the smallest useful fixture surface. Use Remix's own test/assert packages and describe/it style by default, keep package dependency graphs clean, and validate with the narrowest reliable commands.

Workflow

  1. Read the nearest package.json, tsconfig.json, and existing sibling tests before choosing a runner or fixture style.
  2. Identify whether the package can depend on @remix-run/test, or whether it is a dependency of @remix-run/test and must avoid a circular dependency.
  3. Keep the test close to the behavior owner. Prefer local helpers and direct Web/Node primitives over importing higher-level workspace packages as fixtures.
  4. Put test-only workspace packages in devDependencies with workspace:^; do not add them to runtime dependencies.
  5. Run the package test and typecheck commands. Refresh pnpm-lock.yaml when package metadata changes.

Runner Choice

  • Write new and changed tests in describe/it style. When touching a file that uses top-level test(), convert the affected tests to describe/it and leave unrelated tests alone.
  • Use @remix-run/test and @remix-run/assert by default for package tests.
  • Use node:test and node:assert/strict only when testing a package that is a dependency of @remix-run/test, or when adding Remix test/assert as a dependency would create a circular dependency.
  • Do not keep a test:bun script for node:test packages unless it has been validated. Bun's test runner does not automatically discover tests written with node:test imports.

Node test package script:

json
"test": "node --disable-warning=ExperimentalWarning --test './src/**/*.test.ts'"

Node test imports:

ts
import * as assert from 'node:assert/strict'
import { describe, it } from 'node:test'

Remix test package script:

json
"test": "remix test"

Remix test imports:

ts
import * as assert from '@remix-run/assert'
import { describe, it } from '@remix-run/test'

Test Structure

  • Name describe() blocks after the public API or behavior owner, and name it() tests by observable behavior.
  • Do not generate tests inside describe() with loops or conditionals; this breaks per-test IDE execution.
  • Prefer a few explicit cases over dense table tests when the cases document distinct behavior.
  • Keep async tests awaited all the way through. Avoid resolving promises before the behavior under test has completed.
  • Use mocks sparingly and locally. Prefer the Remix test context mocks when using @remix-run/test; use mock.method()/mock.fn() from node:test only in node-runner exception packages.
Show full SKILL.md (239 more words)Show less

Fixtures

  • Keep fixtures minimal and local to the test file unless they are reused across multiple files for the same behavior surface.
  • Avoid importing higher-level workspace packages just to build a fixture. For example, a fetch-handler test can branch on new URL(request.url).pathname instead of depending on @remix-run/fetch-router.
  • Prefer Web APIs and standards-aligned primitives when they express the fixture clearly.
  • For e2e tests, serve the smallest app or handler that exercises the user-observable behavior under test.
  • For HMR tests, use real file changes, child processes, watchers, and browser assertions when the public behavior depends on runtime coordination.
  • Close spawned processes, asset servers, watchers, and HTTP servers in test cleanup.

Assertions

  • Use @remix-run/assert by default.
  • Use node:assert/strict only in node-runner exception packages that cannot depend on @remix-run/assert/@remix-run/test.
  • Assert public behavior and observable side effects. Avoid asserting private implementation structure unless the package's public contract is the structure.
  • For error tests, assert the error shape/message that consumers can rely on.

Dependency Hygiene

  • Runtime code imports belong in dependencies.
  • Test files, fixtures, and runner-only imports belong in devDependencies.
  • Use workspace:^ for workspace package dependencies unless the repo has an established reason for workspace:*.
  • After changing package dependencies or scripts, run pnpm i --lockfile-only --ignore-scripts and then a frozen install check.
  • Reassess workspace cycles when changing testing infrastructure: pnpm i --frozen-lockfile --ignore-scripts should not emit cyclic workspace dependency warnings.

Validation

Use the narrowest meaningful commands:

sh
pnpm --filter @remix-run/<package> run test
pnpm --filter @remix-run/<package> run typecheck
pnpm i --frozen-lockfile --ignore-scripts

For cross-package or shared test infrastructure changes, also consider:

sh
pnpm run test:changed
pnpm run typecheck:changed
pnpm run lint

© remix-run, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/write-tests of remix-run/remix.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit ef2c594

Compare with similar skills

Write Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Write Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Write Tests this skillremix-run/remix33k—~1.3kAutomated safety check: PassMIT
Testing Strategiesancoleman/ai-design-components526—~3.8kAutomated safety check: PassMIT
Playwright E2E Builderdavila7/claude-code-templates32k—~5.3kAutomated safety check: NotesMIT
Write and Verify Playwright Testsappsmithorg/appsmith41k—~2.9kAutomated safety check: NotesApache-2.0
Java SDK E2E Test with Replay Snapshotgithub/copilot-sdk11k—~1.8kAutomated safety check: PassMIT
source-mssql E2E Test Harnessairbytehq/airbyte22k—~4.4kAutomated safety check: PassCustom licence

Similar skills

  • Testing Strategies

    ancoleman/ai-design-components

    Strategic guidance for choosing and implementing testing approaches across the test pyramid.

    526 GitHub stars~3.8k tokensUpdated 10 mo ago
    Testing & QAAuto-check passed
  • Playwright E2E Builder

    davila7/claude-code-templates

    Plan and build comprehensive Playwright E2E test suites with Page Object Model, authentication state persistence, custom fixtures, visual regression, and CI integration.

    32k GitHub stars~5.3k tokensUpdated today
    Testing & QAAuto-check: notes
  • Writes a Playwright end-to-end test from a prompt, runs it against a live Appsmith deployment and retries with fixes up to three times until it passes.

    41k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check: notes
  • Official

    Creates a Java SDK end-to-end test for the Copilot SDK that runs against a recorded YAML snapshot through a replay proxy, so CI needs no real authentication.

    11k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Stands up a throwaway local SQL Server 2022 backend, applies SQL fixtures and runs Airbyte spec, check, discover and read against source-mssql images.

    22k GitHub stars~4.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Engine E2E

    wix/react-native-navigation

    Official

    Run Wix Engine (mobile-apps-engine) iOS E2E tests locally to validate RNN changes.

    13k GitHub stars~1.1k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from remix-run/remix

All 19 skills in this repo
  • Supersede PR

    remix-run/remix

    Safely replace one GitHub pull request with another. An agent skill from remix-run/remix.

    33k GitHub stars~456 tokensUpdated today
    Auto-check passed
  • Add Package

    remix-run/remix

    Create or align a package in the Remix monorepo to match existing package conventions.

    33k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Author UI Primitives

    remix-run/remix

    Build idiomatic headless primitives in packages/ui for Remix.

    33k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Fix Issue

    remix-run/remix

    Fix a reported issue in Remix from a GitHub issue. An agent skill from remix-run/remix.

    33k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Make Demo

    remix-run/remix

    Create or revise demos in the Remix repository. An agent skill from remix-run/remix.

    33k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Make PR

    remix-run/remix

    Create GitHub pull requests with clear, reviewer-friendly descriptions.

    33k GitHub stars~847 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Write Tests

What does Write Tests do?

Write, refactor, or review tests in the Remix repository. An agent skill from remix-run/remix. Write Tests is an agent skill from remix-run/remix. Write, refactor, or review tests in the Remix repository.

When should I use Write Tests?

Write Tests fits situations like: changing .test.ts/.test.tsx files; package test scripts; package metadata for test-only dependencies.

How do I install Write Tests in Claude Code?

Run `npx skills add remix-run/remix --skill write-tests -a claude-code`. Or copy the skill folder (.agents/skills/write-tests in remix-run/remix) into .claude/skills/write-tests in your project. Claude Code loads it when a task matches its description.

How do I install Write Tests in Codex?

Run `npx skills add remix-run/remix --skill write-tests -a codex`. Or copy the skill folder (.agents/skills/write-tests in remix-run/remix) into .agents/skills/write-tests in your project. Codex loads it when a task matches its description.

Can I use Write Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add remix-run/remix --skill write-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/write-tests, .gemini/skills/write-tests, .github/skills/write-tests and .opencode/skills/write-tests in your project.

What does Write Tests need to run?

Going by SKILL.md and its folder, Write Tests needs the command-line tools its instructions call (pnpm).

Does Write Tests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Write Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Write Tests use?

Write Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Write Tests use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Write Tests?

Skills that share tags, products or a category with Write Tests: Testing Strategies (ancoleman/ai-design-components, 526 stars), Playwright E2E Builder (davila7/claude-code-templates, 32k stars), Write and Verify Playwright Tests (appsmithorg/appsmith, 41k stars) and Java SDK E2E Test with Replay Snapshot (github/copilot-sdk, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Write Tests?

remix-run (a GitHub organization) maintains it in remix-run/remix, which has 33,397 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: remix-run/remix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.