/oscal-tools:using-oscal-clifrom oscal-tools
Provides commands for validating, converting, and processing OSCAL documents using oscal-cli.
Ships in oscal-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The oscal-cli provides tools for validating, converting, and processing OSCAL documents.
| Command | Description |
|---|---|
validate | Check that an OSCAL instance is well-formed and valid |
convert | Convert OSCAL between formats (XML, JSON, YAML) |
resolve-profile | Resolve profile imports to produce a catalog |
list-allowed-values | List allowed value constraints for OSCAL models |
Check that an OSCAL document is well-formed and valid:
oscal-cli validate <file-or-URI>
| Option | Description |
|---|---|
--as <FORMAT> | Source format: XML, JSON, or YAML |
-c <URL> | Additional constraint definitions |
-o <FILE> | Write SARIF results to file |
--sarif-include-pass | Include pass results in SARIF output |
--disable-schema-validation | Skip schema validation |
--disable-constraint-validation | Skip constraint validation |
--path-format <FORMAT> | Path format: auto, metapath, xpath, jsonpointer |
--threads <count> | Parallel constraint validation threads (experimental) |
# Validate any OSCAL document (auto-detects model type)
oscal-cli validate ssp.json
# Validate with explicit format
oscal-cli validate document.xml --as xml
# Output SARIF results
oscal-cli validate catalog.json -o results.sarif
# Add custom constraints
oscal-cli validate ssp.json -c custom-constraints.xml
Convert OSCAL documents between formats:
oscal-cli convert --to=<FORMAT> <source-file> [destination-file]
| Option | Description |
|---|---|
--to <FORMAT> | Target format: XML, JSON, or YAML (required) |
--overwrite | Overwrite destination if it exists |
# Convert JSON to YAML
oscal-cli convert --to=yaml catalog.json catalog.yaml
# Convert XML to JSON
oscal-cli convert --to=json ssp.xml ssp.json
# Convert to YAML (output to stdout if no destination)
oscal-cli convert --to=yaml profile.json
Resolve a profile's imports to produce a resolved catalog:
oscal-cli resolve-profile --to=<FORMAT> <profile-URI> [destination-file]
| Option | Description |
|---|---|
--as <FORMAT> | Source format: XML, JSON, or YAML |
--to <FORMAT> | Output format: XML, JSON, or YAML (required) |
--overwrite | Overwrite destination if it exists |
--relative-to <URI> | Generate URI references relative to this resource |
--pretty-print | Enable pretty-printing for readability |
# Resolve profile to JSON catalog
oscal-cli resolve-profile --to=json profile.json resolved-catalog.json
# Resolve with pretty printing
oscal-cli resolve-profile --to=json --pretty-print profile.xml output.json
List allowed value constraints for OSCAL models:
oscal-cli list-allowed-values [destination-file]
| Option | Description |
|---|---|
-c <URL> | Additional constraint definitions |
--overwrite | Overwrite destination if it exists |
Available for all commands:
| Option | Description |
|---|---|
-h, --help | Display help message |
--no-color | Disable colorized output |
-q, --quiet | Minimize output to errors only |
--show-stack-trace | Show stack trace on errors |
--version | Display application version |
oscal-cli validate document.json && oscal-cli convert --to=yaml document.json document.yaml
# 1. Validate the profile
oscal-cli validate profile.json
# 2. Resolve to catalog
oscal-cli resolve-profile --to=json profile.json resolved.json
# 3. Validate the resolved catalog
oscal-cli validate resolved.json
# Validate all JSON files in directory
for f in *.json; do oscal-cli validate "$f"; done
| Issue | Solution |
|---|---|
| Validation errors | Check document structure against OSCAL schema |
| Profile resolution failures | Verify all imported catalogs/profiles are accessible |
| Conversion issues | Validate source document first |
| Format detection fails | Use --as to specify source format explicitly |
| Task | Skill |
|---|---|
| Understanding OSCAL models | oscal-basics (oscal plugin) |
| Working with catalogs | oscal-catalog (oscal plugin) |
| Working with profiles | oscal-profile (oscal plugin) |
| Working with SSPs | oscal-ssp (oscal plugin) |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub metaschema-framework/claude-plugins --plugin oscal-toolsOther plugins' skills for the same job