/rseng-agent-skills:rseng-testingfrom rseng-agent-skills
Guides testing research software: choosing test types (unit, integration, system, regression, property-based, golden-master), frameworks (pytest/testthat/JUnit), coverage, TDD, and managing CI test matrices across compilers and platforms.
Ships in rseng-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill when writing tests for research code, setting up a test framework, deciding what and how much to test, or designing a CI test matrix that has grown across compilers, platforms, and dependency versions. The goal is code whose results others can trust and reproduce, so favour tests that are automated, saved with the code, and run on every change.
Always start with functional testing (does the software produce correct outputs for given inputs), then add non-functional testing only where a requirement demands it (performance, usability, security, compatibility, compliance). The decision rule: unit tests always; integration/system tests once components interact; regression tests whenever behaviour must stay stable; non-functional tests keyed to explicit requirements (many users -> performance; multiple platforms -> compatibility). Choose tactics per test: black-box (behaviour without knowing internals) versus white-box (specific internal paths). The full type-by-type toolbox follows.
Unit tests are the floor, not the toolbox. Match the test type to the risk being retired:
Apply these properties to every test:
Additional checklist when authoring or reviewing a test:
tests/ folder, version-controlled and shipped
with the code.Consider a test-first policy: write the failing test just before the code that makes it pass. This forces small, testable units from the start instead of refactoring for testability later.
State these when advising, so nobody over-trusts a green test suite:
Progress from informal manual checks (fine for first drafts, but forgotten once the editor closes) to saved test functions, to a full framework:
test_* or *_test), run them, compare actual vs expected, and
emit a report.Pick the best current tool for the job and say why - defaults and familiarity are not reasons:
This is a pack-wide principle, not a testing quirk: when any skill picks a tool, prefer the strongest current option for the user's context, name the runner-up, and give the one-line reason - and revisit choices as ecosystems move (rseng-dependency-management's currency discipline applies to tool choices too).
When research software must support many compilers, library versions, architectures, and runtimes, a naive full matrix explodes - e.g. (4 GCC + 6 Clang) x 10 CUDA x 4 CMake x 7 Boost = 2,800 jobs (~9.3 h even with 30 parallel runners). Use these strategies:
allpairspy; random sampling
(~200 jobs) is a weaker fallback.[cuda-only]) so iterative work does not trigger the whole pipeline.Rollout when adopting this: catalog every parameter dimension, start with pairwise core-compatibility testing, add specialized hardware incrementally, then performance testing, then full multi-platform validation. Document why each parameter and exclusion exists.
A concrete reference stack (NLeSC python-template): pytest with branch coverage enabled, and a tox matrix spanning the Python versions the SPEC 0 policy currently designates (the three most recent minors).
A green unit-test suite is not the finish line: software has been
handed over "complete" with a broken docker compose up because
nothing ever ran the app the way its users would. Before declaring
work done, verify through the same door the user will enter:
docker compose up --build must
succeed and every service reach healthy; then one real request
per exposed endpoint (curl the API route, load the page).Re-run the entry point after every wiring change (routes, schemas, configuration, env vars) and at every milestone, not once at the end - a failure found next to its cause is cheap. Never report completion while the entry point fails or was never run: state plainly what was run and what passed (rseng-honesty), and run it yourself before asking the user to (rseng-human-verification).
For analysis-tier code, "the tests pass" is often too weak a claim - the question is whether the ANALYSIS is right. Give it a quantifiable answer: validate the pipeline against reference cases with known expected results (analytic solutions, published benchmark values, conservation laws and invariants, or a trusted prior implementation) and report the agreement quantitatively within stated tolerances. One honest reference-case test measuring functional correctness is worth more for analysis code than high line coverage - coverage proves the code ran, the reference case proves it computed the right thing. Keep the reference values and their provenance in the test itself, and treat a tolerance change as a scientific decision.
The generated references.md beside this file lists the source material and pointers:
Learn more (verified):
Check whether any of these applies before moving on:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
research-software, test-frameworks, code-coverage, ci-testing, tdd
67 skills in this plugin
/rseng-agent-securityCovers operating AI coding agents securely: auditing whether the agent runs sandboxed, permission and dangerous-command configuration, containerized environments, secrets kept out of context, network egress and token privileges, prompt-injection risk, and the privacy of agent use itself. Use PROACTIVELY when permission gating is broadly disabled (skip-permissions modes), when secrets are visible to the agent's shell, or when the agent processes untrusted code, issues or web content; when a project holds personal or confidential data while a cloud agent is active (what leaves the machine, retention, training use), or when the user asks how to run coding agents safely or privately. (Supply-chain security: rseng-security; disclosing agent contributions: rseng-ai-declaration.)/rseng-ai-declarationCovers declaring AI involvement with the AI Declaration Format (https://ai-declaration.org): creating and maintaining an aidecl.yaml that records which AI tools and agents were used, what each contributed, when and how much, plus the README disclosure footnote, JSON/JSON-LD export and CI validation. Machine-readable disclosure is the practice; this format is one implementation. Use PROACTIVELY when an AI assistant or agent creates or modifies a project's content - generate aidecl.yaml if missing, update it after AI-assisted changes. Also use when the user asks about AI transparency, provenance, disclosure or EU AI Act disclosure, wants to state that NO AI was used, or mentions aidecl. For concealment requests see rseng-honesty; for the human review duty see rseng-human-verification.npx claudepluginhub fdiblen/rseng-agent-skills --plugin rseng-agent-skillsOther plugins' skills for the same job