scientific-testing
Skill1 starsChanged 6 months agoApache-2.0View on GitHub
Design and implement tests for scientific-computing and HPC
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- developer-tool-installation-policySkill
- git-refactor-hygieneSkill
- project-repository-setupSkill
- scientific-accelerator-portabilitySkill
- scientific-build-systemsSkill
- scientific-ciSkill
- scientific-cli-benchmarkSkill
- scientific-cli-designSkill
- scientific-code-styleSkill
- scientific-container-workflowsSkill
- scientific-data-analysis-and-visualizationSkill
- scientific-data-managementSkill
- scientific-documentationSkill
- scientific-io-and-data-formatsSkill
- scientific-notebook-workflowsSkill
- scientific-numerics-reviewSkill
- scientific-package-managementSkill
- scientific-parallel-debuggingSkill
- scientific-performance-portabilitySkill
- scientific-profilingSkill
- scientific-release-and-publicationSkill
- scientific-reproducibilitySkill
- scientific-reviewSkill
- scientific-workflow-automationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. About 0 are common, 27 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when adding or reviewing tests for scientific, numerical, or parallel software where correctness must be established with …
- Distinctive: line 29
Use this skill when:
- Distinctive: line 37
Do not use this skill to replace formal verification, large-scale scientific validation campaigns, or performance benchmarking.
- Distinctive: line 42
When this skill applies:
- Distinctive: line 44
Read the repository AGENTS.md first, if present.
- Distinctive: line 46
Prefer fast tests that isolate one numerical property at a time.
- Distinctive: line 47
Use exact equality only for inherently discrete outputs.
- Distinctive: line 52
Prefer repository-native test runners and layout.
- Distinctive: line 57
Prefer a mix of:
- Distinctive: line 67
Keep expensive end-to-end cases sparse.
- Very specific: line 72
Prefer abs(a - b) <= atol + rtol * abs(b) or the testing framework's equivalent.
- Very specific: line 74
Use atol for quantities expected near zero.
- Very specific: line 75
Use rtol when magnitude scales with the input or reference solution.
- Distinctive: line 76
Avoid reusing one global tolerance for every variable.
- Distinctive: line 81
When choosing a tolerance, consider:
- Distinctive: line 91
Prefer analytically solvable cases when available.
- Distinctive: line 94
Keep reference inputs and outputs small enough for routine test runs.
- Distinctive: line 98
Do not treat a previous buggy implementation as ground truth simply because it is older.
- Distinctive: line 104
When randomness is intrinsic, assert distribution-level or range-based properties instead of single exact values.
- Distinctive: line 108
If a solver may converge in different iteration counts across platforms, test the achieved quality of the solution rather than the exact …
- Distinctive: line 114
Test more than one thread or rank count when practical.
- Distinctive: line 116
Check for invariants that should hold regardless of scheduling.
- Distinctive: line 117
Add at least one test designed to catch partitioning or halo-exchange errors when the code is domain-decomposed.
- Distinctive: line 120
If bitwise reproducibility is a user requirement, treat it as a separate goal and document the runtime and compiler constraints needed to …
- Distinctive: line 134
Run the smallest relevant test slice first before broader suites.
- Distinctive: line 135
Prefer framework-native assertions over hand-rolled comparison code.
- Distinctive: line 136
When a tolerance is non-obvious, explain it in the test or commit message.
- Distinctive: line 137
If a test is flaky, identify whether the cause is randomness, concurrency, I/O, or an invalid assertion before widening the tolerance.
- Distinctive: line 139
Prefer CI-friendly tests that finish quickly and avoid machine-specific assumptions unless the repository explicitly supports heavier …
- Distinctive: line 160
When using this skill, briefly note:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scientific Testing
Use this skill when adding or reviewing tests for scientific, numerical, or parallel software where correctness must be established with domain-appropriate checks rather than naive exact equality.
Repository AGENTS.md instructions take precedence over this skill.
Purpose
Apply a pragmatic default for:
- numerical assertions and tolerance choices;
- regression tests for scientific outputs;
- deterministic and stochastic test design;
- parallel correctness checks;
- lightweight test reporting that explains what was and was not validated.
When To Use
Use this skill when:
- outputs are floating-point, iterative, or otherwise numerically sensitive;
- the user asks for tests, validation, or regression protection;
- a benchmark or optimization task still needs a correctness backstop;
- serial and parallel implementations should agree within a justified margin;
- exact output equality is unstable or misleading.
Do not use this skill to replace formal verification, large-scale scientific validation campaigns, or performance benchmarking.
Working Approach
When this skill applies:
- Read the repository
AGENTS.mdfirst, if present. - Identify the smallest stable signal that demonstrates correctness.
- Prefer fast tests that isolate one numerical property at a time.
- Use exact equality only for inherently discrete outputs.
- Choose tolerances that reflect the algorithm, scale, and conditioning of the problem.
- State what the test proves and what it does not prove.
Prefer repository-native test runners and layout. Add new test helpers only when they reduce duplication or clarify numerical intent.
Test Selection
Prefer a mix of:
- smoke tests for basic execution and output shape;
- regression tests against trusted reference outputs;
- property tests for invariants such as conservation, monotonicity, symmetry, or bounded residuals;
- edge-case tests for small inputs, degenerate geometry, empty data, and boundary conditions;
- parallel-consistency tests comparing thread counts, schedules, or ranks.
Keep expensive end-to-end cases sparse. Cover most behavior with small, interpretable inputs.
Numerical Assertions
- Prefer
abs(a - b) <= atol + rtol * abs(b)or the testing framework's equivalent. - Use
atolfor quantities expected near zero. - Use
rtolwhen magnitude scales with the input or reference solution. - Avoid reusing one global tolerance for every variable.
- Tighten tolerances only when the algorithm and platform justify them.
- Loosen tolerances only with a concrete reason such as conditioning, non-associative reductions, or vendor-library variation.
When choosing a tolerance, consider:
- floating-point precision;
- accumulation order and reduction structure;
- iterative solver stopping criteria;
- mesh size, discretization error, or sampling noise;
- cross-platform differences from BLAS, MPI, OpenMP, or math libraries.
Reference Data
- Prefer analytically solvable cases when available.
- Otherwise use trusted baseline outputs generated from a known-good version.
- Record how the reference data was produced.
- Keep reference inputs and outputs small enough for routine test runs.
- Store derived summaries when full outputs are too large, such as norms, residuals, checksums, or key observables.
Do not treat a previous buggy implementation as ground truth simply because it is older.
Stochastic and Iterative Workloads
- Fix random seeds when the goal is deterministic regression protection.
- When randomness is intrinsic, assert distribution-level or range-based properties instead of single exact values.
- For iterative methods, assert convergence behavior, residual thresholds, or invariant preservation rather than internal iteration-by-iteration identity.
- If a solver may converge in different iteration counts across platforms, test the achieved quality of the solution rather than the exact count alone.
Parallel Correctness
- Compare serial and parallel outputs on the same input.
- Test more than one thread or rank count when practical.
- Expect small floating-point differences from non-associative reductions.
- Check for invariants that should hold regardless of scheduling.
- Add at least one test designed to catch partitioning or halo-exchange errors when the code is domain-decomposed.
If bitwise reproducibility is a user requirement, treat it as a separate goal and document the runtime and compiler constraints needed to maintain it.
Anti-Patterns
- exact equality for generic floating-point arrays without justification;
- tolerances so loose that major regressions still pass;
- tests that only check that a file exists;
- benchmarking without a correctness guardrail;
- asserting implementation details instead of scientific properties;
- large golden files with no provenance.
Validation Defaults
- Run the smallest relevant test slice first before broader suites.
- Prefer framework-native assertions over hand-rolled comparison code.
- When a tolerance is non-obvious, explain it in the test or commit message.
- If a test is flaky, identify whether the cause is randomness, concurrency, I/O, or an invalid assertion before widening the tolerance.
- Prefer CI-friendly tests that finish quickly and avoid machine-specific assumptions unless the repository explicitly supports heavier validation tiers.
- State explicitly which test commands were run and which could not be run.
Framework Patterns
For Python, prefer pytest with pytest.approx or numpy.testing helpers.
For C++, prefer the repository's existing framework. When options are open, Google Test with helper functions for vector, norm, or residual checks is a practical default.
For CMake-based projects, prefer registering tests with ctest when that is the
existing project pattern.
For array-style comparisons, prefer norms or elementwise comparisons with clear absolute and relative tolerances instead of custom loops unless the framework is unavailable.
Output Expectations
When using this skill, briefly note:
- what numerical property or invariant each added test checks;
- how tolerances or acceptance criteria were chosen;
- whether reference data, seeds, or parallel comparisons were used;
- which validation commands were run;
- which correctness risks remain untested.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

