一键导入
experiments
Plan, revise, execute, and report Synapse experiments, including compute access and result submission.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Plan, revise, execute, and report Synapse experiments, including compute access and result submission.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Work on Synapse pre-experiment research: project context, research questions, literature search, related works, and deep research reports.
Write and update Synapse documents, reports, synthesis, and Markdown figures. Use when embedding charts, plots, images, or report visuals in Synapse documents.
Understand the Synapse Claude Code plugin hooks, session lifecycle, and multi-agent parallel execution. Covers what each hook does, where plugin state lives, and how to run multiple experiments in parallel via Task sub-agents.
Synapse platform overview and router skill. Use it to orient on projects and then hand off to the stage-specific Synapse skills.
Drive the Claude Code-client autonomous research loop — analyze project state, propose the next experiment, dispatch sub-agents to execute it, and iterate.
Configure Synapse MCP access for Claude Code with project-level .mcp.json and verify the connection.
| name | experiments |
| description | Plan, revise, execute, and report Synapse experiments, including compute access and result submission. |
| license | AGPL-3.0 |
| metadata | {"author":"Vincentwei1021","version":"0.6.1","category":"research","mcp_server":"synapse"} |
Use this skill for the experiment stage: drafting plans, revising returned experiments, running approved work, using compute, and submitting results.
Stay inside this skill when the work is about:
draft, pending_review, pending_start, in_progress, or completed experimentsHand off to:
chart blocks, and Synapse-hosted image uploadsIf synapse_get_assigned_experiments returns empty, do not idle. Ask the user which path:
pending_start experiments in the project with synapse_get_project_full_context and ask which to start.synapse_get_project_full_context, then draft a plan with synapse_create_experiment (defaults to draft; run a self-review sub-agent before pushing to pending_review per the "Create → Self-Review → Pending Review → Verbal Approve" section below).Every agent-created experiment goes through this sequence before reaching pending_review.
synapse_create_experiment(...) — defaults to draft. The PostToolUse hook will remind you to run self-review next.Task tool. Use a prompt similar to:
Self-review experiment <experimentUuid> for project <projectUuid>.
Call synapse_get_experiment to read the plan. Then evaluate against the project's evaluationMethods:
- Is the objective specific and measurable?
- Is the methodology sound and reproducible?
- Do the success criteria align with the project's evaluation methods?
- Is the compute budget realistic given current availability (synapse_list_compute_nodes)?
Return a short verdict: "pass" or a bulleted list of concrete revisions.
Do NOT write back to Synapse — your verdict is consumed in-session by the main agent.
synapse_update_experiment_plan({ experimentUuid, ... }).synapse_update_experiment_status({ experimentUuid, status: "pending_review" }) to push the draft into review.synapse_review_experiment({
experimentUuid,
decision: "approved",
reviewNote: 'User verbally approved in terminal: "<exact words>"',
})
That call atomically transitions to pending_start, writes the activity, and emits task_assigned so execution can begin.reviewNote:
synapse_review_experiment({
experimentUuid,
decision: "rejected",
reviewNote: '用户口头要求修改:…(原话:"…")',
})
The review tool writes the comment and emits experiment_revision_requested automatically — do not also call synapse_add_comment.draft. Revise per feedback, run self-review again, then resubmit to pending_review.autonomy skill, lives only in the current CC session): after step 4, skip steps 5–8 and immediately call synapse_review_experiment with the fixed full-auto template:
reviewNote: 'Full-auto session authorized by <ownerName> at <ISO time>. Self-review pass: <key points>.'
If self-review timed out or errored: 'Self-review skipped: <reason>.'. Full-auto never pauses on advisory self-review output — it only exits on user-stop or hard external errors.The synapse_review_experiment tool requires admin or pi_agent role. To run verbal-approve flows on Claude Code, configure the CC agent with one of those roles.
If the project has no completed experiments yet, the first experiment is not a normal research run — it is the project's baseline infrastructure. Drive it through three bundled deliverables before any comparison work:
synapse_get_repo_access).synapse_submit_experiment_results, so subsequent experiments have something to beat.If the project has a repo, commit all three onto the base branch (or a per-experiment branch merged back). Every subsequent experiment branches from that base so it inherits prep + eval automatically.
synapse_checkin() — refresh identity and assignmentssynapse_create_experiment(...) (defaults to draft; run a self-review sub-agent and revise before pushing to pending_review per the section below)synapse_get_assigned_experiments() then synapse_get_experiment({ experimentUuid })synapse_update_experiment_status({ status: "draft", liveStatus: "writing" }) + synapse_update_experiment_plan(...), then synapse_update_experiment_status({ status: "pending_review" })synapse_search_incident_lessons({ researchProjectUuid, query? }) for relevant prior failures/recoveries, then synapse_list_compute_nodes({ onlyAvailable: true, researchProjectUuid })synapse_reserve_gpus(...) or inline via synapse_start_experiment({ gpuUuids })synapse_start_experiment({ experimentUuid, sessionUuid?, workingNotes }) — moves to in_progress; sub-agents should pass the auto-injected sessionUuidsynapse_get_node_access_bundle({ experimentUuid, nodeUuid }), write the returned privateKeyPemBase64 to a local PEM, chmod 600, SSH with the returned host/user/portsynapse_get_repo_access → clone → branch from the experiment's base branch (commit + push back to this repo at the end is mandatory)tmux/screen) with unbuffered output (python -u … or PYTHONUNBUFFERED=1) so logs never stall a tool callsynapse_report_experiment_progress at milestones — phase ∈ setup | training | evaluation | analysis; liveStatus ∈ checking_resources | queuing | runningsynapse_record_experiment_incident_lesson({ status: "resolved_in_run", ... }) after the fix. Use progress logs for the live narrative; use incident lessons for root cause, resolution, and prevention.CronCreate so the experiment card never looks dead. See "Monitoring Long Runs With CronCreate" below for the exact pattern.synapse_submit_experiment_results({ experimentUuid, sessionUuid?, outcome, experimentResults, experimentBranch, commitSha }) — outcome ∈ success | failure | inconclusive; sub-agents should pass sessionUuid so Synapse checks the session outfailure or inconclusive, call synapse_record_experiment_incident_lesson({ status: "caused_failure" | "unresolved", ... }) unless there is truly no reusable lesson; in that case state that explicitly in the report.synapse_submit_experiment_results with synapse_save_experiment_report({ experimentUuid, title, content }) — write a full markdown writeup (objective, methodology, results, analysis, charts where relevant). For generated plots, use documents and upload each figure with synapse_upload_document_image({ experimentUuid, filename, mimeType, base64Content }) before embedding the returned /api/documents/.../images/... URL. Do not post the report as a comment, and do not treat this step as optional even for failure / inconclusive runssynapse_get_comments({ targetType: "experiment", targetUuid }) before editing the plansynapse_get_repo_access returns a configured repo, all experiment code, configs, and meaningful artifacts must be committed and pushed to that repo (on the experiment branch or merged to base), and the resulting branch + commitSha must be passed to synapse_submit_experiment_results. Local-only runs without a commit are not acceptable when a repo exists.synapse_submit_experiment_results call must be immediately followed by synapse_save_experiment_report({ experimentUuid, title, content }) with a full markdown writeup. This applies to success, failure, and inconclusive outcomes alike.synapse_update_experiment_plan for plan edits, synapse_report_experiment_progress for live status, synapse_submit_experiment_results for completion, and synapse_save_experiment_report for the dedicated report. Do not substitute with comments.synapse_report_experiment_progress for what is happening now. Use synapse_record_experiment_incident_lesson when the root cause / resolution / prevention would help a future agent.draft, revise, then move it back to pending_review; leave a reply via synapse_add_comment using @[name](actorType:uuid) format to notify the reviewer.outcome: "failure" (or "inconclusive"), write up what happened in experimentResults and the report, and record an incident lesson when there is reusable execution knowledge.For any experiment that you expect to run longer than ~30 minutes, the main agent must set up its own heartbeat with Claude Code's built-in CronCreate tool so the experiment card stays current and the user (or the autonomous loop) sees regress / completion as soon as it happens. Do not ask the user to run /loop and do not install a remote cron job — the main agent owns this.
Schedule the monitor immediately after synapse_start_experiment returns successfully, before you SSH into the node or hand off to the workload. That way the card is being touched even while the workload is still warming up.
CronCreate is a deferred Claude Code tool. If its schema is not loaded yet, run ToolSearch with select:CronCreate,CronDelete once before scheduling.
CronCreate({
cron: "<every-N-minutes expression>",
prompt: "Check Synapse experiment <experimentUuid>: read synapse_get_experiment, parse the latest tmux/log output on the remote node, and call synapse_report_experiment_progress with phase + liveStatus + a one-line message describing the latest metric. If the experiment has completed, call CronDelete on this job.",
recurring: true,
durable: true,
})
Capture the returned job id — you will need it for CronDelete when the experiment finishes.
cron: "*/10 * * * *"). This matches the /loop default and is the right starting point for almost every experiment.CronDelete the 10-minute job and CronCreate a 30-minute job (cron: "*/30 * * * *" — or pick "7,37 * * * *" etc to avoid the :00 / :30 fleet-wide convoy).:00 and :30 exact minutes unless something else demands them. The CronCreate schema documents that the global Claude fleet stampedes those marks; pick odd offsets (*/10 is fine because of the natural distribution; 0 */1 * * * for hourly is not — use 7 */1 * * *).durable: trueSet durable: true always. Long experiments routinely outlive a single CC session (user closes laptop overnight, CC restarts, etc.). With durable: true, the cron job persists to .claude/scheduled_tasks.json and resumes automatically — missed fires are caught up after restart, so the card never goes stale just because CC was offline.
The recurring: true 7-day auto-expiry is fine: very few experiments run longer than a week. If one does, the heartbeat firing one last time and self-deleting is a safe failure mode.
When the cron fires, CC enqueues your prompt as a fresh user turn. The agent should:
synapse_get_experiment({ experimentUuid }) — read current state.status is completed (success / failure / inconclusive), call CronDelete({ id: <jobId> }) and exit. Do not keep heartbeating after completion.synapse_report_experiment_progress update: latest metric, current phase, liveStatus: "running". If progress has stalled (same metric for 3+ heartbeats), surface that to the user.CronDelete(oldId) then CronCreate(...) with the new cadence and the new id.After synapse_submit_experiment_results, the post-submit hook reminds you to call synapse_save_experiment_report. At the same time, call CronDelete({ id: <heartbeatJobId> }) to stop the heartbeat. Forgetting this is the easiest mistake — the experiment is completed but a stale heartbeat keeps re-checking it for up to 7 days. Track the job id in your todo list right after CronCreate so you don't lose it.
/loop or remote cron/loop is the user-facing command that wraps CronCreate. The main agent should call CronCreate directly — never push the user to type /loop themselves.When the user wants to execute several pending_start experiments at the same time, the main agent should monitor and dispatch rather than run workloads itself. Spawn one Task-tool sub-agent per experiment UUID — the plugin's SubagentStart hook auto-creates a Synapse session and injects the full execution workflow. To track progress without blocking on any one sub-agent, schedule a single CronCreate heartbeat that reads synapse_get_assigned_experiments({ statuses: ["in_progress", "completed"] }) and reports state changes — see "Monitoring Long Runs With CronCreate" above for the pattern. See sessions for the full sub-agent pattern.