Skip to content

Commit ab72b5e

Browse files
wenshaoclaude
andcommitted
fix(review): simplify comment template — example-first, rules after
Replaced 5 numbered rules + example with example-first format. LLMs pattern-match from examples better than parsing rules. Rules condensed to 2 sentences after the example. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 664bc34 commit ab72b5e

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

  • packages/core/src/skills/bundled/review

packages/core/src/skills/bundled/review/SKILL.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,7 @@ If a finding was auto-fixed in Step 8, prefix its comment with **[Auto-fixed]**
403403

404404
Do **not** post low-confidence findings as PR inline comments — they appear only in the terminal output under "Needs Human Review." This keeps PR comments high-signal.
405405

406-
**Step A**: Use `write_file` to create `/tmp/qwen-review-{target}-comment.txt`. The content MUST follow this exact structure:
407-
408-
1. First line: the prefix — one of `**[Critical]**`, `**[Suggestion]**`, `**[Auto-fixed][Critical]**`, or `**[Auto-fixed][Suggestion]**` — followed by the issue description.
409-
2. Then a blank line.
410-
3. Then the suggested fix. **Use a `suggestion` code block** (supported by GitHub, GitLab, Gitea, etc.) whenever the fix is a direct replacement of the commented lines — this lets the PR author accept it with one click. If the fix spans multiple locations or adds new code, use a regular code block instead.
411-
4. Then a blank line.
412-
5. Last line: the footer `_— {{model}} via Qwen Code /review_` — copy this EXACTLY, do NOT shorten or rephrase.
413-
414-
Example (single-line fix with suggestion block):
406+
**Step A**: Use `write_file` to create `/tmp/qwen-review-{target}-comment.txt` following this exact format:
415407

416408
**[Critical]** `findNextCjkWordEnd` returns `b.end` when `col < b.start`, skipping non-CJK text.
417409

@@ -421,7 +413,9 @@ Example (single-line fix with suggestion block):
421413
}
422414
```
423415

424-
_— glm-5.1 via Qwen Code /review_
416+
_— {{model}} via Qwen Code /review_
417+
418+
Rules: prefix is `**[Critical]**` or `**[Suggestion]**` (or `**[Auto-fixed][...]**`). Use ` ```suggestion ` blocks for one-click fixes (GitHub/GitLab/Gitea); regular code blocks if fix spans multiple locations. Footer must be copied exactly — do NOT rephrase.
425419

426420
```bash
427421
# Step B: Post single-line comment referencing the file:

0 commit comments

Comments
 (0)