execution-hygiene

execution-hygiene is a skill for Claude Code from synthetic-sciences/openscience. It costs 150 tokens per session (2,643 once invoked), scanned A, original, Apache-2.0.

A set of practices for making computational jobs finish reliably and produce results that can be repeated on another machine. It covers detached long-running jobs, checkpoints, fixed random seeds, thread limits, and memory-aware table processing.

In plain words
What is it for?
Use it for data analysis, experiments, and other long-running computations. It helps run jobs in the background, resume partial work, and keep outputs reproducible.
Why use it?
It prevents work from being lost when a shell closes and reduces differences caused by hardware, random settings, or resource limits. Checkpoints also let interrupted jobs resume instead of restarting.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it for data analysis, experiments, and other long-running computations. It helps run jobs in the background, resume partial work, and keep outputs reproducible.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/synthetic-sciences/openscience/execution-hygiene
About the project

synthetic-sciences/openscience is an AI workbench that carries out scientific research by reading papers, forming hypotheses, writing and running code, conducting experiments, analyzing results, and preparing reports. Researchers use it for work in machine learning, biology, physics, and chemistry with remote or local models. Catalogue add-ons extend its scientific workflows through skills and instructions.

synthetic-sciences/openscience · 4,025 stars · on GitHub · openscience.sh

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 synthetic-sciences/openscience --skill execution-hygiene
Clone the repo
git clone --depth 1 https://github.com/synthetic-sciences/openscience

Made for: Claude Code.

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 execution-hygiene

