From vale-tools
Runs Vale RedHat rules on PR/MR changed .adoc/.md files, detects false positives with 90%+ certainty by reading rule YAMLs, and creates PRs to update vale-at-red-hat repo.
npx claudepluginhub redhat-documentation/redhat-docs-agent-tools --plugin vale-toolsThis skill is limited to using the following tools:
Detect false positives in Vale RedHat rules by analyzing only the changed files in a PR/MR, then raise a PR against [vale-at-red-hat](https://github.com/redhat-documentation/vale-at-red-hat) to fix confirmed false positives.
Runs Vale linting on Markdown, AsciiDoc, reStructuredText, HTML, XML, and source code comments to detect style guide violations. Use for documentation linting, style checks, or validation.
Validates git changes against .hoyeon/rules/ checklists, reports PASS/WARN for missed cascading changes, and proposes new rules for unmatched patterns before push.
Runs Vale with AsciiDocDITA rules on AsciiDoc files in Red Hat modular docs repos (repo-wide or assembly/topic scope via dita-validate-asciidoc) and fixes violations for 0 errors/warnings.
Share bugs, ideas, or general feedback.
Detect false positives in Vale RedHat rules by analyzing only the changed files in a PR/MR, then raise a PR against vale-at-red-hat to fix confirmed false positives.
https://github.com/redhat-documentation/vale-at-red-hat (from the user's fork).Get the list of documentation files changed in the current branch compared to the base branch:
# Detect the base branch (main or master)
BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main")
# List changed adoc/md files only
git diff --name-only --diff-filter=ACMR "$BASE"...HEAD -- '*.adoc' '*.md'
If no changed documentation files are found, inform the user and stop.
Write a temporary config that uses only the RedHat style package:
cat <<-'EOF' > .work/update-rh-vale.ini
StylesPath = .vale/styles
MinAlertLevel = suggestion
Packages = RedHat
[*.adoc]
BasedOnStyles = RedHat
[*.md]
BasedOnStyles = RedHat
EOF
vale --config=.work/update-rh-vale.ini sync
vale --config=.work/update-rh-vale.ini --output=JSON <changed-files>
Parse the JSON output. If no alerts are found, inform the user and stop.
Before judging any alert, read the actual rule YAML file that triggered it. The rule files live in .vale/styles/RedHat/ (downloaded by vale sync).
For each unique rule that fired:
# Example: if the alert is from RedHat.TermsWarnings, read:
cat .vale/styles/RedHat/TermsWarnings.yml
Understand:
extends: The rule type (e.g., substitution, existence, occurrence, consistency)message: What the rule is checking forlevel: suggestion, warning, or errortokens or swap: The specific patterns or substitution pairs the rule matchesexceptions: Any existing exceptions already definedfilters: Any existing filter patternsThis understanding is critical for:
exceptions: list vs filters: pattern)For each unique Vale alert (deduplicated by rule + match text), determine whether it is a genuine style violation or a false positive.
Read the surrounding context (at least 5 lines before and after) from the source file to understand usage. Cross-reference with the rule YAML to understand exactly what the rule is checking and why it fired.
A false positive exists when:
swap or tokens list matches a term that has a different meaning in this technical domainNOT a false positive when:
message correctly identifies a real style issue in this contextAssign a confidence score (0-100%) to each determination. Only proceed with alerts scored at 90% or above as confirmed false positives.
Present a summary table:
| Rule | Match | Confidence | Determination |
|------|-------|------------|---------------|
| RedHat.Foo | "matched text" | 95% | False positive — valid product name |
| RedHat.Bar | "other text" | 72% | Uncertain — skipping |
If no false positives meet the 90% threshold, inform the user and stop.
Only proceed if the user confirms. The PR targets the user's fork of https://github.com/redhat-documentation/vale-at-red-hat.
Prerequisites (verify before proceeding):
redhat-documentation/vale-at-red-hatghgh CLI is authenticatedSteps:
vale-fp-fix-<short-description>.vale/styles/RedHat/:
substitution rules: add the term to exceptions:existence rules: add the term to exceptions: or refine tokens:consistency rules: adjust the swap: pairs or add exceptions:filters:: add a filter pattern to exclude the match.vale/fixtures/RedHat/redhat-documentation/vale-at-red-hat main branchPR template:
## False positives identified in <repo-name>
Analyzed changed files in PR/MR and identified the following false positives
with 90%+ certainty:
| Rule | Match | Confidence | Reason |
|------|-------|------------|--------|
| ... | ... | ...% | ... |
### Changes
- Updated rule files in `.vale/styles/RedHat/` to add exceptions
### How to verify
- Run Vale against the original files — the false positives should no longer trigger
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
brew install vale or dnf install vale)gh) configured and authenticatedredhat-documentation/vale-at-red-hat