| name | grammar-checker |
| description | Grade text for grammar quality and correctness. Detects em dashes, sentence fragments, subject/verb disagreement, tense inconsistency, passive voice overuse, pronoun ambiguity, punctuation errors, and more. Outputs a letter grade (A–F) and auto-fails (F) on em dashes or sentence fragments. Use when proofreading, reviewing drafts, checking writing quality, or grading text. |
Grammar Checker
Analyze text for grammar issues. Output a letter grade (A–F). Auto-fail (grade F) if any em dashes or sentence fragments are found.
Input
$TEXT: The text to grade (provided by the user, or read from a file)
$CONTEXT (optional): Purpose/audience of the text, to calibrate tone expectations
Process
1. Scan for Auto-Fail Issues
Check for these FIRST. If any are found, the grade is F regardless of other quality.
Em dashes (—, –, or -- used as em dashes):
- Any occurrence of
— (U+2014), – (U+2013 used as em dash), or -- fails.
- Fix: Rewrite using commas, colons, semicolons, parentheses, or separate sentences.
Sentence fragments:
- A sentence that lacks a subject, a main verb, or a complete thought.
- Acceptable exceptions: intentional single-word answers ("Yes."), imperative sentences ("Run the tests."), or headings/titles.
- Fix: Combine with an adjacent sentence or add the missing subject/verb.
2. Scan for Graded Issues
Check for all issues in the categories below. See references/error-categories.md for detailed examples of each.
| Category | Issues |
|---|
| Subject/verb agreement | Singular/plural mismatch, collective noun errors |
| Tense consistency | Unexplained tense shifts within a paragraph |
| Pronoun clarity | Ambiguous "it", "this", "they" references |
| Punctuation | Missing commas, apostrophes, semicolon misuse, comma splices |
| Passive voice | Overuse (>30% of sentences) when active is clearer |
| Redundancy | Repeated ideas, synonymous phrases back-to-back |
| Modifier placement | Dangling or misplaced modifiers |
| Parallelism | Broken parallel structure in lists or comparisons |
| Wordiness | Phrases that can be shortened without losing meaning |
| Tone inconsistency | Mixing formal/casual registers in the same piece |
3. Grade
Calculate the grade based on issue density (issues per 100 words):
| Grade | Criteria |
|---|
| F | Any em dash or sentence fragment found (auto-fail), OR >8 issues per 100 words |
| D | 5–8 issues per 100 words |
| C | 3–4.99 issues per 100 words |
| B | 1–2.99 issues per 100 words |
| A | <1 issue per 100 words |
Half-grades (+/−) may be used at discretion within each band.
Output Format
## Grade: [LETTER]
**Word count**: [N]
**Issues found**: [N] ([N per 100 words])
If auto-fail triggered:
### Auto-Fail Issues
- [Type]: "[quoted text]" — [location]. Fix: [suggestion]
Then always:
### Issues by Category
#### [Category Name] ([count])
- **[Location]**: "[quoted text]" → [fix]. [brief rationale]
### Top 3 Priority Fixes
1. [Most impactful fix]
2. [Second most impactful]
3. [Third most impactful]
Guidelines
- Quote the problematic text directly — do not paraphrase.
- Give a concrete fix for every issue, not just a description.
- Do not rewrite the full text. Suggest targeted fixes only.
- Be specific: "Ambiguous pronoun 'it' could refer to the API or the vendor" not "unclear pronoun."
- Leave intentional style choices alone (rhetorical fragments in creative writing are still auto-fail in this skill — the rule is strict).
- Keep rationales to one sentence.