Skip to content
KeWang0622Public

About

MRI research guidance for coding agents — composable skills, established tools, and evidence-linked research memory. Install: npx skills add KeWang0622/MRFoundry

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

30 stars

Watchers

0 watching

Forks

Repository files navigation

MRFoundry MRFoundry MRI mascot

MRI research guidance for your coding agent — from the question to the paper.

CI License: MIT Version Install Stars

Quick start · Workflow · Skills · Papers & textbooks · Research memory · Interactive tutorial · Contribute

Coding agents can write MRI code, but choosing the right signal model, data convention, tool and validation takes domain knowledge. MRFoundry gives your agent curated guidance and primary references across MRI physics, acquisition, reconstruction, analysis and publishing.

Seven installable skills · Established scientific tools · Project-local research memory

Quick start

Install with the open skills CLI, then select the skills and supported coding agents you want to use:

npx skills add KeWang0622/MRFoundry -g

Start with a request in your agent:

Design a golden-angle radial gradient-echo in PyPulseq and simulate it first. Then reconstruct the simulated data and check whether the image meets the research goal.

The skills guide tool selection, setup, execution and checks. Scientific applications such as PyPulseq, KomaMRI and BART are installed separately as needed; the agent is instructed to handle routine setup in an isolated environment and test an upstream example before use.

Explore the interactive tutorial → — agents, skills, MRI examples and the self-improvement workflow. Presentation information.

Install one skill, choose an agent, or update
# Install only for the current project
npx skills add KeWang0622/MRFoundry

# Choose one skill
npx skills add KeWang0622/MRFoundry --skill mri-reconstruction

# Target a supported agent
npx skills add KeWang0622/MRFoundry -a claude-code

# Browse without installing
npx skills add KeWang0622/MRFoundry --list

# Update installed global skills
npx skills update -g

Choose one, several or all seven skills. Browse the skills directory. These are Markdown instructions and supporting helpers; installing them does not install every scientific application or grant access to restricted datasets.

How it works

You set the research goal. The agent uses skills as guidance and tools to take action. A task may need several skills; the seven skills are not seven separate models.

flowchart TB
  U["Your request<br/>Question, data, constraints"] --> A["Agent<br/>Plan and select knowledge"]
  S["MRI skills<br/>Methods, sources, caveats"] --> A
  A --> T["Scientific tools<br/>Install, test, execute"]
  T --> E["Evidence<br/>Outputs and checks"]
  E --> R["Researcher review<br/>Does it meet the goal?"]
  R -->|Revise| A
  R --> M["Project memory<br/>Lessons and preferences"]
  M -.->|Retrieve and recheck| A
Loading

Tools include PyPulseq for sequence definitions, KomaMRI for simulation, BART / SigPy for reconstruction, and MRtrix3 / DIPY for diffusion analysis. Data resources and papers supply inputs and evidence; skills help the agent choose and use them.

Research phases

Phase What the agent helps with What to inspect
1 · Frame the question Read primary literature, identify the gap, combine relevant skills. A specific question, assumptions and success criteria.
2 · Design the study Choose data, acquisition or simulation, baselines and metrics. A feasible plan with controls and comparison conditions.
3 · Run the work Set up established tools; simulate, reconstruct or analyze. Commands, versions, outputs and failed attempts.
4 · Evaluate the evidence Inspect images and results; test assumptions, accuracy and robustness. Whether the result supports the claim—not just whether code ran.
5 · Write and improve Draft figures and methods; record scoped lessons for the next task. Traceable claims, limitations and reusable project knowledge.

These phases are iterative. New evidence or user feedback can send the work back to an earlier decision. The research-workflow skill connects the phases; specialist skills supply the domain guidance.

Choose your skills

Start with mri-research for orientation, mri-research-workflow for a study, or a specialist for a focused task.

Skill Use it for Typical tools or resources
MRI research Physics, references, cross-domain questions and image-level analysis Courses, papers, BIDS, FSL, FreeSurfer
Research workflow Question → study design → experiments → manuscript Literature, baselines, metrics, venue guidance
Reconstruction Raw k-space, coil maps, parallel imaging, compressed sensing, non-Cartesian recon BART, SigPy, ISMRMRD
Sequence design GRE, SE/FSE, EPI, diffusion preparation, DENSE and simulation Pulseq/PyPulseq, KomaMRI, vendor references
Deep-learning reconstruction Trained, unrolled, self-supervised and diffusion-based recon DIRECT, ATOMMIC, fastMRI
Diffusion MRI DWI/DTI, ADC/FA/MD, preprocessing, fiber orientations and tractography MRtrix3, DIPY, FSL, QSIPrep
Hardware Coils, gradients, low-field systems, shimming and safety orientation MaRCoS, OCRA, EM and shim tools

Explore the expanded guides

Research memory

Each project can keep a private .mrfoundry/ notebook. The improvement loop is retrieve → execute → evaluate → update → reuse and verify.

.mrfoundry/
├── INDEX.md          # Relevant work and next steps
├── preferences.md    # Your explicit research habits
├── environment.md    # Working tools, versions and setup checks
├── runs/             # Experiments, outcomes and failures
└── lessons.md        # Reusable findings with evidence and limits

A lesson should change a concrete decision in the next task, then be checked again. Keep user preferences separate from scientific conclusions, and retain failed or superseded findings. Project CLAUDE.md / AGENTS.md can point agents to the notebook; this is instruction-based memory, not model retraining or guaranteed automatic learning.

Existing .mri-research/ notebooks migrate to .mrfoundry/ with the same initializer; existing notes are preserved. If both folders exist, reconcile them before migrating.

Set up project memory → · How agents set up scientific tools →

Write an MRI paper

