Agent skill
validate-and-fix
Run validation, parse errors, and auto-fix common skill issues like description format, orphan files, and naming mismatches
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/validate-and-fix
SKILL.md
Validate and Fix
Run the repository validation and automatically fix common issues.
Usage
Run this skill when you want to check and fix all skills in the repository.
Step 1: Run Validation
just validate-verbose
Step 2: Parse and Categorize Errors
Common error types and their fixes:
Description contains newlines
Error: description contains newline characters
Fix: Edit the SKILL.md frontmatter to make the description a single line.
Remove any \n or \r characters. Do not use YAML block scalars (|, >,
|-, >-).
Name mismatch
Error: name 'X' doesn't match directory 'Y'
Fix: Edit the name field in frontmatter to match the parent directory name
exactly (kebab-case).
Orphan files
Error: orphan file not referenced from SKILL.md: <path>
Fix: Either:
- Add a reference to the file in SKILL.md (markdown link or backtick), or
- Delete the file if it's not needed
Files exempt from orphan checks: package.json, bun.lock, .gitkeep.
Invalid sources format
Error: sources must use markdown link format
Fix: Convert plain URLs to [Title](url) format in the ## Sources
section.
Word count exceeded
Error: word count exceeds 1500
Fix: Reduce content. Move detailed reference material into references/*.md
files and link to them from SKILL.md.
Missing required fields
Error: missing required field: name|description
Fix: Add the missing field to the YAML frontmatter.
Step 3: Re-validate
After applying fixes, run validation again:
just validate
Repeat until all errors are resolved.
Step 4: Format
just fmt
Step 5: Final Check
just check
This runs lint + typecheck to confirm everything passes.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?