De-identify DICOM medical images by removing PHI tags for research sharing, with audit logging and study-linkage preservation support.
63
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./scientific-skills/Other/dicom-anonymizer/SKILL.mdStructured DICOM de-identification support for research preparation workflows.
python -m py_compile scripts/main.pypython -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.63c61d3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.