ai4scientist/nano-scientist/experiment-bridge
Claude Code and agent skill by ai4scientist/nano-scientist
- community
Checking that the SKILL.md file is still in the repository.
Workflow 1.5: Bridge between idea discovery and auto review. Reads EXPERIMENT_PLAN.md, implements experiment code, deploys to GPU, collects initial results. Use when user says \"实现实验\", \"implement experiments\", \"bridge\", \"从计划到跑实验\", \"deploy the plan\", or has an experiment plan ready to execute.
Install
npx vskill@latest install ai4scientist/nano-scientist/experiment-bridgeSKILL.md
Workflow 1.5: Experiment Bridge
Implement and deploy experiments from plan: $ARGUMENTS
Overview
This skill bridges Workflow 1 (idea discovery + method refinement) and Workflow 2 (auto review loop). It takes the experiment plan and turns it into running experiments with initial results.
Constants
- CODE_REVIEW = true — GPT-5.4 xhigh reviews experiment code before deployment. Catches logic bugs before wasting GPU hours. Set
falseto skip. - AUTO_DEPLOY = true — Automatically deploy experiments after implementation + review. Set
falseto manually inspect code before deploying. - SANITY_FIRST = true — Run the sanity-stage experiment first (smallest, fastest) before launching the rest. Catches setup bugs early.
- MAX_PARALLEL_RUNS = 4 — Maximum number of experiments to deploy in parallel (limited by available GPUs).
- BASE_REPO = false — GitHub repo URL to use as base codebase. When set, clone the repo first and implement experiments on top of it. When
false(default), write code from scratch or reuse existing project files. - COMPACT = false — When
true, (1) readidea-stage/IDEA_CANDIDATES.mdinstead of fullidea-stage/IDEA_REPORT.mdif available, (2) append experiment results toEXPERIMENT_LOG.mdafter collection.
Override:/experiment-bridge "EXPERIMENT_PLAN.md" — compact: true, base repo: https://github.com/org/project
Inputs
This skill expects one or more of:
- `refine-logs/EXPERIMENT_PLAN.md` (best) — claim-driven experiment roadmap from
/experiment-plan - `refine-logs/EXPERIMENT_TRACKER.md` — run-by-run execution table
- `refine-logs/FINAL_PROPOSAL.md` — method description for implementation context
- `idea-stage/IDEA_CANDIDATES.md` — compact idea summary (preferred when
COMPACT: true) (fall back to `./IDEA_CANDIDATES.md` if not found) - `idea-stage/IDEA_REPORT.md` — full brainstorm output (fall back to `./IDEA_REPORT.md` if not found)
If none exist, ask the user what experiments to implement.
Workflow
Phase 1: Parse the Experiment Plan
Read EXPERIMENT_PLAN.md and extract:
- Run order and milestones — which experiments run first (sanity → baseline → main → ablation → polish)
- For each experiment block:
- Dataset / split / task
- Compared systems and variants
- Metrics to compute
- Setup details (backbone, hyperparameters, seeds)
- Success criterion
- Priority (MUST-RUN vs NICE-TO-HAVE)
- Compute budget — total estimated GPU-hours
- Method details from
FINAL_PROPOSAL.md— what exactly to implement
Present a brief summary:
Phase 2: Implement Experiment Code
If `BASE_REPO` is set — clone the repo first:
For each milestone (in order), write the experiment scripts:
- Check existing code — scan the project (or cloned
base_repo/) for existing experiment scripts, model code, data loaders. Reuse as much as possible.
- Implement missing pieces:
- Training scripts with proper argparse (all hyperparameters configurable)
- Evaluation scripts computing the specified metrics
- Data loading / preprocessing if needed
- Baseline implementations if not already present
- Fixed random seeds for reproducibility
- Results saved to JSON/CSV for later analysis
- Proper logging (wandb if configured in CLAUDE.md)
- Follow the plan's run order — implement sanity-stage experiments first, then baselines, then main method, then ablations.
- Self-review before deploying:
- Are all hyperparameters from EXPERIMENT_PLAN.md reflected in argparse?
- Is the random seed fixed and controllable?
- Are results saved in a parseable format (JSON/CSV)?
- Does the code match FINAL_PROPOSAL.md's method description?
Phase 2.5: Cross-Model Code Review (when CODE_REVIEW = true)
Skip this step if `CODE_REVIEW` is `false`.
Before deploying, send the experiment code to GPT-5.4 xhigh for review:
On review results:
- No CRITICAL issues → proceed to Phase 3
- CRITICAL issues found → fix them, then re-submit for review (max 2 rounds)
- Codex MCP unavailable → skip silently, proceed to Phase 3 (graceful degradation)
Phase 3: Sanity Check (if SANITY_FIRST = true)
Before deploying the full experiment suite, run the sanity-stage experiment:
Wait for completion. Verify:
- Training loop runs without errors
- Metrics are computed and saved correctly
- GPU memory usage is within bounds
- Output format matches expectations
If sanity fails → auto-debug before giving up (max 3 attempts):
- Read the error — parse traceback, stderr, and log files
- Diagnose — classify the failure:
- OOM → reduce batch size or enable gradient checkpointing
- ImportError → install missing package
- FileNotFoundError → fix path or download data
- CUDA error → check GPU availability, reduce model size
- NaN/divergence → reduce learning rate, check data preprocessing
- Fix and re-run — apply the fix, re-run sanity
- Attempt 2+ still failing? → Call in Codex rescue (if Codex plugin installed):
Before the next retry, invoke /codex:rescue to get a second opinion on the root cause. Codex independently reads the code and error logs — it may spot issues Claude missed (wrong tensor shapes, subtle import shadowing, config mismatches, etc.). Apply its suggested fix, then re-run.
- If
/codex:rescueis not available (plugin not installed), continue with Claude's own diagnosis
- Still failing after 3 attempts? → stop, report the failure with all attempted fixes and error logs. Do not proceed with broken code.
Never give up on the first failure. Most experiment crashes are fixable without human intervention.
Phase 4: Deploy Full Experiments
Deploy experiments following the plan's milestone order. Route by job count:
Small batch (≤5 jobs per milestone) → use /run-experiment directly:
Large batch (≥10 jobs, multi-seed sweeps, or phase dependencies) → use /experiment-queue for proper orchestration:
Auto-routing rule: if any milestone in EXPERIMENT_PLAN.md declares ≥10 jobs (e.g., seeds: [42, 200, 201, ...] × N: [64, 128, 256] × n: [50K, 150K, 500K, 652K] = 36 jobs) or declares teacher→student phase dependencies, route that milestone to /experiment-queue. Otherwise use /run-experiment.
/experiment-queue adds: OOM-aware retry with backoff, stale-screen cleanup, wave-transition race prevention, phase dependency enforcement, crash-safe state persistence in queue_state.json. See skills/experiment-queue/SKILL.md for the manifest YAML format.
For each milestone:
- Deploy experiments in parallel (up to MAX_PARALLEL_RUNS for
/run-experiment, ormax_parallelfrom manifest for/experiment-queue) - Use
/monitor-experimentto track progress (reads from queue_state.json if/experiment-queueis active) - Collect results as experiments complete
🚦 Checkpoint (if AUTO_DEPLOY = false):
Phase 5: Collect Initial Results
As experiments complete:
- Parse output files (JSON/CSV/logs) for key metrics
- Training quality check — if W&B data is available (CLAUDE.md has
wandb: trueandwandb_project), invoke/training-checkto detect NaN, loss divergence, plateaus, or overfitting. If W&B is not configured, skip silently. - Update `refine-logs/EXPERIMENT_TRACKER.md` — fill in Status and Notes columns
- Check success criteria from EXPERIMENT_PLAN.md — did each experiment meet its bar?
- Write initial results summary:
Phase 5.5: Write Compact Log (when COMPACT = true)
Skip entirely if `COMPACT` is `false`.
Append each completed experiment to EXPERIMENT_LOG.md:
This structured log survives session recovery — downstream skills read it instead of parsing screen output.
Phase 5.6: Auto Ablation Planning
After main experiments (M2) complete with positive results, invoke /ablation-planner to design ablation studies:
- Read the main results and method description
- Generate a claim-driven ablation plan: which components to remove, what to compare, expected outcomes
- Append ablation blocks to
refine-logs/EXPERIMENT_PLAN.mdandrefine-logs/EXPERIMENT_TRACKER.md - If main results are negative or inconclusive, skip ablation planning and note in the summary
If /ablation-planner is not available, skip silently — the existing EXPERIMENT_PLAN.md ablation blocks (if any) remain unchanged.
Phase 6: Handoff
Present final status:
Output Protocols
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 repositoryCheckingskills/experiment-bridge/SKILL.md
Popularity
- Repository stars
- 121
- Repository forks
- 20
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 Aug 2026, 2 months ago.
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/ai4scientist/nano-scientist/experiment-bridge)