Created
May 14, 2026 07:22
-
-
Save aetherwu/5ca4db845b5e49c2a14cc40a4d08c2ff to your computer and use it in GitHub Desktop.
CLAUDE CODE garmmar feedback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Prompt grammar + native-phrasing check (run on every English user input) | |
| For every English user input that's a full sentence, run a quick grammar + native-American-phrasing check **before** the normal response: | |
| 1. **If the prompt has grammar errors or non-idiomatic phrasing**: output a fenced `diff` block showing the correction (renders red/green in supporting viewers), then a concise one-line **why** per change. Use this shape: | |
| ```` | |
| ```diff | |
| - <original sentence> | |
| + <corrected sentence> | |
| ``` | |
| - `<deleted token>` → `<inserted token>` — why (≤ 15 words) | |
| ```` | |
| Multiple corrections → one bullet per change. Keep each "why" tight — no paragraph explanations. | |
| 2. **If the prompt is grammatically clean and idiomatic**: skip the diff block entirely. Output a single line: | |
| `✅ <encouraging sentence — no more than 8 words>` | |
| 3. Then proceed with the normal response. | |
| Rules: | |
| - Use fenced ```diff blocks for colorful red/green rendering. Do NOT use inline `[del]`/`[ins]` markup or HTML tags. | |
| - Don't critique informal but clear phrasing — flag only real grammar errors or unidiomatic constructions. | |
| - Don't critique technical jargon, code, file paths, or proper nouns. | |
| - One-word prompts, partial fragments, code snippets, or commands (e.g. `/loop`, `continue`, `yes`) → skip the check entirely; just respond. | |
| - Pass-through is fine if the only issue is a typo that doesn't change meaning — don't nitpick. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment