Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill writing-tests -a claude-code
Open on GitHub

What 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:test case 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-tests skill, then add a bun:test case for this change.
  • Read writing-tests first and follow the .opencode rules while you edit the tests.
  • Check under the writing-tests rules 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-code

2Manually: put the files in place

~/.claude/skills/writing-tests/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/writing-tests/

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.

writing-tests spencerpauly writing-tests inspects existing code, detects your test runner, and drafts unit and integration tests with mocks and edge cases. CX Codex +1 550installs writing-tests ZaxbyHub writing-tests sets test-authoring rules for the opencode-swarm repository. Use it before changing tests that involve mocks, temporary paths, or regression checks. CX Codex +1 ★ 539repo stars writing-tests ZaxbyHub writing-tests is a Claude Code skill that sets test conventions for opencode-swarm. It loads before an agent edits a test file. CX Codex +1 ★ 539repo stars writing-dev-server-tests oven-sh writing-dev-server-tests — a skill for Claude Code and five other platforms that teaches the agent to write hot-reload and dev server tests inside test/bake/. Kicks in when you create or edit bundling, HMR, or DevServer tests. CX Codex +1 1installs writing-unit-tests riekelt writing-unit-tests guides an agent through writing or revising unit tests around observable behavior. Useful for flaky tests, confusing cases, and new test coverage. CX Codex +1 25,700installs writing-mstest-tests dotnet writing-mstest-tests is a Claude Code skill for editing existing MSTest tests and explaining MSTest configuration. It activates for requests to fix test code or MSTest-specific settings. CX Codex +1 4,500installs testing-changes riekelt testing-changes defines test requirements for code changes, enforcing regression tests for bug fixes, edge-case coverage, and strict checks against empty test diffs. CX Codex +1 25,600installs test-value-evidence dotnet test-value-evidence is a Claude Code skill that checks whether tests for a specific PR, commit, or feature catch the wrong behavior, with red-green evidence tied to a revision. CX Codex +1 1,600installs bugfix-crate ulpi-io The bugfix-crate skill works through an existing Rust crate issue file one finding at a time, testing each change and recording its outcome. CX Codex +1 117installs

From the same set121

The whole set →

Project sponsors

Companies that keep this analytics open