ワンクリックで
computational-experiments
Use when you need to scaffold, run, or publish computational research experiments.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when you need to scaffold, run, or publish computational research experiments.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when you need to compare a project .bib against a Paperpile project/topic folder to find uncited papers or unfiled entries.
Use when you need to extract citations from a PDF and generate a validated .bib file. Reads the PDF, identifies all referenced works, constructs BibTeX entries with metadata verification, then runs bib-validate.
Use when you need to check a LaTeX submission against a PDF assessment brief.
Use when you need to replicate a quantitative analysis in a second language (R↔Python↔Stata↔Julia) to verify correctness. Level 1 of the verification hierarchy.
Use when you need to challenge research assumptions or stress-test arguments.
Review user-facing documentation for accuracy, consistency, and completeness across private, public, nested repos, and the user manual. Use when docs feel stale, after major changes, or before sharing. (Replaces `repo-doc-audit`)
| name | computational-experiments |
| description | Use when you need to scaffold, run, or publish computational research experiments. |
| allowed-tools | Bash(uv*, pytest*, mkdir*, ls*, cp*), Read, Write, Edit, Glob, Grep, AskUserQuestion, Skill |
| argument-hint | [project-path] [--mode scaffold|experiment|figures|full] [--budget <minutes>] [--scaffold standard|robustness|replication] |
| agent-dependencies | ["code-review"] |
| skill-dependencies | ["multi-perspective"] |
Lifecycle skill for algorithmic research projects where the code IS the scientific contribution.
| Mode | What it does | Phases |
|---|---|---|
| Scaffold | Create/audit package structure + algorithm skeleton | 1–2 |
| Experiment | Design and run pre-specified sweep campaigns | 1, 3–4 |
| Explore | Adaptive experiment loop: modify → run → evaluate → keep/discard | 1, 3E–4 |
| Autonomous | Parallel self-correcting sweep with sub-agents | 1, 3A–4 |
| Figures | Generate publication output from results | 1, 4 |
| Full | Complete pipeline | 1–5 |
Default: Full. Detect mode from user request or ask if ambiguous.
--scaffold FlagSets a stage progression template for the experiment campaign. Templates provide structured checklists and exit criteria for each stage.
| Scaffold | Stages | Best for |
|---|---|---|
standard | Init → Tune → Creative → Ablate | Algorithm development, ML, simulation |
robustness | Main spec → Alternatives → Placebo → Sensitivity | Causal inference, econometrics |
replication | Exact → Our data → Extensions → Robustness | Replicate-and-extend papers |
Templates live in templates/experiments/. When a scaffold is active:
Default (no flag): user-defined stages (current behavior). Scaffold is a guide, not a cage — users can skip stages or reorder with explicit acknowledgment.
--budget FlagSets a campaign-level time budget in minutes for the entire experiment run. When set:
| Mode | How budget applies |
|---|---|
| Experiment | Skip remaining sweep configs when time is up |
| Explore | Exit the explore loop at the next iteration boundary |
| Autonomous | Do not spawn new agent batches; let running batches finish |
| Figures | Budget does not apply (figure generation is fast) |
Reporting: When a budget triggers early stop, append to the breadcrumb:
- **Budget:** Stopped after <N>/<M> configs (budget: <X> min, elapsed: <Y> min)
Default: No budget (run all configs to completion). Typical values: --budget 30 for quick exploration, --budget 120 for overnight sweeps.
Use Experiment when the design space is known upfront (grid/random sweep). Use Explore when the design space is unknown and the agent should adaptively search (inspired by Karpathy's autoresearch).
data-analysisexperiment-designcausal-designlatexCLAUDE.md, MEMORY.md, .context/project-recap.md if they existsrc/, experiments/, tests/, pyproject.toml, setup.py[LEARN:code] tags, notation registry, key decisions — apply established conventionsRead references/package-scaffold.md if scaffold mode is active.
Skip if: Package structure already exists and user requested experiment/figures mode.
src/<pkg>/, tests/, experiments/configs/, scripts/pyproject.toml with hatchling, dev dependencies (pytest, matplotlib, numpy)Algorithm, Experiment, Metric) with # TODO: markers. For multi-agent projects, use BaseAgent, Environment, MultiAgentSimulation instead — see references/multi-agent-patterns.mdresults/, *.pkl, wandb/, __pycache__/Read references/algorithm-templates.md for skeleton code. Read references/package-scaffold.md for directory layout.
Gate: Verify package installs with uv pip install -e ".[dev]" before proceeding.
Prerequisite: Working package (Phase 2 or pre-existing).
references/experiment-patterns.md)np.random.default_rng(seed) everywhere. Seeds passed through config, never global state.n_seeds repetitions, saves per-seed results.concurrent.futures.ProcessPoolExecutor for independent seeds/configs. For large sweeps (10+ configs × 10+ seeds, GPU-bound, or >30-min runs): move to [HPC cluster] HPC — see docs/guides/hpc.md in Task Management and copy templates/slurm/{array,gpu}.sbatch into hpc/ with sync-up.sh / sync-down.sh. Recent reference implementations: Projects/NLP/{example-project-a,benchmark-gaming-llm-safety}/hpc/.references/experiment-patterns.md)For multi-agent simulations, also include:
See references/multi-agent-patterns.md for all multi-agent patterns.
Read references/experiment-patterns.md for config, sweep, and runner patterns.
Gate: Run a smoke test — single config, single seed, verify output files are created.
Use instead of Phase 3 when: The design space is unknown, the user wants to adaptively search rather than run a pre-specified sweep, or the user says "explore", "try things", "see what works".
Read references/explore-loop.md for the full protocol. Summary:
experiments/<tag> branch (e.g. experiments/mar14-collusion-params)results.tsvgit commit the changetimeout <budget>s uv run python <script> > run.log 2>&1results.tsv: commit hash, metric, status (keep/discard/crash), descriptiongit reset --hard HEAD~1)--budget time exhausted (campaign-level), per-run timeout exceeded, or N consecutive discards with no progressKey principles:
Gate: results.tsv exists with at least a baseline entry before entering the loop.
Use instead of Phase 3 when: 10+ configs, known failure-prone experiments, or user says "autonomous", "hands-off", "self-correcting sweep".
Read references/autonomous-sweep.md for the full protocol. Summary:
Key constraints:
Graceful degradation: If some batches fail while others succeed, collect all successful results and report failures. Only stop entirely if ALL batches fail. See shared/skill-design-patterns.md (Graceful Degradation section).
Gate: At least one config must succeed. If all fail, report the unresolved errors and stop.
Breadcrumb: After any Phase 3 variant completes, append to .planning/state.md (if exists) or .context/current-focus.md:
### [computational-experiments] Experiments complete [YYYY-MM-DD HH:MM]
- **Done:** [N configs run, N seeds, mode: experiment/explore/autonomous]
- **Outputs:** [result files at <path>, N successful / N total]
- **Next:** Publication output (figures/tables)
Prerequisite: Result files exist in results/ or experiments/results/.
.tex via \input{} — never hard-code resultsscripts/make_all_figures.py that regenerates all figures from saved resultsRead references/figure-recipes.md for matplotlib recipes.
Output routing:
paper/figures/ as PDF (per overleaf-separation rule)paper/tables/ as .tex (per no-hardcoded-results rule)scripts/ (never inside paper/)pyproject.toml or uv.lock?code-review agent on all generated scripts (via skill-routing mechanism)[LEARN:code] tags for project-specific conventions discoveredlatex, additional experiments, replication-packageBreadcrumb: After Phase 5 completes, append to .planning/state.md (if exists) or .context/current-focus.md:
### [computational-experiments] Phase 5 complete [YYYY-MM-DD HH:MM]
- **Done:** [reproducibility check, code review score, N learn tags recorded]
- **Outputs:** [figures at <path>, tables at <path>]
- **Next:** [suggested next steps]
This skill improves with each invocation on a project:
MEMORY.md for existing [LEARN:code] entries and Key Decisions[LEARN:code] tags and update Key Decisions tableExamples of learnings to capture:
[LEARN:code] This project uses ElicitationConfig dataclass, not YAML files[LEARN:code] Metrics are in src/utils/metrics.py, not a separate package[LEARN:code] Seeds are managed via utils/seeds.py with MASTER_SEED + offset| Resource | When read |
|---|---|
references/package-scaffold.md | Phase 2 (project structure) |
references/algorithm-templates.md | Phase 2 (skeleton code) |
references/experiment-patterns.md | Phase 3 (configs, sweeps, runners, config hashing, dual output) |
references/multi-agent-patterns.md | Phase 2–3 (agent composition, messaging, multi-level metrics) |
references/multi-agent-infrastructure.md | Phase 2–3 (feature toggles, config hashing, simulation runner, visualization) |
references/explore-loop.md | Phase 3E (adaptive explore loop) |
references/autonomous-sweep.md | Phase 3A (parallel self-correcting sweep) |
references/figure-recipes.md | Phase 4 (matplotlib recipes) |
shared/publication-output.md | Phase 4 (table/figure format standards) |
shared/multi-language-conventions.md | Phase 1 (if non-Python) |
docs/guides/hpc.md (Task Management) | Phase 3 (move to Avon for large/GPU/long sweeps) |
templates/slurm/*.sbatch (Task Management) | Phase 3 (drop-in SLURM templates; all log git-SHA to OUT_DIR) |
no-hardcoded-results rule | Phase 4 (output routing) |
overleaf-separation rule | Phase 4 (file placement) |
the code-review agent | Phase 5 (auto-invoked) |
data-analysis skill | Redirect if task is empirical, not computational |
replication-package skill | Phase 5 (suggested next step) |
cross-language-check skill | Phase 5 (suggested next step for verification) |
references/multi-analyst-design.md | Phase 3–5 (many-analysts robustness diagnostic) |
shared/worker-critic-protocol.md | Phase 3–4 (inline review of generated code/results) |
shared/checkpoint-resumability.md | All phases (save/resume on crash) |
templates/experiments/standard.md | --scaffold standard (init/tune/creative/ablate) |
templates/experiments/robustness.md | --scaffold robustness (econometrics robustness) |
templates/experiments/replication.md | --scaffold replication (replicate-and-extend) |
figure-feedback skill | Phase 4 (VLM analysis of generated plots) |