Agent skill

Test Writer

by axelixlabs in axelixlabs/axelix

Writes new tests for Axelix source code (Java, Kotlin, TypeScript, JavaScript) that follow the project's testing standards — public-API contract coverage, test isolation, given/when/then structure…

LGPL-3.0Auto-check passedMobile

Install Test Writer

skills CLI
$ npx skills add axelixlabs/axelix --skill test-writer -a claude-code

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

GitHub CLI
$ gh skill install axelixlabs/axelix test-writer --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/axelixlabs/axelix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent_skills/test-writer .claude/skills/test-writer && 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
test-writer
GitHub stars
148
Token cost
~2.2k tokens
SKILL.md length
904 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
LGPL-3.0

At a glance

Writes new tests for Axelix source code (Java, Kotlin, TypeScript, JavaScript) that follow the project's testing standards — public-API contract coverage, test isolation, given/when/then structure…

  • Works in 8 steps: Test the public API only → Positive and negative coverage → Given / when / then — one cycle per test → …
  • The user asks to write
  • SKILL.md covers Before writing a single test, The eight standards, Project conventions (Axelix) and Workflow to follow, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Test Writer is an agent skill from axelixlabs/axelix. Writes new tests for Axelix source code (Java, Kotlin, TypeScript, JavaScript) that follow the project's testing standards — public-API contract coverage, test isolation, given/when/then structure, parameterization, positive + negative cases, and exception-type-only assertions. Use whenever the user asks to write, add, or generate tests for a class/method/module/endpoint, to cover a new feature or bug fix with tests, to "test this", to increase coverage for a specific unit, or when a task involves producing test…

Its SKILL.md is about 2.2k 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 Mobile, covering Android development, Test generation and Debugging. It works with Java, Kotlin, JavaScript and TypeScript. The repository describes itself as: The source code of Axelix - a Delta Force for your Spring Boot ecosystem. The licence is LGPL-3.0.

When your agent uses it

  • The user asks to write
  • Generate tests for a class/method/module/endpoint
  • Cover a new feature
  • Bug fix with tests

Example prompts

  • “test this”
  • “add tests for X”
  • “Use the test-writer skill to write new tests for Axelix source code (Java, Kotlin, TypeScript, JavaScript) that follow the project's testing…”
  • “/test-writer”

Workflow steps

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

  1. Test the public API only
  2. Positive and negative coverage
  3. Given / when / then — one cycle per test
  4. Assert exception type, never message text
  5. Parameterize repetitive cases
  6. Isolation — every test cleans up after itself
  7. Skip nullability noise
  8. Group related tests with @Nested

What it can do on your machine

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are java).

    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 Writer loads about 2.2k tokens when it runs. Until then it costs about 159 tokens; SKILL.md has 904 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~159
When it runs · the whole SKILL.md, loaded when a task matches
~2.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 axelixlabs/axelix at commit c0f35c5, republished under its LGPL-3.0 licence (© axelixlabs). 904 words, ~2,219 tokens.

