write-backend-test

write-backend-test is a command for coding agents from DIGI-UW/OpenELIS-Global-2. It costs 0 tokens per session (238 once invoked), scanned A, original, MPL-2.0.

A command that generates a service-layer integration test for the OpenELIS Global 2 software project. An integration test checks how a service works with its real internal components and test data.

In plain words
What is it for?
Use it to create a test for a named service and module, prepare or reuse a DBUnit XML database dataset, and run the resulting test with Maven.
Why use it?
It removes much of the repeated setup involved in locating dependencies, creating test data, and following the project's test structure. It also runs the generated test and reports the result.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/digi-uw/openelis-global-2/write-backend-test
Clone the repo
git clone --depth 1 https://github.com/DIGI-UW/OpenELIS-Global-2

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-backend-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/digi-uw/openelis-global-2/write-backend-test.svg)](https://agentmods.dev/commands/digi-uw/openelis-global-2/write-backend-test)
Your own site
<a href="https://agentmods.dev/commands/digi-uw/openelis-global-2/write-backend-test"><img src="https://agentmods.dev/badge/commands/digi-uw/openelis-global-2/write-backend-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 238 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00238
Opus 5 $0.00000 $0.00119
Sonnet 5 $0.00000 $0.00048
Haiku 4.5 $0.00000 $0.00024

Measured 5d ago against content hash 822fe24e6a46, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

write-backend-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.ai/skills/backend-integration-testing/commands/write-backend-test.md · 35 lines

What it actually says

Command: /write-backend-test

Description

Generates a new service-layer integration test following the OpenELIS Global 2 standards.

User Input

$ARGUMENTS

Parameters

  • service: The service to test (for example, PatientService).
  • module: The module package name (e.g., patient).

Implementation Logic

  1. Locate the target class to understand its dependencies and methods.
  2. Identify dependencies that need to be mocked (external) vs. autowired (internal).
  3. Generate the test class using .ai/skills/backend-integration-testing/templates/integration-test-template.java.template. Replace every placeholder and the failing sentinel with working code.
  4. Create or reuse a DBUnit XML dataset under src/test/resources/testdata/ and load it in @Before.
  5. Run the specific test with mvn test -Dtest=<GeneratedIntegrationTest> and report the result.

Example Usage

/write-backend-test service=PatientService module=patient

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 35 lines · 0 tokens per session scan A 822fe24e6a46

Subscribe to this mod's changes

write-backend-test is a command published in the GitHub repository DIGI-UW/OpenELIS-Global-2 (251 stars, last pushed today), licensed MPL-2.0. It costs nothing until one of its globs matches a file; then it loads 238 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.