modality-detection

modality-detection is a skill for Claude Code, Codex from aizech/clinical-skills. It costs 73 tokens per session (2,154 once invoked), scanned A, original, MIT.

A way to identify the type of medical imaging in user input, DICOM headers, or files. Examples include CT, MRI, X-ray, ultrasound, mammography, and PET/CT.

In plain words
What is it for?
Use it to detect an imaging modality, interpret standard DICOM modality codes, and distinguish combined studies such as PET/CT or SPECT/CT.
Why use it?
It helps applications classify imaging studies when the modality is not clearly stated or must be read from a file.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to detect an imaging modality, interpret standard DICOM modality codes, and distinguish combined studies such as PET/CT or SPECT/CT.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aizech/clinical-skills/modality-detection
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aizech/clinical-skills --skill modality-detection
Clone the repo
git clone --depth 1 https://github.com/aizech/clinical-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modality-detection

README.md
[![agentmods](https://agentmods.dev/badge/skills/aizech/clinical-skills/modality-detection/github.svg)](https://agentmods.dev/skills/aizech/clinical-skills/modality-detection)
Your own site
<a href="https://agentmods.dev/skills/aizech/clinical-skills/modality-detection"><img src="https://agentmods.dev/badge/skills/aizech/clinical-skills/modality-detection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for modality-detection

Your own site · 80×15
<a href="https://agentmods.dev/skills/aizech/clinical-skills/modality-detection"><img src="https://agentmods.dev/badge/skills/aizech/clinical-skills/modality-detection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,154 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.02154
Opus 5.5 $0.00029 $0.00862
Sonnet 5.5 $0.00015 $0.00431
Haiku 4.5 $0.00007 $0.00215

Measured 3mo ago against content hash 308bc6dd2642, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

modality-detection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/modality-detection/SKILL.md · 276 lines

How it starts

The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Modality Detection

You are a radiology modality detection expert. Your role is to accurately identify the imaging modality from various input formats.

Modality Categories

Primary Modalities

Modality Code Description
Computed Tomography CT, CT-A X-ray cross-sections, often with contrast
Magnetic Resonance Imaging MR, MR-A Magnetic field imaging, no radiation
Plain Radiography CR, DX Projectional X-ray images
Ultrasound US Sound wave imaging, no radiation
Mammography MG Breast imaging, specialized X-ray
Nuclear Medicine NM, PT, PET Radioactive tracer imaging
Fluoroscopy RF Real-time X-ray video

Hybrid/Advanced Modalities

Modality Code Description
PET/CT PT/CT Combined PET and CT
PET/MR PT/MR Combined PET and MRI
SPECT/CT NM/CT Combined SPECT and CT
CT Angiography CTA CT with arterial contrast timing
MR Angiography MRA MRI for vessel imaging

DICOM Modality Codes

Standard DICOM modality values:

  • CT: Computed Tomography
  • MR: Magnetic Resonance
  • DX: Digital Radiography
  • CR: Computed Radiography
  • US: Ultrasound
  • MG: Mammography
  • NM: Nuclear Medicine
  • PT: PET
  • RF: Radio Fluoroscopy
  • XA: X-Ray Angiography
  • OP: Ophthalmic Photography
  • ES: Endoscopy

Detection Patterns

From Text Input

Extract modality from clinical text using these patterns:

def detect_modality(text):
    text_upper = text.upper()
    
    # Exact matches first
    if "PET/CT" in text_upper:
        return "PET/CT"
    if "CT ANGIOGRAPHY" in text_upper or "CTA" in text_upper:
        return "CTA"
    if "MR ANGIOGRAPHY" in text_upper or "MRA" in text_upper:
        return "MRA"
    if "DIGITAL MAMMOGRAPHY" in text_upper or "SCREENING MAMMO" in text_upper:
        return "Mammography"
    
    # Pattern matching
    if "CT " in text_upper or text_upper.startswith("CT"):
        return "CT"
    if "MRI " in text_upper or text_upper.startswith("MR ") or "MAGNETIC RESONANCE" in text_upper:
        return "MRI"
    if "X-RAY" in text_upper or "CHEST X" in text_upper or "DX " in text_upper:
        return "X-ray"
    if "ULTRASOUND" in text_upper or "SONOGRAPHY" in text_upper or "US " in text_upper:
        return "Ultrasound"
    if "MAMMO" in text_upper or "BREAST" in text_upper:
        return "Mammography"
    if "PET " in text_upper or "PET-" in text_upper:
        return "PET/CT"
    
    return None  # Unknown

Read the full file on GitHub · 276 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 276 lines · 73 tokens per session scan A 308bc6dd2642

Subscribe to this mod's changes

modality-detection is a skill published in the GitHub repository aizech/clinical-skills (7 stars, last pushed 5mo ago), licensed MIT. It adds 73 tokens to every session and 2,154 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

modality-detection compared with skills from other repositories

modality-detection next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
modality-detectionaizech/clinical-skillsSkill75mo agoMITA73Claude Code, Codex
standardize-health-datathetahealth/mirobodySkill1.9kyesterdayApache-2.0A133Claude Code
mirobodythetahealth/mirobodySkill1.9kyesterdayApache-2.0A135Claude Code
flux-analyzeraiming-lab/AutoResearchClawSkill15k3mo agoMITA44Claude Code, Codex
fba-simulatoraiming-lab/AutoResearchClawSkill15k3mo agoMITA69Claude Code, Codex
gsmm-validatoraiming-lab/AutoResearchClawSkill15k3mo agoMITA52Claude Code, Codex
gsmm-builderaiming-lab/AutoResearchClawSkill15k3mo agoMITA45Claude Code, Codex