← Browse all 10 skills-check commands
Diagnostics & Maintenance

fix

Automatically normalize and repair skill files using deterministic transforms — no LLM required. Fixes missing frontmatter fields, migrates deprecated product-version to compatibility, and normalizes formatting.

Why it matters

There's a gap between detecting issues (via lint) and AI-assisted updates (via refresh). Fix fills that gap with safe, predictable transforms that you can trust in CI — frontmatter normalization, compatibility migration, and format cleanup without any LLM involvement.

What it does

  • Adds missing required frontmatter fields (name from filename, description placeholder)
  • Populates author from git config when missing
  • Migrates deprecated product-version field to the spec-native compatibility format
  • Trims trailing whitespace from all lines
  • Ensures files end with a single newline
  • Dry-run by default — shows proposed changes without writing

Usage

npx skills-check fix [dir] [options]

Options

FlagDescription
--writeApply fixes (default is dry-run)
--format <type>Output format: terminal or json

Examples

Preview fixes

npx skills-check fix

Apply fixes

npx skills-check fix --write

Fix specific directory

npx skills-check fix ./skills --write

JSON output

npx skills-check fix --format json

When to use this

  • After lint reports fixable issues
  • When migrating from product-version to compatibility
  • Before committing skills to normalize formatting

Related commands

  • lintDetect issues, then fix them
  • refreshFix deterministic issues, then use AI for content updates

CI tip

Run fix in dry-run mode in CI to detect unfixed issues. Use fix --write locally before committing.