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.
npx agentmods add skills/shipwithai/shipwithai-plugins/test-slicenpx skills add ShipWithAI/shipwithai-plugins --skill test-slicegit clone --depth 1 https://github.com/ShipWithAI/shipwithai-pluginsWrote 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.
[](https://agentmods.dev/skills/shipwithai/shipwithai-plugins/test-slice)<a href="https://agentmods.dev/skills/shipwithai/shipwithai-plugins/test-slice"><img src="https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/test-slice.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00106 | $0.00810 |
| Opus 5 | $0.00053 | $0.00405 |
| Sonnet 5 | $0.00021 | $0.00162 |
| Haiku 4.5 | $0.00011 | $0.00081 |
Grade A, and why
test-slice 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Slice — Scaffold
A slice test loads only the beans for one layer, so it's fast and its failure points
straight at that layer. Use the narrowest slice that still proves the behavior; only
escalate to @SpringBootTest when the test genuinely spans layers (then see the
integration-test skill for the Testcontainers full-stack case).
Step 1 — Pick the slice
@DataJpaTest— repositories, entity mappings, custom queries. Loads JPA only, each test runs in a transaction rolled back at the end. Embedded DB by default; point it at real Postgres with@AutoConfigureTestDatabase(replace = NONE)+ Testcontainers.@WebMvcTest(XController.class)— controller routing, JSON, validation, status codes, error mapping. Loads the MVC layer only; the service is a mock.- Full
@SpringBootTest— only when the behavior crosses controller → service → repository in one flow. Heavier; don't default to it.
Step 2 — Detect conventions
- Test framework: JUnit 5 + AssertJ assumed; match Mockito/Hamcrest if the project differs.
- Mock annotation by version:
@MockitoBean(Spring Boot 3.4+) vs@MockBean(≤ 3.3, deprecated in 3.4). Check the Boot version and use the right one. - Mirror the existing
src/test/javapackage layout and naming (*Testunder Surefire).
Step 3 — Render templates
From assets/, substitute {{PACKAGE}}, {{ENTITY}}, {{ENTITY_LOWER}}:
DataJpaTest.java.tmpl→<pkg>/{{ENTITY}}RepositoryTest.java— autowires the repository +TestEntityManager, asserts with AssertJ.WebMvcTest.java.tmpl→<pkg>/{{ENTITY}}ControllerTest.java—MockMvcdrives the controller,@MockitoBean {{ENTITY}}Servicestubs the dependency,jsonPathchecks the body.
Step 4 — Report
Created:
src/test/java/.../<Entity>RepositoryTest.java (@DataJpaTest, rolls back per test)
src/test/java/.../<Entity>ControllerTest.java (@WebMvcTest, MockMvc + mocked service)
State which slice(s) you generated and which mock annotation matches the Boot version.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3d ago First seen · 63 lines · 106 tokens per session scan A d01101d3b69d
test-slice is a skill published in the GitHub repository ShipWithAI/shipwithai-plugins (10 stars, last pushed 21d ago), licensed MIT. It adds 106 tokens to every session and 810 once invoked, about $0.0005 per session on Opus 5. 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-31.
Other skills, from other repositories
code-simplifier
Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.
using-bgs-papyrus
Use when the user wants to compile Papyrus PSC to PEX, decompile PEX to PSC, detect Creation Kit Papyrus toolchains, or inspect Papyrus capabilities for Skyrim, Fallout 4, or Starfield. Triggers - "compile PSC", "decompile PEX", "PapyrusCompiler", "bgs-papyrus", "Starfield Guard syntax".
aws-dynamodb
AWS DynamoDB single-table design, GSI patterns, SDK v3 TypeScript/Python.
hns-oss-docs-i18n-rules
HARD i18n rules digest for the oss-docs harness specialists working on moai-adk-go README 4-locale set and the docs-site (adk.mo.ai.kr). Covers the canonical-locale chains, the 4-locale same-PR obligation, Mermaid TD-only, the no-emoji + icon-shortcode rule, emphasis-marker spacing, the URL blacklist, version SSOT…
rust-crate-ci
Load before editing any Rust crate in this repo (currently runners/swarm-sandbox-runner). Covers the mandatory local validation gate, common rustfmt/clippy pitfalls, and Windows-specific Rust correctness patterns that CI enforces but are hard to catch locally without a Windows toolchain.
verify
Self-healing verification loop (test → clippy → fmt).