Skip to content
Back to skills

Contentrain Validate Fix

ASecurity

Validate Contentrain content against model schemas and auto-fix structural issues. Use when checking content validity or fixing validation errors.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 23, 2026
ai-agents

Works with

  • mcp

Security analysis

A100/100

Scanned September 23, 2026

npx -y skills add Contentrain/ai --skill contentrain-validate-fix --agent claude-code

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.

Security grade badge for Contentrain Validate Fix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/contentrain-contentrain-validate-fix/badge)](https://www.skillsdirectory.com/skills/contentrain-contentrain-validate-fix)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.