hpc-petsc

hpc-petsc is a skill for Codex from SciMate-AI/HPC-Skills. It costs 68 tokens per session (917 once invoked), scanned A, original, MIT.

A guide for PETSc, a software toolkit for solving large mathematical problems on computers, including parallel systems. It covers linear, nonlinear, and time-dependent solver workflows and their configuration.

In plain words
What is it for?
Use it to build, review, debug, and tune PETSc programs involving vectors, matrices, linear systems, nonlinear equations, time-dependent problems, distributed data, and external solver packages.
Why use it?
It helps choose suitable solvers and preconditioners, tune runtime options, diagnose convergence, and resolve build or integration problems.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to build, review, debug, and tune PETSc programs involving vectors, matrices, linear systems, nonlinear equations, time-dependent problems, distributed data, and external solver packages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/scimate-ai/hpc-skills/hpc-petsc
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.

Any agent
npx skills add SciMate-AI/HPC-Skills --skill hpc-petsc
Clone the repo
git clone --depth 1 https://github.com/SciMate-AI/HPC-Skills

Made for: Codex.

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 hpc-petsc

README.md
[![agentmods](https://agentmods.dev/badge/skills/scimate-ai/hpc-skills/hpc-petsc/github.svg)](https://agentmods.dev/skills/scimate-ai/hpc-skills/hpc-petsc)
Your own site
<a href="https://agentmods.dev/skills/scimate-ai/hpc-skills/hpc-petsc"><img src="https://agentmods.dev/badge/skills/scimate-ai/hpc-skills/hpc-petsc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hpc-petsc

Your own site · 80×15
<a href="https://agentmods.dev/skills/scimate-ai/hpc-skills/hpc-petsc"><img src="https://agentmods.dev/badge/skills/scimate-ai/hpc-skills/hpc-petsc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 917 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00068 $0.00917
Opus 5 $0.00034 $0.00458
Sonnet 5 $0.00014 $0.00183
Haiku 4.5 $0.00007 $0.00092

Measured 12d ago against content hash 629e822591fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hpc-petsc 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 12d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (assets/templates/petsc_build_example.sh, assets/templates/petsc_ksp_slurm.sh, assets/templates/petsc4py_ksp_minimal.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/hpc-petsc/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HPC PETSc

Treat PETSc as a layered solver toolkit. Start from the highest-level object that matches the mathematical problem and only drop lower when there is a clear reason.

Start

  1. Read references/solver-stack-and-object-model.md before creating or repairing a PETSc-based solve path.
  2. Read references/ksp-and-pc-matrix.md when selecting Krylov methods, direct solves, or preconditioner families.
  3. Read references/snes-and-ts-patterns.md when the application is nonlinear or time-dependent.
  4. Read references/options-and-ksp-snes-playbook.md when translating runtime options into code or debugging prefix handling.
  5. Read references/runtime-option-matrix.md when selecting monitors, residual diagnostics, or common options-database switches.
  6. Read references/dm-and-discretization-playbook.md when DM, nullspaces, multigrid layout, or field decomposition matter.
  7. Read references/external-backend-matrix.md when deciding whether to route through HYPRE, direct solvers, or matrix-free paths.
  8. Read references/build-and-integration.md when configuring PETSc, enabling external packages, or integrating PETSc into another codebase.
  9. Read references/parallel-and-runtime-debugging.md when a distributed run shows assembly, ownership, convergence, or monitoring problems.
  10. Read references/error-recovery.md when configure, setup, or solve phases fail.

Work sequence

  1. Classify the problem first:
    • linear system -> KSP
    • nonlinear residual -> SNES
    • time-dependent problem -> TS
  2. Choose the data model before tuning the solver:
    • Vec for distributed unknowns
    • Mat or matrix-free operator for the linearization
    • DM when mesh, hierarchy, or field layout must drive assembly and coarsening
  3. Get a robust baseline solve working before tuning for scale.
  4. Move configuration into the options database whenever practical so runs stay inspectable and reproducible.
  5. Read convergence reason and monitor output before changing algorithms.

Read the full file on GitHub · 75 lines

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. 12d ago First seen · 75 lines · 68 tokens per session scan A 629e822591fb

Subscribe to this mod's changes

hpc-petsc is a skill published in the GitHub repository SciMate-AI/HPC-Skills (86 stars, last pushed 5mo ago), licensed MIT. It adds 68 tokens to every session and 917 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

exploratory-data-analysis

Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…

K-Dense-AI/scientific-agent-skills · 83 tokens

phylogenetics

Build and analyze phylogenetic trees using MAFFT (multiple alignment), IQ-TREE 2 (maximum likelihood), and FastTree (fast NJ/ML). Visualize with ETE3 or FigTree. For evolutionary analysis, microbial genomics, viral phylodynamics, protein family analysis, and molecular clock studies.

K-Dense-AI/scientific-agent-skills · 68 tokens

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

mapping-to-snomed

Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL…

maziyarpanahi/openmed · 205 tokens