amortized-workflow

amortized-workflow is a skill for Claude Code, Codex from Learning-Bayesian-Statistics/baygent-skills. It costs 145 tokens per session (6,300 once invoked), scanned A, original, MIT.

A fixed process for amortized Bayesian analysis, a statistical method that trains a model to infer answers from simulated examples. It covers defining the model, creating training data, checking results, and criticizing the model.

In plain words
What is it for?
Use it to plan simulator-based Bayesian inference, choose an initial training setup, validate diagnostics, and assess model quality.
Why use it?
It keeps the analysis in a required order and includes checks that can reveal simulation or model problems before trusting the results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to plan simulator-based Bayesian inference, choose an initial training setup, validate diagnostics, and assess model quality.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/learning-bayesian-statistics/baygent-skills/amortized-workflow
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 Learning-Bayesian-Statistics/baygent-skills --skill amortized-workflow
Clone the repo
git clone --depth 1 https://github.com/Learning-Bayesian-Statistics/baygent-skills

Made for: Claude Code, 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 amortized-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/learning-bayesian-statistics/baygent-skills/amortized-workflow.svg)](https://agentmods.dev/skills/learning-bayesian-statistics/baygent-skills/amortized-workflow)
Your own site
<a href="https://agentmods.dev/skills/learning-bayesian-statistics/baygent-skills/amortized-workflow"><img src="https://agentmods.dev/badge/skills/learning-bayesian-statistics/baygent-skills/amortized-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,300 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00145 $0.06300
Opus 5 $0.00072 $0.03150
Sonnet 5 $0.00029 $0.01260
Haiku 4.5 $0.00015 $0.00630

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

Security

Grade A, and why

amortized-workflow 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 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check_diagnostics.py, scripts/inspect_training.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.

amortized-workflow/SKILL.md · 470 lines

How it starts

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

Amortized Bayesian Workflow

Workflow overview

Every amortized Bayesian analysis follows this sequence. Do not skip steps — especially simulator validation and model criticism.

  1. Formulate — Define the generative story. What latent variables or parameters generated the observations?
  2. Specify the simulator regime — The first iteration always uses offline training for fast turnaround, regardless of simulator speed. The simulator regime only determines the simulation budget for the pilot run:
    • Fast simulator (< 0.05 s per draw): pre-simulate 20 000 datasets, train for 100 epochs
    • Slow simulator (> 1 s – minutes per draw): pre-simulate 3 000–5 000 datasets, train for 100 epochs
    • No simulator / pre-existing bank: use whatever is available; switch to disk training if it does not fit in memory Online training is a refinement step — use it only after the first offline pass shows healthy diagnostics and you want to squeeze out more performance.
  3. Define prior + observation model or simulation bank
    • Implement prior and observation model and wrap them in a simulator
    • Pre-simulate the pilot budget into a dict (using workflow.simulate(N)) for offline training
    • If the simulator is external or proprietary, ensure simulations are already generated from the intended prior and data-generating process
  4. Choose the architecture — this step is critical; getting it wrong ruins inference. See references/conditioning.md for the full conditioning logic and decision table.
    • "Simple vector" means the observation is a single fixed-length feature vector whose element order is meaningful (e.g., 5 named sensor readings, a pre-computed summary statistic). Only then: route through inference_conditions with no summary network.
    • Set-based / exchangeable data — If the simulator produces N observations that are exchangeable, the data is a set, not a vector. This includes: N i.i.d. draws, regression datasets with (x, y) pairs, repeated measurements, trial-level data, cross-sectional samples. Route through summary_variables with a SetTransformer. Never put this in inference_conditions.
    • Time series — ordered sequences: route through summary_variables with TimeSeriesTransformer or TimeSeriesNetwork.
  • Images as conditions / observations for parameter inference — route through summary_variables with ConvolutionalNetwork.
  • Images as inferential targets — conditional image generation, spatial field generation, denoising, and other image-valued outputs require an image-capable diffusion inference network. Use bf.networks.DiffusionModel(subnet=...) with UNet, UViT, or ResidualUViT; see references/image-generation.md.
  • A workflow can use both slots simultaneously. Fixed-length metadata (e.g., sample size N, scalar design variables) can go in inference_conditions while structured observations go in summary_variables.
  • When in doubt, use a summary network. It is always safer to include one than to omit one; a summary network will always be needed if the data has more than one axis.
  1. Build the workflow — Prefer bf.BasicWorkflow(...)
    • Decide on which variables to auto-standardize. Prefer standardize="all" unless you have verfied that the simulator outputs are already in a good range for the networks.
  2. Run simulation sanity checks — Before training, verify that simulated data look plausible and span the relevant range of real observations. Again, pay attention to what needs to be standardized.
  3. Train the amortizer — First iteration always uses offline training for fast feedback:
    • workflow.fit_offline(...) with the pre-simulated pilot budget (default first pass)
    • workflow.fit_online(...) only as a refinement step after offline diagnostics look healthy, or when the user explicitly requests it
    • workflow.fit_disk(...) if streaming simulations from disk Always offer to run training in the terminal so the user can monitor progress interactively.
  4. Diagnose in silico — Use held-out simulations with known ground truth using the workflow's built-in diagnostics: workflow.compute_default_diagnostics(...) for numerical results and workflow.plot_default_diagnostics(...) for visual diagnostics.
  5. Amortized inference on real data — Use workflow.sample(...)
  6. Posterior predictive checks (PPCs) — Re-simulate data from posterior samples and compare to the real data using model-specific test quantities
  7. Write a report — Use references/reporting.md to generate a structured report outlining results and next steps.

Read the full file on GitHub · 470 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. 3d ago Changed · +145 tokens per session b52b139696fc
  2. 8d ago First seen · 470 lines · 0 tokens per session scan A 81ff5e9a54b1

Subscribe to this mod's changes

amortized-workflow is a skill published in the GitHub repository Learning-Bayesian-Statistics/baygent-skills (172 stars, last pushed 4d ago), licensed MIT. It adds 145 tokens to every session and 6,300 once invoked, about $0.0007 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

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

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

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