/oscal:convertfrom oscal
Converts OSCAL documents between JSON, XML, and YAML formats with round-trip fidelity. Auto-detects input format from file extension or content.
Ships in oscal. Installing the plugin adds it to Claude Code.
Converts an OSCAL document between JSON, XML, and YAML. The input format is auto-detected from file extension or content.
bash plugins/oscal/scripts/convert.sh <input> --to <json|xml|yaml> [--output <path>] [--overwrite]
<input> — path to OSCAL document--to <fmt> — target format: json, xml, or yaml--output <path> — write to this path (otherwise stdout)--overwrite — allow overwriting an existing output file# NIST publishes the 800-53 catalog as XML; convert to JSON for programmatic use:
curl -LO https://raw.githubusercontent.com/usnistgov/oscal-content/main/nist.gov/SP800-53/rev5/xml/NIST_SP-800-53_rev5_catalog.xml
/oscal:convert NIST_SP-800-53_rev5_catalog.xml --to json --output nist-catalog.json
# Round-trip to YAML for human review:
/oscal:convert nist-catalog.json --to yaml --output nist-catalog.yaml
# Convert gap-assessment output to XML for Compliance Trestle import:
/oscal:convert gap-report.oscal-ar --to xml --output gap-report.xml
oscal-cli preserves all semantic content across format conversions. Whitespace and ordering may differ but the deserialized model is byte-equivalent. This is verified by the underlying tool's round-trip tests.
0 — success2 — input file missing or unreadable5 — oscal binary not installed6 — input is not a recognized OSCAL document/grc-engineer:gap-assessment --output=oscal-ar into OSCAL SAR consumers that only speak XML.What the command file sets; muted values are Claude Code's defaults
oscal, document-conversion, compliance, grc, format-conversion
7-day visitors to each command page
3 commands in this plugin
3 plugins ship this exact command · first indexed Apr 17, 2026
npx claudepluginhub abnejllc/grc --plugin oscalOther plugins' commands for the same job