Validate Schema
This skill allows the agent to verify that any data structure, file, YAML block, or agent output conforms to its defined schema or structural contract — producing a precise, actionable pass/fail report before the data is acted upon or written to disk.
Steps
- Locate and read the schema. Find the authoritative schema definition:
- For workspace YAML files → check
.db/.schemas/ for the appropriate schema
- For toolbox files → check the toolbox
yaml_path file's structure
- For custom structures → derive from the written spec or identity file
- Read the target fresh. Apply Zero-Drift Audit Law — read the actual current file/data live, not from cached context.
- Map required fields. List every required field from the schema. Note which are optional.
- Check field presence. For each required field, verify it exists in the target.
- Check field types. Verify data types match (string vs int, list vs scalar, etc.).
- Check value constraints. Validate enum values, non-empty lists, valid paths, valid statuses, etc.
- Check structural contract. Verify nesting depth, key naming conventions, and ordering where prescribed.
- Compile violations. For every failure, record: field path, expected value/type, actual value/type, severity (blocking vs warning).
- Determine verdict.
- Zero violations → VALID ✅
- Warnings only → VALID WITH WARNINGS ⚠️
- Any blocking violation → INVALID ❌
- Generate fix instructions. For each violation, produce a specific, executable correction.
- Output the validation report.
Output Format
validation_report:
target: "<file or data description>"
schema_source: "<where the schema was found>"
verdict: "VALID | VALID_WITH_WARNINGS | INVALID"
violations:
- field_path: "<e.g. content.skills[0].maturity>"
expected: "<expected type or value>"
actual: "<what was found>"
severity: "blocking | warning"
fix: "<exact correction to apply>"
summary: "<one-line verdict summary>"
Notes
- Always validate before writing. Any automated file write should be preceded by a schema validation of the content.
- If no schema exists for a target, flag this as a gap and generate a schema proposal before proceeding.
- Validation failures on
.db/.system.board.yaml or router files are critical — they corrupt agent routing.
- Pair with
planning toolbox: if INVALID, generate a fix plan before retrying.
1---2name: validate-schema3metadata:4 source: https://skillmd.com/skills/auto-skiller/validate-schema5 name: validate-schema6 class: toolboxes7 type: skill8 version: '1.0'9 schema_version: '1.0'10 freshness:11 status: active12 sync_count: 013 last_synced_by: daemon14 last_synced: '2026-06-27T00:00:00'15credentials:16 maturity: "functional"17 description: "Validate that a file, data structure, or agent output conforms to its defined schema or structural contract."18 when_to_use: "Use this skill when the task involves validate schema"19 triggers: ["validate", "check schema", "is this correct", "verify structure", "does this conform", "integrity check", "schema check"]20 inputs: ["target data or file path", "schema or contract definition", "validation rules"]21 outputs: ["validation verdict (pass/fail)", "violation list with locations", "fix instructions"]22---2324# Validate Schema2526This skill allows the agent to verify that any data structure, file, YAML block, or agent output conforms to its defined schema or structural contract — producing a precise, actionable pass/fail report before the data is acted upon or written to disk.2728## Steps29301. **Locate and read the schema.** Find the authoritative schema definition:31 - For workspace YAML files → check `.db/.schemas/` for the appropriate schema32 - For toolbox files → check the toolbox `yaml_path` file's structure33 - For custom structures → derive from the written spec or identity file342. **Read the target fresh.** Apply Zero-Drift Audit Law — read the actual current file/data live, not from cached context.353. **Map required fields.** List every required field from the schema. Note which are optional.364. **Check field presence.** For each required field, verify it exists in the target.375. **Check field types.** Verify data types match (string vs int, list vs scalar, etc.).386. **Check value constraints.** Validate enum values, non-empty lists, valid paths, valid statuses, etc.397. **Check structural contract.** Verify nesting depth, key naming conventions, and ordering where prescribed.408. **Compile violations.** For every failure, record: field path, expected value/type, actual value/type, severity (blocking vs warning).419. **Determine verdict.**42 - Zero violations → **VALID ✅**43 - Warnings only → **VALID WITH WARNINGS ⚠️**44 - Any blocking violation → **INVALID ❌**4510. **Generate fix instructions.** For each violation, produce a specific, executable correction.4611. **Output** the validation report.4748## Output Format4950```yaml51validation_report:52 target: "<file or data description>"53 schema_source: "<where the schema was found>"54 verdict: "VALID | VALID_WITH_WARNINGS | INVALID"55 violations:56 - field_path: "<e.g. content.skills[0].maturity>"57 expected: "<expected type or value>"58 actual: "<what was found>"59 severity: "blocking | warning"60 fix: "<exact correction to apply>"61 summary: "<one-line verdict summary>"62```6364## Notes65- **Always validate before writing.** Any automated file write should be preceded by a schema validation of the content.66- If no schema exists for a target, flag this as a gap and generate a schema proposal before proceeding.67- Validation failures on `.db/.system.board.yaml` or router files are critical — they corrupt agent routing.68- Pair with `planning` toolbox: if INVALID, generate a fix plan before retrying.