Run the Vale prose linter on CircleCI documentation files to identify and fix style errors, then create pull requests for review. Use this skill when the user explicitly asks to "run vale", "fix vale errors", "lint docs with vale", or mentions vale linting. This skill processes documentation files, fixes error-level Vale issues, and creates individual PRs per file for easier review.
91
—
Does it follow best practices?
Impact
91%
1.33xAverage score across 3 eval scenarios
Passed
No known issues
This skill automates the process of running Vale prose linter on CircleCI documentation, fixing errors, and creating pull requests for review.
Use this skill when the user:
Do NOT trigger this skill automatically just because .adoc files are being edited.
Verify these requirements before proceeding:
vale --version).vale.ini configuration file exists in the repo rootAsk the user which files to check if not already specified:
docs/guides/modules/toolkit/pages/install-cli.adocdocs/guides/modules/toolkit/pages/docs/**/*.adocRun Vale with JSON output to get structured error information:
vale --output=JSON <file-or-directory>Important: Only process error-level issues. Vale reports three severity levels:
error - Fix these automaticallywarning - Skip (leave for human review)suggestion - Skip (leave for human review)Filter the JSON output to extract only errors:
vale --output=JSON file.adoc | jq 'to_entries | map(select(.value[] | .Severity == "error"))'If no errors are found, inform the user and exit.
For each file with errors, process it independently:
Create a new branch using this naming convention:
git checkout -b vale-fix-{filename-without-extension}-{short-hash}Example: vale-fix-install-cli-a7f3b2
Read the file and understand its structure
Analyze each error from Vale output:
circleci-docs.OxfordComma)Apply fixes to address each error:
Re-run Vale on the fixed file to verify errors are resolved:
vale --output=JSON fixed-file.adocCommit changes:
git add <file>
git commit -m "Fix Vale errors in <filename>
Resolved the following Vale errors:
- [List specific errors fixed]
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"Create PR:
gh pr create --title "Fix Vale errors in <filename>" --body "$(cat <<'EOF'
## Summary
This PR fixes Vale error-level issues in `<filename>`.
## Errors Fixed
- **Line X**: [Rule name] - [Description]
- **Line Y**: [Rule name] - [Description]
## Verification
Ran Vale after fixes:vale
[Result: No errors remaining / X errors could not be auto-fixed]
## Notes
- Only error-level issues were addressed
- Warnings and suggestions were left for human review
- Changes preserve existing AsciiDoc structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"After processing all files, provide a summary:
Vale Error Fixing Summary
========================
Files processed: 3
PRs created: 2
Files with no errors: 1
Pull Requests:
1. PR #123: Fix Vale errors in install-cli.adoc
- Branch: vale-fix-install-cli-a7f3b2
- Errors fixed: 5
- URL: https://github.com/org/repo/pull/123
2. PR #124: Fix Vale errors in config-reference.adoc
- Branch: vale-fix-config-reference-d9e1f4
- Errors fixed: 3
- URL: https://github.com/org/repo/pull/124
Files with no errors:
- docs/guides/modules/toolkit/pages/troubleshooting.adocWhen fixing Vale errors, follow these principles:
Passive voice (Vale.Terms):
Oxford comma (circleci-docs.OxfordComma):
Heading punctuation (circleci-docs.HeadingsPunctuation):
Link text (circleci-docs.Link):
xref:guide.adoc[click here]xref:guide.adoc[Installation Guide]Gender bias (circleci-docs.GenderBias):
Hedging (circleci-docs.Hedging):
Contractions:
Spelling and capitalization:
Some errors require judgment:
Sentence restructuring: If fixing an error requires rewriting the sentence, preserve the original meaning while improving clarity
Technical accuracy: Never sacrifice technical accuracy for style. If a fix would make documentation incorrect, note it in the PR for human review
Context-dependent fixes: Some rules have exceptions. If you're unsure, include a note in the PR description explaining the decision
Multiple fixes per line: Apply all fixes in a single edit when multiple errors occur on the same line
If Vale itself fails:
.vale.ini exists and is validIf a file cannot be fixed:
If git operations fail:
gh CLI is authenticatedIf multiple files have identical names (in different directories):
vale-fix-toolkit-install-cli-a7f3b2Batch efficiently: Process multiple files, but keep PRs separate for easier review
Verify fixes: Always re-run Vale after making changes
Preserve formatting: Maintain AsciiDoc structure, indentation, and line breaks
Be specific: List exact errors fixed in commit messages and PR descriptions
Stay focused: Only fix Vale errors; don't make unrelated improvements
Handle errors gracefully: If automatic fixing fails, document why and suggest manual review
styles/circleci-docs/ and configured in .vale.ini.AGENTS.md.65ff472
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.