The paper-writing guide connects claims → experiment evidence → figures → manuscript → reviewer responses, with distinct guidance for MICCAI, MRM, JMRI and IEEE TMI and links to official instructions. Start with an editable paper plan.

“Use my experiment records to plan an MRM paper. Map each claim to evidence, propose the figures, and flag missing analyses before drafting the abstract.”

The included diffusion study is an illustrative planning example, not reported experimental results. The agent should never fill missing evidence with plausible numbers.

Try a research question

Your request Knowledge the agent needs to combine
“Why do my eight receive channels look different, and how can reconstruction use that?” Coil sensitivity and hardware + reconstruction's encoding model
“Design a golden-angle GRE, simulate it, then reconstruct its data.” Sequence timing + hardware constraints + Bloch simulation + non-Cartesian reconstruction
“Plan a reproducible MRI reconstruction study for MRM.” Literature + data conventions + baselines + evaluation + scientific writing
“Could free water explain this change in diffusion metrics?” Diffusion models + confounds + controlled experiment design

These are example requests, not prerecorded successful runs. Results depend on the agent, tool access, data and validation.

Reference library

Papers and textbooks by skill → — all seven skills have an annotated reading list with full citations, direct source links and the topic each reference supports.

The hub links to primary papers, courses, datasets and software across MRI. It summarizes when a resource is useful rather than redistributing it.

Browse the MRI reference areas
Stage Reference Covers
Foundations foundations.md MR physics / k-space and where to learn — Berkeley EE225E, Stanford EE369B/C, Hornak, MRIquestions, ISMRM, handbooks
Acquisition sequences-and-trajectories.md Pulseq/PyPulseq, vendor SDKs, trajectory & RF design, SMS, field mapping, GIRF, simulation
Hardware hardware.md Low-field, open consoles, coil/shim design (CoilGen, MARIE, Shimming Toolbox), MR safety
Reconstruction recon-methods.md Landmark-paper reading list: parallel imaging, CS, low-rank, DL, diffusion, MRF, GRASP, metrics
Recon tools tools.md BART (now on Codeberg), SigPy, MIRT.jl, MRIReco.jl, torchkbnufft, mri-nufft, DIRECT, ATOMMIC, Gadgetron
Data data-and-formats.md ISMRMRD & vendor raw (twix/P-file/Philips), DICOM/NIfTI/BIDS, open datasets
Analysis analysis-processing.md Structural, fMRI, dMRI, segmentation, cardiac/body/MSK, radiomics — FreeSurfer, FSL, fMRIPrep, nnU-Net
Quantitative quantitative-and-spectroscopy.md Relaxometry, QSM, perfusion/ASL, MT, Dixon/CEST, and MR spectroscopy
Literature literature-access.md APIs, API keys, and paper-search MCP servers (arXiv, PubMed, Semantic Scholar, OpenAlex)
Publishing publishing.md MR journals + author guidelines, LaTeX templates, reporting standards, abstracts
Interpretation radiology-primer.md How MR contrast reads (T1/T2/FLAIR/DWI) — background orientation only

Reliability and scope

  • Established implementations. Use the scientific tool's official setup and examples; do not replace missing dependencies with an improvised simulator or solver.
  • Evidence before claims. Execution, data consistency, image quality and scientific validity need different checks. Researcher judgment remains essential.
  • Evaluation and attribution. Practical guidance connects claims to task-specific evidence, distinguishes reproduction from independent validation, and checks original-source credit in outputs. These are agent instructions, not guarantees of compliance.
  • Checked references. CI checks structure, version consistency, links and upstream availability; scheduled checks flag archival and drift. Passing CI does not validate scientific conclusions, and some hosts block automated link checks.
  • Appropriate use. Image-reading material is research orientation, not clinical diagnosis. Scanner operation needs local validation. External software and datasets retain their own licenses and access requirements.

Contributing

Bring a correction, a useful primary reference or a workflow you have tested. A strong contribution includes the problem, supporting evidence and the proposed change. Share reviewed, generalizable lessons; keep personal research notebooks private unless intentionally shared.

See CONTRIBUTING.md, Code of Conduct and SECURITY.md. Contributions go through pull requests and CI.

Updates

  • On main: agent-owned application setup and project research memory across all seven skills.
  • v0.8.0: venue-specific paper writing, evidence-linked project memory, diffusion/sequence guidance and annotated references.
  • v0.7.0: updated BART upstream guidance, reconstruction caveats and upstream monitoring.
  • Full changelog · Releases

Star history

If this is useful to your research group, a star helps others discover it.

GitHub star history for MRFoundry

Chart provided by Star History; updates depend on its service and GitHub's image cache.

Citation

If this helps your research or tooling, please cite it (GitHub's "Cite this repository" button reads CITATION.cff):

@software{wang_mrfoundry,
  author  = {Wang, Ke},
  title   = {MRFoundry: MRI research guidance for coding agents},
  year    = {2026},
  version = {0.8.0},
  url     = {https://github.com/KeWang0622/MRFoundry}
}

Acknowledgements

Built on top of, and in credit to, the open MRI community — the Lustig (UC Berkeley) and Pauly/Nishimura (Stanford) lineage; the BART, SigPy, ISMRMRD, Gadgetron, and Pulseq ecosystems; the FreeSurfer / FSL / SPM / AFNI / ANTs and nipreps communities; the fastMRI, mridata.org, HCP, and OpenNeuro dataset efforts; the ISMRM; and the maintainers of the community awesome-lists. All primary work belongs to its respective authors. Distribution uses the open skills CLI.

License

Released under the MIT License. External resources this hub links to (papers, datasets, software) are governed by their own licenses and terms.

About

MRI research guidance for coding agents — composable skills, established tools, and evidence-linked research memory. Install: npx skills add KeWang0622/MRFoundry

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

30 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages