You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/vale-prose-review/SKILL.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: vale-prose-review
3
-
description: This skill should be used when the user asks to "run vale on this file", "lint this file with vale", "check this file with vale", "fix vale errors in this file", "review vale comments", "address vale suggestions", "clean up vale output", "fix vale linter output", "apply vale prose fixes", "resolve vale errors", or shares vale linter output and asks what to change.
3
+
description: This skill should be used when the user asks to "run vale on this file", "lint this file with vale", "check this file with vale", "fix vale errors in this file", "review vale comments", "address vale suggestions", "clean up vale output", "fix vale linter output", "apply vale prose fixes", "resolve vale errors", "run vale on my diff", "vale on changed lines", "vale on the Prerequisites section" (or any named section), or shares vale linter output and asks what to change.
4
4
version: 0.2.0
5
5
---
6
6
@@ -12,6 +12,32 @@ A workflow for running the vale prose linter on a documentation file and automat
12
12
13
13
Vale is a prose linter that reports issues at three severity levels — **error**, **warning**, and **suggestion** — along with a rule name. Not every flagged item needs to be changed. Use judgment to prioritize fixes that improve clarity without distorting meaning.
14
14
15
+
## Scoping the Review
16
+
17
+
By default, the review applies to the **whole file**. Two narrower scopes are supported — check whether the user has requested one before proceeding.
18
+
19
+
### Git diff scope (changed lines only)
20
+
21
+
**When to use:** The user asks to review only their edits, the git diff, or "what I changed".
22
+
23
+
1. Run `git diff <file_path>` (or `git diff HEAD <file_path>` if the file is already staged).
24
+
2. Parse the diff to collect the line ranges of added or modified content. Each hunk header looks like `@@ -old,count +new,start @@`. Walk the `+` lines to build a set of new-file line numbers. Unchanged context lines (`space`-prefixed) do not count; removed lines (`-`-prefixed) have no new-file line number.
25
+
3. Proceed through Steps 1–5 below, but **only act on vale flags whose line number falls within the collected set**. Skip flags on unchanged lines entirely.
26
+
27
+
If `git diff` returns no output (file is clean / no local changes), tell the user and fall back to whole-file mode.
28
+
29
+
### Section scope (named heading(s) only)
30
+
31
+
**When to use:** The user names one or more section headings (e.g., "only review the Prerequisites section").
32
+
33
+
1. Read the file and scan for Markdown headings (`#`, `##`, etc.) to build a list of `(heading_text, start_line)` pairs. A section ends at the next heading of equal or higher level (or end of file).
34
+
2. Match the user's requested heading(s) against that list (case-insensitive, partial match is fine).
35
+
3. Proceed through Steps 1–5 below, but **only act on vale flags whose line number falls within the matched section range(s)**. Skip flags outside those ranges.
36
+
37
+
If no heading matches, report the mismatch and list the available headings so the user can clarify.
38
+
39
+
---
40
+
15
41
## Workflow
16
42
17
43
### Step 1: Run vale (or use provided output)
@@ -29,6 +55,8 @@ The `--output=line` flag produces one flag per line in the format:
29
55
30
56
Read the target file before making any changes.
31
57
58
+
If a scope has been established (git diff or section), apply the line-range filter to the vale output now — discard any flag outside the allowed ranges before triaging.
@@ -83,6 +111,8 @@ See `references/vale-rules.md` for full fix patterns, before/after examples, and
83
111
84
112
**`Replicated.Passive`** — Convert passive to active: "can be used to [do X]" → "use [it] to [do X]". See the full pattern table in the reference file.
85
113
114
+
> **Deprecation caveat:** Vale frequently flags deprecation notices under `Replicated.Passive`. Do **not** rewrite them as "Replicated deprecated [feature]" — that phrasing sounds awkward. Instead, keep passive voice for deprecation notices: "Feature XYZ is deprecated" or "XYZ was deprecated in version N". This is one of the few cases where passive voice is preferred.
115
+
86
116
**`Replicated.SentenceLength`** — Split or condense sentences over ~26 words at natural break points (semicolons, "and also", between distinct ideas).
87
117
88
118
**`Replicated.PositionalLanguage`** — Replace "above/below" with "the following" or a section link; replace directional "right/left" with "the following" or a UI element name.
0 commit comments