Installs into .claude/skills of the current project.
Are you the author of Contentrain Validate Fix?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/contentrain-contentrain-validate-fix)
---
name: contentrain-validate-fix
description: "Validate Contentrain content against model schemas and auto-fix structural issues. Use when checking content validity or fixing validation errors."
metadata:
author: Contentrain
version: "1.0.0"
---
# Skill: Validate and Fix Content Issues
> Diagnose validation failures, apply safe fixes, and re-check the project.
---
## When to Use
Use this when:
- validation reports errors or warnings
- the user asks to fix schema/content issues
- a write operation succeeded but the project still needs verification
---
## Steps
### 1. Run Validation
Call `contentrain_validate` first.
Group results into:
- schema/type errors
- missing required fields
- relation integrity problems
- locale completeness issues
- canonical format warnings
### 2. Decide Auto-fix vs Manual Fix
Auto-fix candidates:
- canonical formatting
- orphan metadata cleanup
- stray non-i18n meta layout (an `i18n: false` model with per-locale meta files
left by older versions) — pruned or migrated deterministically, never merging
or downgrading a status
- `publish_at`/`expire_at` copies an older `content_save` left in document
frontmatter — stripped only when the meta record holds the same key, so the
value is never lost and an author's own frontmatter field is never touched
- a missing model `title_field` — backfilled by the same ranking Studio's title
resolver uses (required name-like field first; slug/url/code never inferred),
reported as a notice naming the rule. Read it: if the pick is wrong, correct it
with `contentrain_model_save`
- structural housekeeping reported by the validator
Manual fix candidates:
- missing required content
- wrong field values
- broken relations
- incorrect slugs/IDs
- a non-i18n "Meta layout mismatch" with several strays and no default-locale
meta (ambiguous — `fix: true` leaves it; pick the authoritative file yourself)
### 3. Use Auto-fix Carefully
If the issues are structural, run:
```json
{
"fix": true
}
```
After that, validate again.
### 4. Fix Semantic Errors
For real content or schema issues:
- inspect the model with `contentrain_describe`
- patch content with `contentrain_content_save`
- patch schema with `contentrain_model_save`
Do not claim the project is valid until validation is rerun.
### 5. Re-run Validation
Call `contentrain_validate` again and compare:
- errors reduced to zero
- remaining warnings acknowledged
### 6. Submit or Recommend Review
If validation is clean:
- call `contentrain_submit` when pending review branches exist
If validation still fails:
- summarize remaining blockers precisely
- tell the user which model/entry needs manual attention
## Related Skills
- **contentrain-review** — Full content review workflow
- **contentrain-content** — Fix content entries after validation errors
- **contentrain** — Core architecture and MCP tool catalog