agentleFS
euCanneuCann/OSCAL-GRC-SKILLS/skills/oscal-validator/SKILL.md

oscal-validator

Skill8 starsChanged 10 months agoMITView on GitHub

Validate OSCAL documents for structural integrity, schema compliance, and OSCAL-specific requirements. Use this skill to check if OSCAL documents are properly formatted and meet NIST OSCAL specifications before processing.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when you need to:

    line 12
  2. Distinctive:

    Verify an OSCAL document is properly formatted

    line 13
  3. Distinctive:

    Check for missing required fields

    line 14
  4. Distinctive:

    Verify document is not empty

    line 76
  5. Very specific:

    Check for required metadata section

    line 81
  6. Very specific:

    Verify title is present and non-empty

    line 82
  7. Very specific:

    Check version is present

    line 84
  8. Distinctive:

    Check document-level UUID exists

    line 88
  9. Distinctive:

    Verify each reference resolves to existing element

    line 95
  10. Distinctive:

    Check control-id references against imported catalogs

    line 96
  11. Distinctive:

    Import-profile must reference valid profile

    line 107
  12. Distinctive:

    When asked "Validate this SSP for compliance":

    line 146
  13. Distinctive:

    Run all validation checks

    line 149

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OSCAL Validator Skill

Validate OSCAL documents against NIST schemas and perform structural integrity checks to ensure compliance data quality.

When to Use This Skill

Use this skill when you need to:

  • Verify an OSCAL document is properly formatted
  • Check for missing required fields
  • Validate UUIDs and cross-references
  • Ensure metadata completeness
  • Identify structural issues before further processing

✅ Data Source Principle

This skill validates documents you provide against structural rules and OSCAL schema requirements. Validation logic is safe — it checks format and syntax, not compliance content.

Note: For baseline completeness validation (e.g., "does this SSP cover all FedRAMP Moderate controls?"), you must also provide the baseline profile/catalog.


Validation Severity Levels

LevelMeaningAction Required
ERRORDocument is invalidMust fix before use
WARNINGPotential issuesShould review
INFOSuggestionsOptional improvements

Validation Rules

Structure Validation (STRUCT)

RuleDescription
STRUCT-001Document must not be empty or null
STRUCT-002Document must have a root element
STRUCT-003Root element must be a valid OSCAL model type

Metadata Validation (META)

RuleDescription
META-001Metadata section is required
META-002Title is required
META-003Last-modified timestamp is required
META-004Version is required
META-005OSCAL version should match current spec

UUID Validation (UUID)

RuleDescription
UUID-001Document UUID must be present
UUID-002UUIDs must be valid RFC 4122 format
UUID-003UUIDs must be unique within document

Reference Validation (REF)

RuleDescription
REF-001Internal references must resolve
REF-002Control references must exist
REF-003Party references must resolve

How to Validate an OSCAL Document

Step 1: Check Basic Structure

  1. Verify document is not empty
  2. Confirm root element exists
  3. Validate root element is a valid OSCAL type

Step 2: Validate Metadata

  1. Check for required metadata section
  2. Verify title is present and non-empty
  3. Confirm last-modified is valid ISO timestamp
  4. Check version is present
  5. Validate oscal-version matches expected format

Step 3: Validate UUIDs

  1. Check document-level UUID exists
  2. Validate UUID format (8-4-4-4-12 hexadecimal)
  3. Build list of all UUIDs
  4. Check for duplicates

Step 4: Validate References

  1. Find all internal references (e.g., #uuid-value)
  2. Verify each reference resolves to existing element
  3. Check control-id references against imported catalogs
  4. Validate party-uuid references

Step 5: Model-Specific Validation

For Catalogs:

  • Groups should have controls
  • Controls should have statements
  • Parameters should have values or selections

For SSPs:

  • Import-profile must reference valid profile
  • System-characteristics must include system-ids
  • Control-implementation must address all imported controls

For Component Definitions:

  • Components must have titles
  • Control implementations must reference valid controls

Validation Report Format

Provide validation results as:

VALIDATION REPORT
=================
Document: [filename]
Model Type: [type]
Valid: [YES/NO]

Issues Found:
- [SEVERITY] [RULE-ID]: [Message] at [location]

Summary:
- Errors: X
- Warnings: Y
- Info: Z

Common Issues and Fixes

IssueCauseFix
Missing metadataIncomplete documentAdd required metadata section
Invalid UUIDMalformed identifierGenerate new RFC 4122 UUID
Unresolved referenceBroken linkUpdate reference or add target
Missing timestampIncomplete metadataAdd ISO 8601 timestamp

Example Usage

When asked "Validate this SSP for compliance":

  1. Parse the document
  2. Run all validation checks
  3. Collect issues by severity
  4. Report findings with specific locations
  5. Provide actionable fix recommendations

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.