README.md
[![agentmods](https://agentmods.dev/badge/skills/synthetic-sciences/openscience/execution-hygiene/github.svg)](https://agentmods.dev/skills/synthetic-sciences/openscience/execution-hygiene)
Your own site
<a href="https://agentmods.dev/skills/synthetic-sciences/openscience/execution-hygiene"><img src="https://agentmods.dev/badge/skills/synthetic-sciences/openscience/execution-hygiene/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 execution-hygiene

Your own site · 80×15
<a href="https://agentmods.dev/skills/synthetic-sciences/openscience/execution-hygiene"><img src="https://agentmods.dev/badge/skills/synthetic-sciences/openscience/execution-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,643 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.00150 $0.02643
Opus 5.5 $0.00060 $0.01057
Sonnet 5.5 $0.00030 $0.00529
Haiku 4.5 $0.00015 $0.00264

Measured 20d ago against content hash a188f6f4b023, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

execution-hygiene 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 20d 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.

backend/cli/skills/core/execution-hygiene/SKILL.md · 154 lines

How it starts

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

Execution hygiene

A number that exists only in a terminal scrollback, or that came from a run on a machine with more cores and memory than the one that will re-execute the pipeline, is not a result yet. The habits below cost minutes and remove the two most common ways an analysis fails after it "worked": it cannot be rerun, or it runs differently.

Rules

  1. Detach anything that outlives a shell prompt. A step that may exceed a few minutes goes through compute_job start (name, purpose, command, cwd, declared artifacts and checkpoint path). A job that settles within the dispatch's grace comes back in that step with its outcome, output tail and deliveries; a longer one wakes you when it ends, so go on with other work rather than wait on it, and read compute_job logs only when the tail is not enough. Never a shell sleep loop polling a PID or a file: blocked shells get killed with the session, the job record does not, and the job keeps its logs and exit code.
  2. Get a valid artifact on disk early, then improve it in place. Produce the weakest complete version of every required output as soon as the pipeline can — a small run, a coarse grid, a simple baseline — then refine within the remaining budget. A crash, a timeout or a misjudged final step then costs quality rather than everything. Where several instances or cases each need an answer, divide the budget across them up front and keep a best-so-far for each rather than perfecting the first.
  3. Checkpoint and resume. Persist progress at natural boundaries (per epoch, per chunk, per input file) under the declared checkpoint path, and make the entry point look for that state before starting. An interrupted rerun should do the remaining work, not all of it. Name checkpoints by step (chunk_0042.parquet), not by timestamp.
  4. Seed everything and cap every thread pool. random.seed(s), np.random.default_rng(s), torch.manual_seed(s), and PYTHONHASHSEED=s in the environment. Export OMP_NUM_THREADS, MKL_NUM_THREADS, OPENBLAS_NUM_THREADS and NUMEXPR_NUM_THREADS before the interpreter starts (BLAS reads them at load time), and call torch.set_num_threads(n) inside; threadpoolctl.threadpool_limits(n) caps a BLAS that is already loaded. Two reasons: reductions change summation order with thread count, so bitwise-identical reruns need a fixed count; and a BLAS that spawns 64 threads inside a 2-CPU quota thrashes. On Linux read len(os.sched_getaffinity(0)), not os.cpu_count(), and check /sys/fs/cgroup/cpu.max and memory.max for the quota. Full GPU determinism needs torch.use_deterministic_algorithms(True) and CUBLAS_WORKSPACE_CONFIG=:4096:8; say when you accept nondeterminism instead.
  5. Stream large tables and declare dtypes. pd.read_csv with usecols=[...], dtype={...} and chunksize=200_000, aggregating per chunk; np.load(path, mmap_mode="r") or np.memmap for arrays; pyarrow.parquet.ParquetFile(path).iter_batches(batch_size=...) for Parquet; polars.scan_csv or scan_parquet for lazy pipelines. Inferred dtypes flip between chunks (an integer column becomes float once a missing value appears), so explicit dtypes make the read deterministic and usually cut memory several-fold.
  6. Write outputs atomically. Write to a temporary file in the destination directory, flush and os.fsync, then os.replace(tmp, final). The rename is atomic only on the same filesystem, which is why the temp file lives next to the target. A reader never sees a half-written CSV, and a crash leaves either the old file or the new one.
  7. Probe and provision the environment in the first minutes. Before committing to a method, check what is actually installed (python -c "import x", which, the venv's pip list, the compiler, the interpreter version) and whether the network is reachable. A container can ship an empty virtual environment, a language toolchain with no scientific stack, or a reader missing for the file format you were handed. Install what you need while you still can, pin it, and vendor anything a later offline step will need; if a package is unavailable, choose a method the environment supports rather than discovering the gap an hour in. A pinned version carries its dependencies' constraints: a Bioconductor package version belongs to one Bioconductor release, which belongs to one R series, so a named tool goes into its own environment (micromamba create -n <tool> -c conda-forge -c bioconda <tool>=<version>) rather than onto the system interpreter. A denied download or a failed install is a decision point, not a retry: fall back and disclose, or install another way. Note the probe result, since it decides the plan. Before writing your own version of something a supplied tool is supposed to do, show that the tool does not do it: list its plugins, modules or subcommands, read its help, run it on a case whose answer you know. Re-implementing by hand is the expensive branch and it is usually wrong here, because a grader built on that tool compares against the tool's output and not against yours; a failed download of the tool's own reference data is a reason to look for that data locally, not a licence to reconstruct the rules from memory.
  8. Target the environment that will re-execute, not this one. Write down its CPU count, memory, wall-clock limit and whether it has network. Test under those limits: taskset -c 0-1, ulimit -v, timeout 30m, or a container with --cpus and --memory; run once with network disabled (unshare -n on Linux, or unset proxies and confirm nothing downloads). Pin dependency versions; no pip install or model download at run time when the target is offline; vendor small resources next to the code.
  9. Spend metered and single-use resources on a plan. Some resources are consumed by calling them: a scoring or evaluation service with a quota, an experiment round, a fabrication or assay batch, a submission endpoint that accepts one answer, a paid API. Before the first call, find the limit, write down how many calls you get and what each one must buy you, and rehearse the call end to end against a local stub or a cheap case so the real one is not the first time the code path runs. Log every consumption with what it returned. Treat "one batch" as literally one; there is no rerun.
  10. Log commands with exit codes. Scripts start with set -euo pipefail; each command that contributes to a reported number is appended to a run log with its exit code and duration (cmd 2>&1 | tee -a run.log; echo "exit=${PIPESTATUS[0]}" >> run.log). A silent failure in step three is the usual explanation for a wrong number in step nine.
  11. Rerun clean before finishing. Delete derived outputs or use a fresh directory, run the final pipeline from raw inputs to final artifacts once more under the target limits, and compare with the numbers you are about to report. Time it. If it exceeds the budget, that is a defect to fix, not a footnote. Skip only when the run is measured in hours and say so.
  12. Never leave placeholders. No TODO values, no NaN where a number is due, no empty files created to be filled later. When a value cannot be computed, the output states why in the place the value would appear, and the report says the same.

Read the full file on GitHub · 154 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. 20d ago Changed · +36 lines a188f6f4b023
  2. 1mo ago First seen · 118 lines · 150 tokens per session scan A bd1dc0012680

Subscribe to this mod's changes

execution-hygiene is a skill published in the GitHub repository synthetic-sciences/openscience (4,025 stars, last pushed today), licensed Apache-2.0. It adds 150 tokens to every session and 2,643 once invoked, about $0.0006 per session on Opus 5.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-09-15.

Related

Other skills, from other repositories

system-prompts

Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.

can1357/oh-my-pi · 40 tokens

tool-prompt-optimization

Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…

can1357/oh-my-pi · 0 tokens

gno

Search local documents, files, notes, and knowledge bases. Index directories, search with BM25/vector/hybrid, get AI answers with citations. Use when user wants to search files, find documents, query notes, look up information in local folders, index a directory, set up document search, build a knowledge base, needs…

gmickel/gno · 86 tokens

knowledge-model-and-provider-runtime-provider-resilience-admission-and-observability

A codebase guide for handling unreliable AI provider requests across agents and sessions, including retries, circuit breakers, fair queues, stalled streams, cache tracking, and health checks.

echoVic/blade-code · 184 tokens

knowledge-model-and-provider-runtime-model-catalog-configuration-and-credentials

A codebase guide for defining AI models and providers, selecting endpoints and credentials, configuring fallback channels, and migrating model identifiers.

echoVic/blade-code · 160 tokens

knowledge-model-and-provider-runtime

A codebase guide for choosing AI models and providers, sending requests, recovering from failures, and recording runtime information.

echoVic/blade-code · 152 tokens