scientific-performance-portability
Skill1 starsChanged 6 months agoApache-2.0View on GitHub
Review and improve scientific-computing and HPC code so it remains
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-profilingSkill
- scientific-release-and-publicationSkill
- scientific-reproducibilitySkill
- scientific-reviewSkill
- scientific-testingSkill
- scientific-workflow-automationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 26 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈26
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when editing or reviewing scientific, numerical, or parallel software where the goal is good performance on more than one …
- Distinctive: line 28
Use this skill when:
- Distinctive: line 36
Do not use this skill as a substitute for benchmarking or profiling.
- Distinctive: line 41
When this skill applies:
- Distinctive: line 43
Read the repository AGENTS.md first, if present.
- Distinctive: line 45
Prefer algorithmic and layout improvements before machine-specific tuning.
- Distinctive: line 46
Keep architecture-specific code behind clear feature checks or options.
- Distinctive: line 50
Prefer portable wins first, then isolate unavoidable specialization.
- Distinctive: line 54
Ask questions such as:
- Distinctive: line 68
Prefer data layouts and loop structures that compilers can optimize reliably.
- Distinctive: line 69
Use blocking or tiling parameters that can be configured or auto-selected when one fixed value is unlikely to fit every platform.
- Distinctive: line 71
Keep threading choices explicit and test at more than one core count.
- Distinctive: line 76
Avoid making vendor-specific intrinsics the only implementation path.
- Distinctive: line 77
Keep specialized kernels isolated behind capability checks, build options, or runtime dispatch.
- Distinctive: line 79
Document the baseline path and the specialized path.
- Distinctive: line 80
Make sure tests cover both paths when feasible.
- Distinctive: line 81
Treat assumptions about alignment, SIMD width, page size, or cache geometry as explicit constraints, not implicit truths.
- Distinctive: line 89
Avoid hardcoding thread counts, socket counts, or rank/thread mappings unless the workflow is explicitly machine-specific.
- Distinctive: line 91
Prefer exposing placement and thread controls through runtime settings.
- Distinctive: line 100
Avoid relying on one compiler's undocumented optimization behavior.
- Distinctive: line 101
Prefer standard language constructs before non-portable extensions.
- Distinctive: line 102
Keep architecture-specific flags out of broad default builds.
- Distinctive: line 103
Test at least one alternate compiler or build mode when portability is a goal.
- Distinctive: line 104
Document any minimum compiler, SIMD, or ISA assumptions introduced by a change.
- Distinctive: line 106
If the build system already provides opt-in tuning knobs, preserve that structure.
- Distinctive: line 131
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 Performance Portability
Use this skill when editing or reviewing scientific, numerical, or parallel software where the goal is good performance on more than one machine or toolchain, not maximum tuning for a single host.
Repository AGENTS.md instructions take precedence over this skill.
Purpose
Apply a pragmatic default for:
- avoiding overfitting to one compiler, CPU, socket topology, or cluster;
- separating portable optimizations from machine-specific tuning;
- reviewing data layout, threading, and vectorization choices for robustness;
- documenting performance assumptions and fallback paths.
When To Use
Use this skill when:
- the user asks whether an optimization will generalize across machines;
- code is being tuned on one platform but must stay usable elsewhere;
- architecture-specific flags, intrinsics, or affinity assumptions are proposed;
- performance regressions appear only on some compilers or node types;
- fallback behavior for non-ideal hardware needs to be preserved.
Do not use this skill as a substitute for benchmarking or profiling. Use those skills to measure and diagnose, then use this one to assess portability tradeoffs.
Working Approach
When this skill applies:
- Read the repository
AGENTS.mdfirst, if present. - Identify which performance assumptions are truly portable and which are not.
- Prefer algorithmic and layout improvements before machine-specific tuning.
- Keep architecture-specific code behind clear feature checks or options.
- Preserve a correct, maintainable fallback path.
- State what hardware/compiler context was considered and what remains untested.
Prefer portable wins first, then isolate unavoidable specialization.
Portability Questions
Ask questions such as:
- Does this optimization depend on one cache size, vector width, or NUMA layout?
- Will another compiler still optimize this code reasonably?
- Is
-march=native, a vendor intrinsic, or a runtime binding assumption leaking into default behavior? - Does the code degrade safely when SMT, NUMA, SIMD width, or accelerator support differs?
- Is the performance claim tied to one input shape or one machine balance?
Preferred Optimization Patterns
- Favor better algorithms, reduced memory traffic, and improved locality before narrow hardware tuning.
- Prefer data layouts and loop structures that compilers can optimize reliably.
- Use blocking or tiling parameters that can be configured or auto-selected when one fixed value is unlikely to fit every platform.
- Keep threading choices explicit and test at more than one core count.
- Separate correctness logic from optimization-specific dispatch when practical.
Architecture-Specific Code
- Avoid making vendor-specific intrinsics the only implementation path.
- Keep specialized kernels isolated behind capability checks, build options, or runtime dispatch.
- Document the baseline path and the specialized path.
- Make sure tests cover both paths when feasible.
- Treat assumptions about alignment, SIMD width, page size, or cache geometry as explicit constraints, not implicit truths.
Machine-specific optimization is acceptable when it is opt-in, localized, and backed by a portable fallback.
Threading, NUMA, and Placement
- Avoid hardcoding thread counts, socket counts, or rank/thread mappings unless the workflow is explicitly machine-specific.
- Prefer exposing placement and thread controls through runtime settings.
- Review whether first-touch, allocation strategy, or memory placement assumptions hold on different NUMA systems.
- Expect one "best" affinity policy on one machine to be suboptimal elsewhere.
Portable performance often requires making placement tunable rather than fixed.
Compiler and Build Concerns
- Avoid relying on one compiler's undocumented optimization behavior.
- Prefer standard language constructs before non-portable extensions.
- Keep architecture-specific flags out of broad default builds.
- Test at least one alternate compiler or build mode when portability is a goal.
- Document any minimum compiler, SIMD, or ISA assumptions introduced by a change.
If the build system already provides opt-in tuning knobs, preserve that structure.
Measuring Portability
- Compare performance across at least two relevant machine or compiler contexts when practical.
- Normalize conclusions by workload size and hardware characteristics.
- Distinguish "slower but acceptable fallback" from "unusable off the tuned platform."
- Report exact build flags, runtime settings, and benchmark inputs.
One-machine speedup is not enough evidence for a broadly useful optimization.
Anti-Patterns
- hardcoding
-march=nativeor one CPU's tuning assumptions into defaults; - deleting a generic implementation after adding one specialized kernel;
- selecting tile sizes, thread counts, or affinity policies that only fit one benchmark host;
- assuming benchmark wins on one compiler imply wins everywhere;
- mixing portability-sensitive dispatch logic with core numerical code until it becomes hard to maintain.
Output Expectations
When using this skill, briefly note:
- what performance-portability assumption was reviewed or changed;
- whether the solution is portable by default, specialized behind a guard, or machine-specific by design;
- which compiler, hardware, or runtime contexts were considered;
- which measurements or build checks were run;
- which portability risks or untested environments remain.
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.

