scientific-skills/Others/dicom-anonymizer/SKILL.md
De-identify DICOM medical images by removing PHI tags for research sharing, with audit logging and study-linkage preservation support.
npx skillsauth add aipoch/medical-research-skills dicom-anonymizerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Structured DICOM de-identification support for research preparation workflows.
python -m py_compile scripts/main.py
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/smoke_test.py
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| --input, -i | string | Yes | - | Input DICOM file or directory |
| --output, -o | string | Yes | - | Output DICOM file or directory |
| --batch, -b | flag | No | false | Enable directory processing |
| --preserve-studies | flag | No | false | Preserve study linkage with pseudonyms |
| --keep-tags | string | No | - | Comma-separated tags to preserve |
| --remove-private | flag | No | true | Remove private tags |
| --audit-log, -a | string | No | - | Optional JSON audit log path |
| --overwrite | flag | No | false | Allow overwriting output files |
# Single file
python scripts/main.py --input scan.dcm --output anonymized.dcm
# Batch directory
python scripts/main.py --input ./dicoms/ --output ./anon/ --batch --preserve-studies
# With audit log
python scripts/main.py --input scan.dcm --output anon.dcm --audit-log audit.json
# Keep specific tags
python scripts/main.py --input scan.dcm --output anon.dcm --keep-tags "PatientAge,StudyDate"
If asked to recover original patient data or reverse anonymization, respond:
"Anonymization performed by this tool is irreversible by design. PHI values are replaced using one-way SHA-256 hashing — the original data is not retained by this tool and cannot be recovered. If you need access to the original patient data, contact your institutional data governance or privacy office."
For complex requests, always include these blocks:
This skill accepts requests involving DICOM anonymization, PHI-tag removal, research export preparation, or audit-log planning for medical images.
If the user's request does not involve DICOM de-identification — for example, asking to diagnose from images, convert image formats unrelated to PHI removal, or certify HIPAA compliance — do not proceed with the workflow. Instead respond:
"dicom-anonymizer is designed to support DICOM de-identification workflows for research preparation. Your request appears to be outside this scope. Please provide a DICOM input path and output target, or use a more appropriate tool for your task."
Every final response must include:
scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.