writing-tests · zaxbyhub, claude — Claude Code skill: test rules for opencode-swarm
writing-tests is a Claude Code skill that directs the agent to opencode-swarm's test rules before it writes or edits tests.
MIT ★ 539 updated 2026-10-29
npx skills add ZaxbyHub/opencode-swarm --skill writing-tests -a claude-codeWhat writing-tests does
writing-tests is a Claude adapter that hooks the agent into opencode-swarm's test authoring rules. Its own text is short: read ../../../.opencode/skills/writing-tests/SKILL.md and treat that file as the workflow. Use it before you add or change tests in the repository.
No scripts ship with it. The adapter carries execution notes and names the .opencode file as the source of truth for bun:test, keeping mocks apart, temp paths, per-file isolation, and the demand that a regression test actually fail once the bug returns. Repo workflows that reference the skill load this adapter first, then apply the .opencode guidance.
The path matters. In a repository without .opencode/skills/writing-tests/SKILL.md the adapter has nothing to hand the agent, so you end up with a pointer to a file that is not there.
What it helps with
- Write a new
bun:testcase that matches the repo's conventions - Stop mocks from leaking across test files
- Settle where temporary test files should live
- Confirm a regression test fails before the fix lands
- Wire test rules into a Claude workflow
Example prompts for the agent
- Load the
writing-testsskill, then add abun:testcase for this change. - Read
writing-testsfirst and follow the.opencoderules while you edit the tests. - Check under the
writing-testsrules whether this regression test fails without the patch.
How to install writing-tests
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill writing-tests -a claude-code2Manually: put the files in place
~/.claude/skills/writing-tests/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/writing-tests/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill writing-tests -a codex2Manually: put the files in place
.agents/skills/writing-tests/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill writing-tests -a cursor2Manually: put the files in place
.cursor/skills/writing-tests/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ZaxbyHub/opencode-swarm .claude/skills/writing-tests2Manually: put the files in place
.github/skills/writing-tests/SKILL.md1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill writing-tests -a gemini-cli2Platform CLI
gemini skills install https://github.com/ZaxbyHub/opencode-swarm --path .claude/skills/writing-testsManually: put the files in place
.devin/skills/writing-tests/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill writing-tests -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about writing-tests
How do I install writing-tests in Claude Code?
Run npx skills add ZaxbyHub/opencode-swarm --skill writing-tests -a claude-code. The skill lands at ~/.claude/skills/writing-tests/SKILL.md.
What does writing-tests do?
It sends the agent to opencode-swarm's test rules before tests get created or edited, plus a few execution notes for Claude.
Where do the actual rules live?
In the repository's .opencode/skills/writing-tests/SKILL.md. The adapter points there and does not repeat the contents.
Source text
SKILL.md · MIT
--- name: writing-tests description: Claude Code adapter for opencode-swarm test authoring rules. Use before creating or modifying tests in this repository. metadata: audience: swarm-plugin --- # Writing Tests Read and follow `../../../.opencode/skills/writing-tests/SKILL.md` as the canonical workflow. ## Claude Code Execution Notes - Use the `.opencode` file as the source of truth for `bun:test`, mock isolation, temp path, per-file isolation, and regression-test falsifiability rules. - When a repository-specific Claude workflow references this skill, load this adapter first, then apply the canonical `.opencode` guidance.
© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm
Similar skills
All skills for Testing and QA →writing-tests by other authors comes first.