Agent skill

Test Writing Workflow

by iOfficeAI in iOfficeAI/AionUi

Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

Apache-2.0Auto-check passedTesting & QA

Install Test Writing Workflow

skills CLI
$ npx skills add iOfficeAI/AionUi --skill testing -a claude-code

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

GitHub CLI
$ gh skill install iOfficeAI/AionUi testing --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/iOfficeAI/AionUi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/testing .claude/skills/testing && 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
testing
GitHub stars
33k
Used in
1 other repo
Token cost
~1.2k tokens
SKILL.md length
464 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

  • Works in 5 steps: Identify What to Test → Write Tests → Run Tests → …
  • Writing tests for a new feature or bug fix
  • SKILL.md covers Trigger Conditions, Framework, Test Structure and Two Test Environments, plus 4 more sections
  • Calls bun

What it does

The skill requires every feature to be tested and applies when writing tests, adding a feature, changing logic that already has tests, before claiming work is complete and before committing. It names Vitest, configured in vitest.config.ts, with a tests folder split into unit and integration areas, and two environments: node by default for main-process code, utilities and services, and jsdom for DOM-dependent code in files ending in .dom.test.ts.

The workflow begins by listing the riskiest scenarios, such as a dependency that returns undefined or throws and boundary cases like an empty list or maximum retries. Test rules then call for describing behavior rather than structure, covering at least one failure path in every describe block, keeping one behavior per test (more than three expect calls is a warning sign), and a self-check: if deleting the core logic leaves the test passing, rewrite it. The full test command must pass before each commit, a coverage run precedes a PR, and the target is at least 80 percent.

When your agent uses it

  • Writing tests for a new feature or bug fix
  • Updating tests after changing logic that already has them
  • Checking test quality and coverage before committing or opening a PR

Example prompts

  • “Add tests for the new conversation export feature, starting with the failure paths.”
  • “I changed the retry logic. Update its tests and make sure they would fail if the logic broke.”
  • “Run the full suite and the coverage check before I open this PR.”

Requirements

  • Bun
  • Vitest configured in vitest.config.ts

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Identify What to Test
  2. Write Tests
  3. Run Tests
  4. Verify Coverage
  5. Update Existing Tests

What it can do on your machine

Read from SKILL.md and the folder at commit 6744099. 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:

    • bun

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

  • Network

    No URLs in SKILL.md.

    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

Test Writing Workflow loads about 1.2k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 464 words of instructions outside code blocks.

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

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 iOfficeAI/AionUi at commit 6744099, republished under its Apache-2.0 licence (© iOfficeAI). 464 words, ~1,192 tokens.

Download SKILL.mdSave it as .claude/skills/testing/SKILL.md (or your agent's skills folder).
name
testing
description
Testing workflow and quality standards for writing and running tests. Use when: (1) Writing new tests, (2) Adding a new feature that needs tests, (3) Modifying logic that has existing tests, (4) Before claiming a task is complete.

Testing Skill

Standards and workflow for writing and running tests. Every feature must be tested.

Announce at start: "I'm using testing skill to ensure proper test coverage."

Trigger Conditions

  • Writing new tests for a feature or bug fix
  • Adding a new feature (must include tests)
  • Modifying logic that has existing tests (must update them)
  • Before claiming work is complete
  • Before committing code

Framework

Vitest 4 — configured in vitest.config.ts.

Test Structure

tests/
├── unit/          # Individual functions, utilities, components
├── integration/   # IPC, database, service interactions
├── regression/    # Regression test cases
└── e2e/           # End-to-end tests (Playwright, playwright.config.ts)

Two Test Environments

EnvironmentWhenFile naming
node (default)Main process, utilities, services*.test.ts
jsdomDOM/browser-dependent code*.dom.test.ts

Workflow

Step 1: Identify What to Test

Before writing tests, list the riskiest scenarios first:

  • What happens when the dependency returns undefined / throws?
  • What happens at boundaries (empty list, max retries, past timestamp)?
  • What is most likely to break in production?
Step 2: Write Tests

Follow these quality rules:

1. Describe behavior, not code structure

typescript
// Wrong — describes implementation
it('should call repo.getConversation', ...)

// Correct — describes behavior
it('should return cached task without hitting repo on second call', ...)
it('should reject with error when conversation does not exist', ...)

2. Every describe block must cover at least one failure path

Happy-path-only tests leave the most dangerous code untested.

3. One behavior per test

Keep each it() focused. More than 3 expect() calls in one test is a signal it is testing too much at once.

4. Self-check

After writing a test, mentally delete the core logic it targets. If the test would still pass, rewrite it — it is not guarding anything.

5. Start from risk, not from coverage gaps

List scenarios most likely to produce bugs. Write those first. Coverage is the outcome, not the starting point.

Step 3: Run Tests
bash
bun run test              # Run all tests (REQUIRED before every commit)
bun run test:coverage     # Check coverage (before opening a PR)
Step 4: Verify Coverage

Coverage target: ≥ 80% for all source files matched by vitest.config.ts → coverage.include (currently src/**/*.{ts,tsx} plus a few scripts).

New source files are automatically included in coverage — no manual config changes needed. If a new file is accidentally excluded by a rule in coverage.exclude, remove it from the exclude list.

Show full SKILL.md (167 more words)Show less
Step 5: Update Existing Tests

When modifying logic, check if existing tests need updating:

bash
bun run test -- --reporter=verbose   # See which tests pass/fail with names

If a test fails because the behavior changed intentionally, update the test. If it fails unexpectedly, investigate.

Edge Case Checklist

When testing a module, verify:

  • null / undefined inputs handled
  • Empty arrays/objects handled
  • Error thrown by dependencies handled
  • Boundary values (0, -1, max, empty string)
  • Async operations (timeout, rejection, cancellation)

Quick Checklist

Before submitting code:

  • New features have corresponding test cases
  • Modified logic has updated tests
  • bun run test passes
  • Tests describe behavior, not implementation
  • At least one failure path per describe block
  • New source files are not accidentally excluded by coverage.exclude
  • bun run test:coverage meets ≥ 80% target

Common Mistakes

MistakeCorrect
Testing implementation detailsTest observable behavior
Only testing happy pathMust include at least one failure path
5+ expects in one it()Split into separate tests
Skipping tests for "simple" codeSimple code breaks too — test the risky parts
Writing tests after saying "done"Tests are part of "done", not an afterthought

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

Files

Just SKILL.md in .claude/skills/testing of iOfficeAI/AionUi.

Open the folder on GitHubat commit 6744099

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in iOfficeAI/AionUi, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Test Writing Workflow 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.

Test Writing Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Writing Workflow this skilliOfficeAI/AionUi33k1 repos~1.2kAutomated safety check: PassApache-2.0
Coverage Toolszkldi/Tachi237—~580Automated safety check: PassNone
Backend Testingbiersoeckli/QuickStack361—~670Automated safety check: PassGPL-3.0
Phoenix Client DevelopmentArize-ai/phoenix12k—~370Automated safety check: PassApache-2.0
Test Specialistailabs-393/ai-labs-claude-skills454—~3.4kAutomated safety check: PassMIT
Hilla TestAI-Unified-Process/marketplace140—~3.9kAutomated safety check: WarnApache-2.0

Similar skills

  • Coverage Tools

    zkldi/Tachi

    Aggregates Vitest v8/Istanbul coverage across Tachi workspaces via tachi-coverage-tools (manifest, CLI, optional programmatic API).

    237 GitHub stars~580 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Backend Testing

    biersoeckli/QuickStack

    Create and review QuickStack backend unit and integration tests using the project's Vitest, Prisma, SQLite, and k3s conventions.

    361 GitHub stars~670 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Development guide for the @arizeai/phoenix-client TypeScript SDK — run and resume experiments, manage OpenTelemetry tracer providers with stack-based attach/detach, and write vitest unit and…

    12k GitHub stars~370 tokensUpdated today
    Testing & QAAuto-check passed
  • Test Specialist

    ailabs-393/ai-labs-claude-skills

    This skill should be used when writing test cases, fixing bugs, analyzing code for potential issues, or improving test coverage for JavaScript/TypeScript applications.

    454 GitHub stars~3.4k tokensUpdated 11 mo ago
    Testing & QAAuto-check passed
  • Hilla Test

    AI-Unified-Process/marketplace

    Creates tests for Hilla use cases on both sides of the browser boundary: Vitest + React Testing Library tests for the React/TypeScript view (with the generated endpoint clients mocked) and Spring…

    140 GitHub stars~3.9k tokensUpdated 2 days ago
    Testing & QAAuto-check: warnings
  • Angular Testing

    Kilo-Org/kilo-marketplace

    Write unit and integration tests for Angular v20+ applications using Vitest or Jasmine with TestBed and modern testing patterns.

    189 GitHub stars~2.9k tokensUpdated 9 days ago
    Testing & QAAuto-check passed

More from iOfficeAI/AionUi

  • Tells the agent where new code belongs in an Electron multi-process project and which APIs each process may use, with rules for new bridges, services, agents and workers.

    33k GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Standards for keeping all user-facing text translatable: read the i18n config first, use namespaced keys, reuse shared strings and follow the key naming rules.

    33k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • AionUi Version Bump

    iOfficeAI/AionUi

    Automates an AionUi release: checks the latest AionCore release and its artifacts, updates package.json, writes the changelog, opens a PR and tags the release.

    33k GitHub stars~2.1k tokensUpdated 28 days ago
    Auto-check passed

Categories

Questions about Test Writing Workflow

What does Test Writing Workflow do?

Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target. The skill requires every feature to be tested and applies when writing tests, adding a feature, changing logic that already has tests, before claiming work is complete and before committing.ts.

When should I use Test Writing Workflow?

Test Writing Workflow fits situations like: writing tests for a new feature or bug fix; updating tests after changing logic that already has them; checking test quality and coverage before committing or opening a PR.

How do I install Test Writing Workflow in Claude Code?

Run `npx skills add iOfficeAI/AionUi --skill testing -a claude-code`. Or copy the skill folder (.claude/skills/testing in iOfficeAI/AionUi) into .claude/skills/testing in your project. Claude Code loads it when a task matches its description.

How do I install Test Writing Workflow in Codex?

Run `npx skills add iOfficeAI/AionUi --skill testing -a codex`. Or copy the skill folder (.claude/skills/testing in iOfficeAI/AionUi) into .agents/skills/testing in your project. Codex loads it when a task matches its description.

Can I use Test Writing Workflow 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 iOfficeAI/AionUi --skill testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing, .gemini/skills/testing, .github/skills/testing and .opencode/skills/testing in your project.

What does Test Writing Workflow need to run?

Going by SKILL.md and its folder, Test Writing Workflow needs the command-line tools its instructions call (bun). Our summary lists: Bun; Vitest configured in vitest.config.ts.

Does Test Writing Workflow 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 Test Writing Workflow 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 Test Writing Workflow use?

Test Writing Workflow is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Writing Workflow use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 Test Writing Workflow?

Skills that share tags, products or a category with Test Writing Workflow: Coverage Tools (zkldi/Tachi, 237 stars), Backend Testing (biersoeckli/QuickStack, 361 stars), Phoenix Client Development (Arize-ai/phoenix, 12k stars) and Test Specialist (ailabs-393/ai-labs-claude-skills, 454 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Writing Workflow?

iOfficeAI (a GitHub organization) maintains it in iOfficeAI/AionUi, which has 33,346 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on September 9, 2026.

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