het-agi/collideragent/reproduction-guide-generator
Claude Code and agent skill by het-agi/collideragent
- community
Checking that the SKILL.md file is still in the repository.
Generate a self-contained reproduction guide from a completed analysis pipeline run. Triggers when the user asks to "create a reproduction guide", "write a reproduction package", "make this reproducible", or "create scripts for reproducing this analysis".
Install
npx vskill@latest install het-agi/collideragent/reproduction-guide-generatorSKILL.md
Reproduction Guide Generator
Overview
After a collider physics analysis pipeline has completed, this skill generates a self-contained reproduction directory containing all scripts, model files, and a step-by-step guide that allows another person or AI agent to reproduce the results from scratch.
The reproduction package must support two execution backends:
| Backend | Tools | Use case | |
|---|---|---|---|
| local | wolframscript + mg5_aMC (installed locally) | User has Mathematica and MadGraph5 on their machine | |
| magnus | Magnus cloud CLI (magnus run <blueprint>) | No local HEP tools needed; computation runs on remote clusters |
When to Invoke
- After a pipeline run has completed (all steps finished, plots generated)
- When the user asks to create a reproduction guide, reproducibility package, or standalone scripts
Run Discovery
This skill can be invoked in two ways:
- By the orchestrator at the end of a pipeline run — the conversation already contains context (run label, progress paths, results). Use that context directly.
- Standalone in a new conversation — no prior context is available. In this case:
- Read
progress/run_manifest.yamlto discover all completed runs. - If the user specified a run label, package that run.
- If there is only one run, package that run.
- If there are multiple runs and the user did not specify, package the most recent run (by timestamp).
Inputs
In orchestrator mode, inputs come from the conversation context. In standalone mode, this skill reads artifacts from the completed run:
- Original task file (e.g.,
prompt_*.md) — the physics specification - Progress files in
progress/<run_label>/— step-by-step records of what was done - Generated code files —
.frmodel files, MadGraph.datscripts, Python analysis scripts - Output results — scan summary files, plots, cross section tables
Output Structure
Create a reproduction/ directory with the following structure. Everything must be self-contained — no file should depend on paths outside this directory at rest (paths are configured at run time).
At runtime, run_all.sh creates a workdir/ following the standard pipeline layout:
Workflow
Step 1: Inventory the completed run (standalone mode only)
Skip this step if invoked by the orchestrator — the conversation already contains all needed context.
In standalone mode, collect artifacts from the target run identified in Run Discovery:
- Read progress files from
progress/<run_label>/: - Step 1 (Model Building):
step1_feynrules.md,.frfiles inmodels/ - Step 2 (Event Generation):
step2_madgraph.md, MadGraph scripts, output directories - Step 3 (Event Analysis):
step3_madanalysis.md(may not exist) - Step 4 (Post-Processing):
step4_postprocessing.md, plotting scripts inscripts/, event-level analysis scripts inanalysis/
Also read the original task/prompt file for context.
Step 2: Collect scripts (cp-first strategy)
Every pipeline script should be copied first. Pipeline subagents are expected to generate scripts with relative paths, so most files can be copied verbatim. After copying, verify and fix any remaining absolute paths.
Step 2a: Copy all scripts
The UFO directory (workdir/models/<Model>_UFO/) is the version that was generated and validated during the pipeline run. It must be included because agent-generated UFO models may contain fixes applied during the run that are not reproducible from the .fr file alone.
Step 2b: Verify portability — check for absolute paths
After copying, use Grep to check for any remaining absolute paths in the copied scripts:
- If no matches → all scripts are portable, proceed to Step 3.
- If matches found → Grep returns the offending lines with content. Use
Editto replace those specific lines with relative-path equivalents (e.g., usingos.path.join(SCRIPT_DIR, ...)). Do NOTReadthe full file — the Grep output provides enough context forEdit.
Files to `Write` (new) — only files that don't exist in the pipeline:
| File | Purpose | |
|---|---|---|
reproduction/scripts/generate_ufo.wl | WolframScript for local UFO generation | |
reproduction/run_all.sh | Dual-backend automation script | |
reproduction/README.md | Guide document |
Step 3: Create the automation script (run_all.sh)
Write a bash script that executes the full pipeline end-to-end with dual-backend support:
Requirements for run_all.sh:
- Dual backend: each pipeline step has an
if [ "${BACKEND}" = "magnus" ]branch selecting the correct tool - `--from-fr` flag: when specified, regenerates UFO from the
.frfile (useful if the user modifies the model). Without this flag, the script uses the pre-built UFO directory shipped inmodels/<Model>_UFO/ - Configurable via environment variables:
MG5_BIN,FR_PATH(local mode), plus Magnus credentials viamagnus login(Magnus mode) - Idempotent: each step checks whether its output already exists and skips if so
- Self-contained working directory: all intermediate outputs go into
workdir/ - Clear progress output: print section headers, backend name, and status for each step
- Error handling: use
set -eto stop on first error
Backend-specific commands per step:
Step 1 — UFO Model Setup:
By default, the script copies the pre-built UFO directory from the reproduction package into workdir/models/. This is the recommended approach because the UFO model shipped in the package has been validated during the original pipeline run and may contain fixes that are not reproducible from the .fr file alone.
With --from-fr, the script regenerates UFO from the .fr file instead:
| Mode | Default (pre-built UFO) | --from-fr | |
|---|---|---|---|
| Local | cp -r models/<Model>_UFO workdir/models/ | cd workdir && wolframscript ../scripts/generate_ufo.wl | |
| Magnus | cp -r models/<Model>_UFO workdir/models/ | magnus run validate-feynrules -- --model <fr> --lagrangian <L> then magnus run generate-ufo -- --model <fr> --lagrangian <L> --output workdir/models/<Model>_UFO |
Step 2 — Process Compilation + Event Generation:
| Local | Magnus | |
|---|---|---|
cd workdir && ${MG5_BIN} ../scripts/mg5_<label>.mg5 (scripts already contain output + launch with relative paths) | magnus run madgraph-compile -- --ufo <ufo_dir> --process "..." --output workdir/events/<process> then magnus run madgraph-launch -- --process workdir/events/<process> --commands "..." --output workdir/events/<process> |
Key syntax differences between local and Magnus for parameter setting:
| What | Local mg5_aMC syntax | Magnus --commands syntax | |
|---|---|---|---|
| Set external parameter | set <ParamName> <value> | set param_card <BLOCK> <CODE> <value> | |
| Set mass | set <MassName> <value> | set param_card MASS <PDG> <value> | |
| Set width | set <WidthName> Auto | set param_card DECAY <PDG> Auto | |
| Mass scan | set <MassName> scan:[v1,v2,...] | set param_card MASS <PDG> scan:[v1,v2,...] | |
| State machine | No explicit done needed for no-shower | First done (enter param state) + final done (start run) | |
| Systematics | On by default | Add set use_syst False to avoid LHAPDF issues |
These differences are critical — the run_all.sh must use the correct syntax for each backend.
Step 4 — Plotting:
Always runs locally via Python (same for both backends).
Step 4: Write the guide document (README.md)
The README.md must contain the following sections, written in the language matching the user's conversation (e.g., Chinese if the user speaks Chinese):
Section 1: Overview
- One paragraph summarizing the physics goal and the pipeline
- Run label: the
<run_label>this reproduction package corresponds to - A simple ASCII flow diagram showing the pipeline stages
- Table summarizing the two supported backends
Section 2: Prerequisites
- Common dependencies (Python, numpy, matplotlib) — needed for both backends
- Local mode dependencies: MadGraph5 is always required. Mathematica/wolframscript and FeynRules are only required with
--from-fr; without it, the pre-built UFO is used directly. Include verified versions. - Magnus mode dependencies (
magnus-sdkvia pip,magnus loginfor authentication) - Notes on installation paths and how to configure them
Section 3: File Inventory
- Table listing every file in the reproduction directory
- Include the
models/<Model>_UFO/directory and note it contains the pre-built UFO model from the original run - Annotate which files are backend-specific (e.g.,
scripts/generate_ufo.wl= local +--from-fronly)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/skills/reproduction-guide-generator/SKILL.md
Popularity
- Repository stars
- 65
- Repository forks
- 11
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/het-agi/collideragent/reproduction-guide-generator)