Selector Drift Recovery
petrkindlmann/qa-skills
Bulk-regenerate broken test selectors after a UI refactor or redesign.
Write tests that pin real behavior instead of implementation details, config values, or lucky samples.
$ npx skills add dzhng/skills --skill write-tests -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dzhng/skills write-tests --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dzhng/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/engineering/write-tests .claude/skills/write-tests && rm -rf skills-srcUse ~/.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/
Install the "write-tests" agent skill from https://github.com/dzhng/skills/tree/main/skills/engineering/write-tests into .claude/skills/write-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "write-tests", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dzhng/skills/tree/main/skills/engineering/write-testsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dzhng/skills --skill write-tests -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dzhng/skills write-tests --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dzhng/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/engineering/write-tests .agents/skills/write-tests && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "write-tests" agent skill from https://github.com/dzhng/skills/tree/main/skills/engineering/write-tests into .agents/skills/write-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "write-tests", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dzhng/skills --skill write-tests -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dzhng/skills write-tests --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dzhng/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/engineering/write-tests .cursor/skills/write-tests && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "write-tests" agent skill from https://github.com/dzhng/skills/tree/main/skills/engineering/write-tests into .cursor/skills/write-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "write-tests", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dzhng/skills.git --path skills/engineering/write-tests--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dzhng/skills --skill write-tests -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dzhng/skills write-tests --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dzhng/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/engineering/write-tests .gemini/skills/write-tests && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "write-tests" agent skill from https://github.com/dzhng/skills/tree/main/skills/engineering/write-tests into .gemini/skills/write-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "write-tests", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dzhng/skills write-testsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dzhng/skills --skill write-tests -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dzhng/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/engineering/write-tests .github/skills/write-tests && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "write-tests" agent skill from https://github.com/dzhng/skills/tree/main/skills/engineering/write-tests into .github/skills/write-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "write-tests", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dzhng/skills --skill write-tests -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dzhng/skills write-tests --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dzhng/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/engineering/write-tests .opencode/skills/write-tests && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "write-tests" agent skill from https://github.com/dzhng/skills/tree/main/skills/engineering/write-tests into .opencode/skills/write-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "write-tests", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
write-testsWrite tests that pin real behavior instead of implementation details, config values, or lucky samples.
Write Tests is an agent skill from dzhng/skills. Write tests that pin real behavior instead of implementation details, config values, or lucky samples. Use when adding tests for new behavior, writing a regression test, fixing a brittle or flaky test, reviewing a test diff, or when a test breaks after a refactor or config change that didn't change behavior.
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Test generation, Failing and flaky tests and Refactoring. The repository describes itself as: Reusable AI agent skills for software factories: explore ideas, write specs, implement, review, and run autonomous research. Works with Claude Code, Codex, and other… The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d513228. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Write Tests loads about 2.4k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 1,430 words of instructions outside code blocks.
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.
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.
The full file from dzhng/skills at commit d513228, republished under its MIT licence (© dzhng). 1,430 words, ~2,357 tokens.
.claude/skills/write-tests/SKILL.md (or your agent's skills folder).A good test fails only when real behavior breaks, and passes through every refactor or config change that preserves it. Most bad tests fail the opposite way: red on harmless changes, green while the real path is broken. Every rule below serves that one goal.
For deciding whether coverage adds independent proof, where it belongs, or which existing tests can go, use audit-tests.
length == 1 passes even when normalization is broken; also assert
the stored value equals the expected canonical form.skipIf/conditionals — a skipped
assertion hides the coupling and stops covering the path. Feed the function
fixed inputs, or stub the lookup so fixture ids resolve to fixed values.
Litmus: "would this break if a config value changed with no logic change?"A suite that grabs the desktop is a suite people stop running. Whatever the test needs, it takes the least intrusive form of it:
makeKeyAndOrderFront, no
raising, no moving the pointer, no simulated clicks into the session, no audio
playback. A UI a person must not be interrupted by is still fully testable:
build the window, drive its model, and assert on the rendered view. Where a
screenshot is the evidence, capture the window's own image offscreen rather
than photographing the screen. Keep activation on the code path a person
triggers, and exercise it by calling the handler, not by launching the app
repeatedly.A test you never saw fail is decoration. For any regression test — especially one written after the fix — falsify it once: revert or break the production code the way the bug would, confirm red for the expected reason, restore, confirm green. Verify the revert actually took: a stash or checkout with a wrong pathspec reverts nothing, silently, and the "red" run quietly tests the fixed code. The tell: the "red" numbers equal the green numbers.
Triage in order of likelihood before editing anything:
Never tune constants to make one test pass without rerunning the neighbors: coupled systems reshuffle. If two consecutive tweaks each break different tests, stop poking — the control surface is wrong; find the mechanism.
Walk this on any test diff, apply fixes in the same pass, re-run the suite:
skipIf-conditional on config? → mock the seam.© dzhng, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/engineering/write-tests of dzhng/skills.
Open the folder on GitHubat commit d513228
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in dzhng/skills, which our catalogue first saw on October 7, 2026.
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Write Tests this skilldzhng/skills | 1k | — | ~2.4k | Automated safety check: Pass | MIT | |
| Selector Drift Recoverypetrkindlmann/qa-skills | 163 | — | ~5.1k | Automated safety check: Pass | MIT | |
| Swig Testswig/swig | 6.3k | — | ~2.3k | Automated safety check: Pass | Custom licence | |
| Wioworkersio/skills | 180 | — | ~5.8k | Automated safety check: Pass | MIT | |
| Offloadimbue-ai/offload | 125 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Test Fixingdavila7/claude-code-templates | 32k | 7 repos | ~739 | Automated safety check: Pass | MIT |
petrkindlmann/qa-skills
Bulk-regenerate broken test selectors after a UI refactor or redesign.
swig/swig
Run SWIG test suite for specific languages. An agent skill from swig/swig.
workersio/skills
Testing workflow skill for finding high-value test candidates, writing focused tests, generating realistic workloads, reviewing test value, and diagnosing test-suite health.
imbue-ai/offload
Activate when you see offload.toml in a repo, offload referenced in build targets (justfile, Makefile, scripts), or when you need to run a large test suite in parallel.
davila7/claude-code-templates
Run tests and systematically fix all failing tests using smart error grouping.
cwinvestments/memstack
A skill your agent uses when the user says 'write tests', 'add tests', 'test coverage', 'unit tests', 'integration tests', 'component tests', 'mocking', 'edge cases', or needs to generate tests with…
dzhng/skills
Compare screenshots against the intended design, distinguishing approved references from historical baselines.
dzhng/skills
Use Claude Code as an independent claude -p subagent when the user explicitly asks for Claude, wants a second-agent opinion from Claude, or asks to delegate a well-scoped task to Claude.
dzhng/skills
Refactor cleanly instead of layering sediment. An agent skill from dzhng/skills.
dzhng/skills
Create or revise agent skills. An agent skill from dzhng/skills.
dzhng/skills
Use the local Codex CLI as an independent second agent. An agent skill from dzhng/skills.
dzhng/skills
Run [implement-spec](../implement-spec/SKILL.md) with Codex doing the implementation passes while you orchestrate, integrate, and review.
Categories
Write tests that pin real behavior instead of implementation details, config values, or lucky samples. Write Tests is an agent skill from dzhng/skills. Write tests that pin real behavior instead of implementation details, config values, or lucky samples.
Write Tests fits situations like: adding tests for new behavior; writing a regression test; fixing a brittle; reviewing a test diff.
Run `npx skills add dzhng/skills --skill write-tests -a claude-code`. Or copy the skill folder (skills/engineering/write-tests in dzhng/skills) into .claude/skills/write-tests in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dzhng/skills --skill write-tests -a codex`. Or copy the skill folder (skills/engineering/write-tests in dzhng/skills) into .agents/skills/write-tests in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dzhng/skills --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.
SKILL.md names no scripts, command-line tools or credentials: Write Tests is instructions for the agent only.
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.
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.
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.
About 2.4k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Write Tests: Selector Drift Recovery (petrkindlmann/qa-skills, 163 stars), Swig Test (swig/swig, 6.3k stars), Wio (workersio/skills, 180 stars) and Offload (imbue-ai/offload, 125 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dzhng (a GitHub user) maintains it in dzhng/skills, which has 1,013 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 5, 2026.
Source: dzhng/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.