/magi-researchers:research-implementfrom magi-researchers
Implements research code from a research plan. Reads `research_plan.md`, detects language/ecosystem, and generates implementation files.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /magi-researchers:research-implement still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Implements research code based on an existing research plan. Requires a research_plan.md to be present in the active research output directory.
/research-implement [path/to/research_plan.md]
$ARGUMENTS — Optional path to the research plan. If not provided, searches for the most recent outputs/*/plan/research_plan.md.Shared rules: Read
${CLAUDE_PLUGIN_ROOT}/shared/rules.mdbefore starting. §MCP, §Claude-Only apply to this skill. Inline fallback (if shared rules unavailable): Gemini models: gemini-3.1-pro-preview → gemini-2.5-pro → Claude. Codex: gpt-5.4. Use@filepathfor MCP file refs; subagents useReadtool.
See §Claude-Only in shared rules.
See §MCP in shared rules. Additionally:
$ARGUMENTS, use it directly.outputs/*/plan/research_plan.md/magi-researchers:research-brainstorm first, or creating a plan manually.plan/)languages/ecosystem fields)$ARGUMENTS: If invoked standalone (not from the /research pipeline), check $ARGUMENTS for --claude-only and --substitute flags. When present, all Gemini/Codex MCP calls in this skill are replaced per the Claude-Only Mode rules above..workspace.json exists at the output directory root, read output_dir from it and use as the base for all file operations. If absent (standalone invocation), derive the absolute output path from the location of research_plan.md.Check if src/ already has code (Glob src/**/*):
src/ is empty or absent, proceed with initialization.Determine language and ecosystem using the following priority:
| Priority | Source | How |
|---|---|---|
| 1st | Existing src/ files | Detect package managers (Cargo.toml, pyproject.toml, Project.toml, DESCRIPTION) and dominant file extensions |
| 2nd | research_plan.md frontmatter | Read languages and ecosystem fields |
| 3rd | Domain + topic inference | Autonomous selection based on research domain and algorithms |
If 1st and 2nd conflict (e.g., plan says Python but src/ has Rust code), the actual files win.
Announce the discrepancy and proceed with the detected ecosystem.
Initialize the ecosystem (only if src/ is empty):
uv init (if no pyproject.toml exists) or uv add {deps}src/ already exists (pre-created by the pipeline), run cargo init in the output directory root (not inside src/) to avoid double-nesting (src/src/). The resulting src/main.rs is the correct layout.DESCRIPTION and R/ subdirectoryjulia --project=src/ -e 'import Pkg; Pkg.init()'CMakeLists.txt or MakefileLanguage selection principles (when choosing freely):
src/:
src/main.py for Python, src/main.rs
src/lib.rs for Rust, R/ for R packages)/research-execute) for a quick sanity check before the full run--dry-run, --fast, --epochs 1 --samples 10mcp__plugin_context7_context7__query-docs) to look up library APIs when needed.After implementation, update the YAML frontmatter in plan/research_plan.md to reflect the actual
execution commands. This information is consumed by Phase 3.5 (/research-execute).
Read the current frontmatter and update or add these fields:
---
title: "..."
domain: "..."
languages: ["rust", "python"] # actual languages used in src/
ecosystem: ["cargo", "uv"] # actual package managers
execution_cmd: "bash run_all.sh" # command to run the full pipeline
dry_run_cmd: "bash run_all.sh --dry-run" # fast sanity-check command (seconds)
expected_outputs: # key files that should appear in results/
- "results/metrics.csv"
- "results/model.pt"
estimated_runtime: "~30 minutes" # rough estimate for user awareness
---
If a run_all.sh (or equivalent) script does not yet exist, create it in the output directory root (not inside src/). The cwd field in execution_manifest.json should be set accordingly. Always verify that execution_cmd can be run from the directory specified by cwd.
After updating the YAML frontmatter, also emit a structured execution_manifest.json in the output directory root. This file is the machine-readable execution contract consumed by Phase 3.5 (/research-execute).
{
"schema_version": "1.0.0",
"languages": ["rust", "python"],
"ecosystem": ["cargo", "uv"],
"execution_cmd": "bash run_all.sh",
"dry_run_cmd": "bash run_all.sh --dry-run",
"expected_outputs": [
{"path": "results/metrics.csv", "required": true},
{"path": "results/model.pt", "required": false}
],
"estimated_runtime": "~30 minutes",
"cwd": "."
}
Fields:
schema_version: Always "1.0.0" for this releaselanguages, ecosystem: Actual languages/tools used in src/execution_cmd: Single command to run the full pipelinedry_run_cmd: Fast sanity-check command (seconds, not minutes)expected_outputs: Files that should appear in results/ after execution. required: true means the pipeline should warn if absent; required: false means optional.estimated_runtime: Rough estimate for user awarenesscwd: Working directory relative to the output directory (optional, defaults to output directory root)The YAML frontmatter in
research_plan.mdis retained for backward compatibility and human readability, butexecution_manifest.jsonis the authoritative machine contract.
Pre-validation: Before proceeding to Step 4, verify that the file or command referenced by execution_cmd exists at the expected path (e.g., Glob for run_all.sh or check that the binary is available). If the target does not exist, fix the manifest/frontmatter before running validation.
Note: If Step 4 (Validation) discovers issues that require changing the execution command, re-update the frontmatter (Step 3) and manifest (Step 3b) after the fix to keep them consistent.
Run the dry-run command to confirm basic executability:
{dry_run_cmd}
Present the implementation summary to the user:
execution_cmd, dry_run_cmd)Before presenting to the user, execute a lightweight quality checkpoint:
High, Medium, or Low):| Checklist Item | Criteria |
|---|---|
| Code correctness | All files are syntactically valid; key functions produce expected output types |
| Alignment with plan | Implementation matches the research plan's specification; deviations are documented |
| Error handling | Edge cases and invalid inputs are handled gracefully |
| Dependency management | All required libraries are listed; no undeclared imports |
Conditional MAGI mini-review (if confidence is Medium or Low):
mcp__codex-cli__ask-codex(
prompt: "Review this research implementation for correctness, plan alignment, error handling, and dependency management. Focus on: {low_scoring_items}\n\n@{output_dir}/plan/research_plan.md\n@{output_dir}/src/ (all source files matching the detected language: *.py, *.rs, *.jl, *.r, *.cpp, etc.)",
model: "gpt-5.4"
)
If
--claude-only: Per §SubagentExec — B (AC, code reviewer): Read research plan + source files. Review correctness, plan alignment, error handling, dependency management focusing on {low_scoring_items}. Return structured text.
Go/No-Go synthesis: Write a brief gate report with:
Save to src/phase_gate.md.
If the gate returns No-Go, fix the identified issues before presenting to the user. Maximum 1 fix iteration.
Present the implementation for user review:
What SKILL.md sets; muted values are Claude Code's defaults
None: SKILL.md is the whole skill.
npx claudepluginhub axect/magi-researchers --plugin magi-researchers9 skills in this plugin
/researchResearch Workflow — Full PipelineRuns the complete research pipeline: Brainstorming → Planning → Implementation → Testing & Visualization → Reporting. Orchestrates all phases with user checkpoints between each./research-brainstormResearch Brainstorm SkillGenerates and cross-validates research ideas using Gemini and Codex in parallel, then synthesizes results with Claude./research-executeResearch Execute SkillExecutes the research code in `src/` to generate result artifacts in `results/`. This is Phase 3.5/research-explainResearch Explain SkillGenerates high-quality explanations of concepts using Gemini and Codex in parallel (Phase 1: MAGI strategy exploration), then synthesizes a single-voice explanation with Claude (Phase 2: convergent generation)./research-reportResearch Report SkillGenerates a structured markdown research report from all previous phase outputs. Actively integrates existing plots, generates missing visualizations, and cross-verifies claim-evidence integrity. Requires at least some prior phase results to exist./research-searchResearch Search SkillSearches academic literature via OpenAlex (240M+ works) and optionally web sources. Standalone skill for quick literature discovery without the full brainstorm pipeline.Other plugins' skills for the same job