flonat/flonat-research/computational-experiments
Claude Code and agent skill by flonat/flonat-research
- community
Checking that the SKILL.md file is still in the repository.
Scaffold, execute, analyse, and publish computational research experiments through a reproducible staged workflow. Use when a research question requires simulations or computational sweeps rather than a one-off script.
Install
npx vskill@latest install flonat/flonat-research/computational-experimentsSKILL.md
Computational Experiments
Lifecycle skill for algorithmic research projects where the code IS the scientific contribution.
Modes
| 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 Flag
Sets 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:
- Present the current stage's checklist before starting work
- Gate progression: don't move to the next stage until exit criteria are met
- Log stage transitions in the experiment breadcrumb
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 Flag
Sets a campaign-level time budget in minutes for the entire experiment run. When set:
- Record start time at the beginning of Phase 3 (any variant)
- Check remaining budget before launching each new config, sweep batch, or explore iteration
- Soft stop when budget is exhausted: finish the current run, save all results collected so far, skip remaining configs
- Never hard-kill a running experiment mid-execution — always let the current run complete
| 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:
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).
When to Use
- "Set up experiments for my algorithm" / "Scaffold the project"
- "Run the benchmark" / "Design the sweep"
- "Explore what auction parameters reduce collusion" / "Try different architectures"
- "Generate convergence plots" / "Make publication figures from results"
- Any project where algorithms, simulations, or optimisation loops are the contribution
When NOT to Use
- Empirical data analysis (observational/survey data) →
data-analysis - Experimental design for human subjects →
experiment-design - Causal inference strategy →
causal-design - LaTeX compilation →
latex
Workflow
Phase 1: Detect & Configure
- Read project context:
CLAUDE.md,MEMORY.md,.context/project-recap.mdif they exist - Detect structure: Scan for
src/,experiments/,tests/,pyproject.toml,setup.py - Detect language: Check existing files. Default: Python with uv. Ask if ambiguous.
- Read MEMORY.md: Look for
[LEARN:code]tags, notation registry, key decisions — apply established conventions - Determine mode: From user request or ask. If existing package exists, skip scaffold.
- Inventory existing code: Map modules, entry points, config objects, result files
Read references/package-scaffold.md if scaffold mode is active.
Phase 2: Scaffold
Skip if: Package structure already exists and user requested experiment/figures mode.
- Package structure: Create
src/<pkg>/,tests/,experiments/configs/,scripts/ - Build config:
pyproject.tomlwith hatchling, dev dependencies (pytest, matplotlib, numpy) - Algorithm skeleton: Base classes (
Algorithm,Experiment,Metric) with# TODO:markers. For multi-agent projects, useBaseAgent,Environment,MultiAgentSimulationinstead — seereferences/multi-agent-patterns.md - Test skeleton: Unit test stubs, convergence test template, smoke test
- Experiment infrastructure: Config dataclass template, runner script template
- Gitignore: Add
results/,*.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.
Phase 3: Experiment Design
Prerequisite: Working package (Phase 2 or pre-existing).
- Config schema: Python dataclass with validation, defaults, serialization to/from YAML
- Config hashing: SHA-256 fingerprint for reproducibility tracking (see
references/experiment-patterns.md) - Sweep definitions: Grid sweep (all combinations), random sweep (budget-limited), manual configs
- Seed management:
np.random.default_rng(seed)everywhere. Seeds passed through config, never global state. - Runner script: Config → initialize → loop → collect → save. Reads config, runs
n_seedsrepetitions, saves per-seed results. - Baseline implementations: Same interface as main algorithm, registered in config
- Result aggregation: Per-seed CSV → aggregated stats (mean ± std). Canonical column naming.
- Parallelization:
concurrent.futures.ProcessPoolExecutorfor independent seeds/configs. For large sweeps (10+ configs × 10+ seeds, GPU-bound, or >30-min runs): move to [HPC cluster] HPC — seedocs/guides/hpc.mdin Task Management and copytemplates/slurm/{array,gpu}.sbatchintohpc/withsync-up.sh/sync-down.sh. Recent reference implementations:Projects/NLP/{example-project-a,example-project-b}/hpc/. - Checkpointing: Save intermediate results to allow resume on crash
- Dual output: Dated archive + "latest" symlink for quick access (see
references/experiment-patterns.md)
For multi-agent simulations, also include:
- Agent composition: Heterogeneous population specs with distribution presets (uniform, weighted, custom)
- Feature toggles: Opt-in capabilities per agent type (memory, messaging) — enables ablation studies
- Messaging service: Round-based broadcast channel for inter-agent communication
- Multi-level metrics: Agent-level (individual performance) + system-level (aggregate outcomes) + emergent-level (herding, convergence)
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.
Phase 3E: Explore Loop (Adaptive Experiments)
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:
- Branch: Create
experiments/<tag>branch (e.g.experiments/mar14-collusion-params) - Baseline: Run the code as-is, record baseline metric in
results.tsv - Loop (autonomous until interrupted or budget exhausted):
- Propose a modification based on results so far (informed by prior keep/discard outcomes)
- Apply the change to the target file(s)
git committhe change- Run with time budget:
timeout <budget>s uv run python <script> > run.log 2>&1 - Extract metric from output
- Log to
results.tsv: commit hash, metric, status (keep/discard/crash), description - If improved → keep (advance branch)
- If not improved → discard (
git reset --hard HEAD~1) - If crashed → attempt fix once, else discard and move on
- Stop when: user interrupts,
--budgettime exhausted (campaign-level), per-run timeout exceeded, or N consecutive discards with no progress
Key principles:
- One change per iteration — never stack multiple untested changes
- Log every attempt, including discards and crashes
- The TSV is the ground truth — it captures the full exploration history
- Simplicity criterion: prefer changes that simplify the code for equal or better metrics
Gate: results.tsv exists with at least a baseline entry before entering the loop.
Phase 3A: Autonomous Sweep (Parallel Self-Correcting)
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:
- Batch configs into groups of max 4 parallel agents
- Spawn sub-agents — each runs its batch, detects failures by signature (shape mismatch, NaN, empty array, timeout), diagnoses, fixes, retries (max 3 cycles)
- Aggregate results — coordinator collects batch results, reports success/fixed/unresolved counts
- Generate figures for all successful configs
Key constraints:
- Max 4 parallel agents
- Max 3 retry cycles per config
- Agents must not modify shared code simultaneously
- Each fix is committed for traceability
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:
Phase 4: Publication Output
Prerequisite: Result files exist in results/ or experiments/results/.
- Convergence plots: Metric vs iteration/budget (mean ± std across seeds, multiple methods)
- Comparison charts: Bar chart or table comparing methods across problems
- Ablation plots: Performance with/without each component (for multi-agent: use feature toggle ablation configs)
- Sensitivity analysis: Metric vs parameter (line plot with shaded confidence band)
- Tables: Performance tables exported as
.texvia\input{}— never hard-code results - Figure script:
scripts/make_all_figures.pythat regenerates all figures from saved results
Read references/figure-recipes.md for matplotlib recipes.
Output routing:
- Figures →
paper/figures/as PDF (peroverleaf-separationrule) - Tables →
paper/tables/as.tex(perno-hardcoded-resultsrule) - Figure scripts →
scripts/(never insidepaper/)
Phase 5: Audit & Save
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/computational-experiments/SKILL.md
Popularity
- Repository stars
- 144
- Repository forks
- 27
- 7-day trend score
- 25
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/flonat/flonat-research/computational-experiments)