Skip to content

Coding Agent Guidelines Radiotherapy

This is my personal coding guidelines optimized for radiotherapy research and inspired by Andrej Karpathy's work on Claude skills. Hope you like it!

Install: git clone https://github.com/MustafaKadhim/Coding-Agent-Guidelines-Radiotherapy

Works with Claude Code, Codex Β· 11 GitHub stars

Install

$git clone https://github.com/MustafaKadhim/Coding-Agent-Guidelines-Radiotherapy

Install command taken from the project's README or registry entry. Always review code before running it.

Coding-Agents-Skills-for-Radiotherapy-Research

These are my personal coding guidelines optimized for radiotherapy research and inspired by Andrej Karpathy's work on Claude Code skills. I provided reusable AGENTS.md (for Codex) and CLAUDE.md (for Claude Code) guidelines designed to help you code using radiothreapy expert agents. These guidelines will enable safer, smaller, and more scientifically reliable agents when working with research code involving DICOM, NIfTI, CT, CBCT, MRI, dose grids, segmentation masks, PyTorch, MONAI, and model evaluation.

If you find this is useful for your research, consider starring or forking the repository so others in the medical physics and radiotherapy AI community can find and improve it.

Hope you like it!🌟


Why I created this?

Coding agents such as Claude Code, Codex, Cursor, Copilot-style tools, and other AI development assistants are becoming increasingly useful for research software.

But radiotherapy and medical imaging code has risks that generic coding instructions often miss:

  • patient-level data leakage
  • incorrect DICOM/NIfTI geometry handling
  • wrong interpolation for masks, labels, or dose grids
  • unsafe logging of patient identifiers
  • slice-level train/test splitting
  • preprocessing mismatch between training and inference
  • weak or misleading model evaluation
  • unverified claims about clinical validity

This repository provides domain-specific instructions to help coding agents work more carefully in this context.


What is included

File Purpose
AGENTS.md General coding-agent instructions, suitable for Codex and other agentic coding tools
CLAUDE.md Claude Code project instructions / memory file
LICENSE MIT license for reuse and adaptation

Quick start

Copy one or both instruction files into the root of your own project.

your-project/
β”œβ”€β”€ AGENTS.md
β”œβ”€β”€ CLAUDE.md
└── README.md

Then open the project in your coding-agent environment, for example VSCode, Claude Code, Codex, Cursor, or similar tools.

For Codex-style agents

Use:

AGENTS.md

For Claude Code

Use:

CLAUDE.md

Main principles

The guidelines emphasize:

  • think before coding
  • ask when scientific assumptions are ambiguous
  • make minimal, surgical changes
  • avoid unnecessary refactoring
  • verify changes with tests or smoke checks
  • protect patient privacy
  • avoid data leakage
  • respect medical image geometry and metadata
  • use appropriate interpolation for images, masks, labels, and dose
  • evaluate models with suitable metrics and confidence intervals
  • avoid unsupported clinical claims

Medical imaging and radiotherapy focus

The instructions include specific guardrails for workflows involving:

  • CT, CBCT, MRI, PET, SPECT, X-ray, and surface imaging
  • DICOM and NIfTI I/O
  • image orientation, spacing, origin, direction cosines, and affine matrices
  • segmentation masks and label maps
  • dose distributions and dose-grid alignment
  • image registration and resampling
  • patient-level train/validation/test splitting
  • segmentation, synthesis, reconstruction, classification, and uncertainty tasks
  • PyTorch, PyTorch Lightning, MONAI, TorchIO, SimpleITK, nibabel, and pydicom

Example use case

You can add these files to a repository containing a deep learning pipeline for radiotherapy image analysis.

Similar plugs

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…

Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.

Persistent Context Across Sessions for Every Agent, Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future…

Explore related