Download SKILL.mdSave it as .claude/skills/test-writer/SKILL.md (or your agent's skills folder).
name
test-writer
description
Writes new tests for Axelix source code (Java, Kotlin, TypeScript, JavaScript) that follow the project's testing standards — public-API contract coverage, test isolation, given/when/then structure, parameterization, positive + negative cases, and exception-type-only assertions. Use whenever the user asks to write, add, or generate tests for a class/method/module/endpoint, to cover a new feature or bug fix with tests, to "test this", to increase coverage for a specific unit, or when a task involves producing test files under `master/`, `sbs/`, `common/`, or `front-end/` — even if the user only says "add tests for X".

Test Writer

Guide for AI agents writing new tests for the Axelix monorepo (master/, sbs/, common/, front-end/).

These standards come from how Axelix reviews tests (see the companion test-reviewer skill). Writing to them the first time avoids the review churn. The whole point of a test is to pin down the contract of a unit — what it promises callers — so that a future change that breaks the promise fails loudly. Everything below serves that goal.

Before writing a single test

  1. Find the unit under test and its contract. The contract is the public API, not the implementation:
    • Java/Kotlin: public methods, ideally declared on an interface with Javadoc. Read the Javadoc — it is the spec.
    • TypeScript/JavaScript: functions, classes, hooks, or components exported from the module.
  2. Extract the contract into a checklist before writing any assertions. From the Javadoc/TSDoc and signatures, list:
    • each valid input domain and its success output,
    • every documented exception/error and the condition that triggers it,
    • boundary/edge inputs (empty, null, blank, zero, first/last),
    • any implementation-declared guarantee (caching, idempotency, concurrency) stated in the class-level docs.
  3. Turn each checklist item into at least one test. A happy path alone is an incomplete test suite — the negative cases are where bugs hide.
  4. Locate the right test file. Naming is <SourceName>Test in the same Gradle/npm module as the source, mirroring the source package. Match the surrounding tests' style, imports, and assertion library — read a neighbor first.

The eight standards

1. Test the public API only

Test the contract, never the internals. Assert observable outcomes — return values, thrown exceptions, interactions with collaborators — not private fields or private methods.

  • Do not use reflection or @VisibleForTesting to reach into internals.
  • Do not re-implement production logic in the test to "check" it.
  • When a concrete class declares an extra guarantee beyond its interface (e.g. a CachingAuthorityResolver caches results), test that guarantee through the public API — e.g. inject a mock delegate and assert it is called only once for a repeated key.
2. Positive and negative coverage

Every documented behavior needs a test, both success and failure. Derive them from the contract. For example, given:

java
/**
 * Parses the given JWT token and converts it into a {@link User}.
 *
 * @throws ExpiredJwtTokenException if the JWT token has expired
 * @throws InvalidJwtTokenException if the JWT token is invalid or tampered with
 * @throws JwtParsingException      if the token cannot be parsed or contains insufficient data
 */
PasswordlessUser decodeTokenToUser(String token) throws ...;

Write the happy path and one test per documented exception (expired, invalid, unparseable). Same idea for IAM (authenticated success + unauthenticated + unauthorized) and for data access (record found + not found + backing store unavailable).

3. Given / when / then — one cycle per test

Structure every test as a single Arrange → Act → Assert pass, marked with the Axelix comment convention (note the trailing periods):

java
@Test
void decodesUserFromValidToken() {
    // given.
    String token = validTokenFor(user);

    // when.
    PasswordlessUser decoded = jwtDecoderService.decodeTokenToUser(token);

    // then.
    assertThat(decoded.getUsername()).isEqualTo(user.getUsername());
}

A when → then → when → then sequence (multiple act/assert cycles) means you have more than one scenario — split it into separate tests. Each test verifies exactly one thing.

4. Assert exception type, never message text

The exception type is part of the contract; its human-readable message is not. Assert the type only:

java
// then.
assertThatThrownBy(() -> jwtDecoderService.decodeTokenToUser(expiredToken))
        .isInstanceOf(ExpiredJwtTokenException.class);

Do not use hasMessage, hasMessageContaining, message snapshots, or expectErrorMessage. The one exception: a stable, machine-readable errorCode that the contract explicitly documents may be asserted — descriptive prose never.

5. Parameterize repetitive cases

When the same behavior holds across a set of inputs, use a parameterized test instead of copy-pasted methods. Classic candidate: a method that returns null/throws for empty, null, and blank strings.

java
@ParameterizedTest // GH-1234
@ValueSource(strings = {"", "   "})
@NullSource
void returnsEmptyForBlankInput(String input) {
    // given / when.
    Optional<Authority> result = resolver.resolve(input, HttpMethod.GET);

    // then.
    assertThat(result).isEmpty();
}

Each parameterized invocation is still a single given/when/then scenario. Reference the driving issue with a // GH-NNNN comment when there is one, as the codebase does.

Show full SKILL.md (355 more words)Show less
6. Isolation — every test cleans up after itself

Test A must never depend on data or state left by test B, and order must not matter. Whatever a test mutates, it must reset:

  • Database rows / files / caches: use transactional rollback, @AfterEach cleanup, or per-test containers. Do not reach for @DirtiesContext as a crutch.
  • Shared/static state and Spring context: reset in @BeforeEach/@AfterEach; prefer fresh mocks per test.
  • No @Order, no implicit reliance on execution sequence, no reusing an ID/token another test created.
7. Skip nullability noise

Do not add assertions that merely check a value is non-null when the real assertion already implies it, or when null was never plausible. They add noise and verify almost nothing. Assert the meaningful property instead (assertThat(user.getUsername()).isEqualTo(...) already proves user is non-null).

When a unit has several distinct scenario groups (e.g. "enabled" vs "disabled", "found" vs "not found"), group them in @Nested static inner classes with descriptive names, as the codebase does:

java
class ActuatorPrometheusEndpointTest {

    @Nested
    class WhenEnabled { /* tests */ }

    @Nested
    class WhenDisabled { /* tests */ }
}

Do not introduce a single @Nested class holding only one category — nesting earns its keep only when it separates groups.

Project conventions (Axelix)

  • Assertions: AssertJ (import static org.assertj.core.api.Assertions.assertThat;) and assertThatThrownBy. Match whatever the neighboring tests use.
  • Comments: // given. / // when. / // then. with trailing periods.
  • Naming: either plain intent (decodesUserFromValidToken) or the shouldX_whenY form — follow the file you're adding to.
  • Types: prefer explicit types over var when the type isn't obvious from the right-hand side.
  • Copyright header: copy the license header block from a sibling test file into any new test file.

Workflow to follow

  1. Read the source's public API and Javadoc/TSDoc → build the contract checklist (§ "Before writing").
  2. Read one or two neighboring test files to lock onto local style, imports, and helpers.
  3. Draft tests: one per checklist item, positive and negative, parameterizing repetitive inputs, grouping with @Nested when there are multiple scenario groups.
  4. Apply the eight standards to each test as you write it.
  5. Run the tests (via the module's Gradle/npm task) and confirm they pass. Fix failures — a test you didn't run is not done.
  6. Self-check against the list below before handing off.

Self-check before finishing

- [ ] Every documented behavior (success + each exception/edge) has a test
- [ ] Only public/exported API is exercised; no reflection into internals
- [ ] Each test is a single given → when → then; no act/assert/act/assert
- [ ] Exceptions asserted by type only; no message-text assertions
- [ ] Repetitive input sets are parameterized, not copy-pasted
- [ ] Each test cleans up its own DB/shared/context state; order-independent
- [ ] No noise-only non-null assertions
- [ ] Related scenario groups organized with @Nested
- [ ] Tests actually run and pass

© axelixlabs, LGPL-3.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 .agent_skills/test-writer of axelixlabs/axelix.

Open the folder on GitHubat commit c0f35c5

Compare with similar skills

Test Writer 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 Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Writer this skillaxelixlabs/axelix148—~2.2kAutomated safety check: PassLGPL-3.0
Crap Analyzerswingerman/engineer154—~1.2kAutomated safety check: PassMIT
Hexagonal Architectureyamcodes/arkenv1454 repos~2.9kAutomated safety check: PassMIT
Corvus Java Evaluatorcorvus-dotnet/Corvus.JsonSchema199—~1.6kAutomated safety check: PassApache-2.0
Build Teaql Appteaql/teaql-agent-kit2.8k—~4.6kAutomated safety check: PassMIT
Build Nitro Modulesmargelo/react-native-skills175—~9.9kAutomated safety check: PassMIT

Similar skills

  • Crap Analyzer

    swingerman/engineer

    A skill your agent uses to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods.

    154 GitHub stars~1.2k tokensUpdated 16 days ago
    Testing & QAAuto-check passed
  • Hexagonal Architecture

    yamcodes/arkenv

    Design, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.

    145 GitHub starsUsed in 4 repos~2.9k tokens
    MobileAuto-check passed
  • Corvus Java Evaluator

    corvus-dotnet/Corvus.JsonSchema

    Work on the Java port of the V5 standalone schema evaluator (src-java/corvus-json-schema, Maven artifact io.github.corvus-dotnet:corvus-json-schema): loader, compiler, the ASM bytecode generator…

    199 GitHub stars~1.6k tokensUpdated today
    MobileAuto-check passed
  • Build Teaql App

    teaql/teaql-agent-kit

    Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries.

    2.8k GitHub stars~4.6k tokensUpdated 12 days ago
    MobileAuto-check passed
  • Build Nitro Modules

    margelo/react-native-skills

    Builds and designs React Native Nitro Modules with Nitrogen, HybridObject TypeScript specs, Nitro View components, generated native implementations, zero-copy and native-state APIs, Swift/Kotlin/C++…

    175 GitHub stars~9.9k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Official

    Audits existing tests in any language using formal, research-backed test smell names and the testsmells.org 19-smell academic taxonomy.

    5.6k GitHub starsUsed in 1 repo~2.5k tokens
    MobileAuto-check passed

More from axelixlabs/axelix

All 9 skills in this repo
  • Config Breaking Changes

    axelixlabs/axelix

    Review configuration property changes in the Axelix project for breaking changes and migration-policy compliance.

    148 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed
  • Backlog Refiner

    axelixlabs/axelix

    Refine and triage GitHub backlog by finding open issues that are stale, obsolete, or resolved by another path.

    148 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Pick open GitHub issues in the Axelix monorepo that are suitable for unpaid volunteer contributors working in their spare time.

    148 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Prepare Minor Release

    axelixlabs/axelix

    Prepare an Axelix minor lockstep release — the pre-release housekeeping changes, a hand-editable release-notes draft, and the post-release bump to the next -SNAPSHOT.

    148 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Create batched Dependabot-style pull requests for GitHub security findings in axelixlabs/axelix, grouped by dependency surface such as master/front-end, master/build.gradle.kts, or starter Gradle…

    148 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Starter Domain Reviewer

    axelixlabs/axelix

    Reviews changes in sbs/starter-domain for technology-agnostic domain logic, forbidden production dependencies, and Java 11+ compatibility.

    148 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed

Questions about Test Writer

What does Test Writer do?

Writes new tests for Axelix source code (Java, Kotlin, TypeScript, JavaScript) that follow the project's testing standards — public-API contract coverage, test isolation, given/when/then structure…. Test Writer is an agent skill from axelixlabs/axelix. Writes new tests for Axelix source code (Java, Kotlin, TypeScript, JavaScript) that follow the project's testing standards — public-API contract coverage, test isolation, given/when/then structure, parameterization, positive + negative cases, and exception-type-only assertions.

When should I use Test Writer?

Test Writer fits situations like: the user asks to write; generate tests for a class/method/module/endpoint; cover a new feature; bug fix with tests.

How do I install Test Writer in Claude Code?

Run `npx skills add axelixlabs/axelix --skill test-writer -a claude-code`. Or copy the skill folder (.agent_skills/test-writer in axelixlabs/axelix) into .claude/skills/test-writer in your project. Claude Code loads it when a task matches its description.

How do I install Test Writer in Codex?

Run `npx skills add axelixlabs/axelix --skill test-writer -a codex`. Or copy the skill folder (.agent_skills/test-writer in axelixlabs/axelix) into .agents/skills/test-writer in your project. Codex loads it when a task matches its description.

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

What does Test Writer need to run?

SKILL.md names no scripts, command-line tools or credentials: Test Writer is instructions for the agent only.

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

Test Writer is published under the LGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Writer use?

About 2.2k tokens (SKILL.md is roughly 8.9k 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 Writer?

Skills that share tags, products or a category with Test Writer: Crap Analyzer (swingerman/engineer, 154 stars), Hexagonal Architecture (yamcodes/arkenv, 145 stars), Corvus Java Evaluator (corvus-dotnet/Corvus.JsonSchema, 199 stars) and Build Teaql App (teaql/teaql-agent-kit, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Writer?

axelixlabs (a GitHub organization) maintains it in axelixlabs/axelix, which has 148 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

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