iris-xnat

Query and manage IRIS XNAT imaging experiments via authenticated REST API calls.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/dmd/dotfiles --skill iris-xnat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iris-xnat
Source: https://github.com/dmd/dotfiles/tree/main/claude/skills/iris-xnat
Command: npx skills add https://github.com/dmd/dotfiles --skill iris-xnat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

Provides practical tools and guidance to find imaging experiments on an IRIS XNAT server, obtain accurate scan file counts, verify project membership, and share subjects/experiments between projects to streamline data management and collaboration.

Core Features & Use Cases

  • Experiment Discovery: Search experiments by session label or accession and fetch detailed metadata.
  • Accurate Scan Counts: Query scan resources rather than unreliable frame counts to compute true file counts for quality checks and transfers.
  • Project Membership & Sharing: Check whether an experiment is in a target project and share subjects and experiments (including batch operations) while handling 409/404 responses gracefully.
  • Use Case: Find a session by label, confirm its file inventory for QC, and share it into a collaborator project using the provided helper scripts.

Quick Start

Run a lookup for experiment E62622361, retrieve its scan file counts, and share it to project webb_k23 if it is not already shared.

Frequently Asked Questions about iris-xnat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query imaging experiments on an XNAT server by session label or accession number?

You can query imaging experiments on an XNAT server by making authenticated HTTP requests to the XNAT REST API. The Skill handles JSON ResultSet responses to fetch detailed metadata for sessions found by label or accession.

How do I get accurate scan file counts for XNAT imaging experiments instead of unreliable frame counts?

To get accurate XNAT scan file counts, query the scan resources directly via the REST API rather than relying on frame counts. This approach computes true file inventories for reliable quality checks and data transfers.

Can I batch share XNAT subjects and experiments between different projects?

Yes, you can batch share XNAT subjects and experiments between projects by performing PUT operations to the XNAT REST API. The process checks target project membership first and gracefully handles 409 conflict or 404 not found responses.

How do I check if an XNAT experiment is already shared in a target project before transferring data?

Check XNAT project membership by querying the experiment's project associations through authenticated API calls. The Skill verifies whether a session exists in a target project, returning status codes to confirm sharing state before initiating transfers.

What do 404 and 409 status codes mean when sharing experiments between XNAT projects?

When sharing XNAT experiments, a 404 status code indicates the target project or subject was not found, while a 409 signifies a conflict, typically meaning the experiment is already shared. The Skill handles both responses gracefully during batch operations.

Do I need authenticated API access to manage IRIS XNAT imaging data and scan counts?

Yes, authenticated HTTP requests to the XNAT REST API are required to manage IRIS XNAT imaging experiments, retrieve scan counts, and share subjects between projects. The Skill uses the Python requests library to handle these operations.