Skip to content

Commit 664bc34

Browse files
wenshaoclaude
andcommitted
fix(review): fix broken nested code fence in comment template
Prettier mangled the nested code fences (4-backtick outer + 3-backtick suggestion inner). Replaced with plain-text numbered structure + indented example. Also fixed orphaned 4-backtick fence closing Step B. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1a93078 commit 664bc34

1 file changed

Lines changed: 15 additions & 18 deletions

File tree

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

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

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -403,28 +403,25 @@ 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-
````
407-
# Step A: Use write_file tool to create /tmp/qwen-review-{target}-comment.txt
408-
# The EXACT content must follow this template (do NOT rewrite the footer):
406+
**Step A**: Use `write_file` to create `/tmp/qwen-review-{target}-comment.txt`. The content MUST follow this exact structure:
409407

410-
{prefix} {issue description}
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.
411413

412-
```suggestion
413-
{replacement code that GitHub can apply with one click}
414-
````
414+
Example (single-line fix with suggestion block):
415415

416-
If the fix cannot be expressed as a direct line replacement (e.g., it spans
417-
multiple locations or requires new code), use a regular code block instead.
416+
**[Critical]** `findNextCjkWordEnd` returns `b.end` when `col < b.start`, skipping non-CJK text.
418417

419-
_— {{model}} via Qwen Code /review_
418+
```suggestion
419+
if (col < b.start) {
420+
return null;
421+
}
422+
```
420423

421-
````
422-
423-
Where `{prefix}` is one of: `**[Critical]**`, `**[Suggestion]**`, `**[Auto-fixed][Critical]**`, or `**[Auto-fixed][Suggestion]**`.
424-
425-
**Use `suggestion` code blocks** (supported by GitHub, GitLab, Gitea, etc.) whenever the fix is a direct replacement of the commented lines. This lets the PR author accept the fix with one click. Only fall back to regular code blocks when the fix cannot be expressed as a line replacement (e.g., spans multiple locations or adds new code).
426-
427-
⚠️ The footer `_— {{model}} via Qwen Code /review_` must appear **exactly as shown** — including the model name, "via", and "Qwen Code /review". Do NOT shorten, rephrase, or omit any part of it.
424+
_— glm-5.1 via Qwen Code /review_
428425

429426
```bash
430427
# Step B: Post single-line comment referencing the file:
@@ -444,7 +441,7 @@ gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
444441
-F line={end_line} \
445442
-f start_side="RIGHT" \
446443
-f side="RIGHT"
447-
````
444+
```
448445

449446
Repeat Steps A-B for each finding, overwriting the temp file each time. Clean up the temp file in Step 11.
450447

0 commit comments

Comments
 (0)