Langsung ke konten
Skillpedia
Pemrograman umum29k ยท #9628

md-review

Fungsinya

Skill ini mengubah tulisan pull request markdown yang berisi diff dan callout tingkat keparahan menjadi tinjauan HTML. Skill ini untuk pengembang yang ingin tinjauan kode mudah dibaca dan dibagikan.

Kapan dipakai

  • โœ“Saat Anda punya tinjauan kode markdown dengan blok diff dan callout tingkat keparahan untuk dibagikan.
  • โœ“Saat Anda ingin diff dan komentar tinjauan ditampilkan berdampingan.
  • โœ“Saat tinjauan memerlukan nama peninjau di bagian footer.

Link skill

https://github.com/alirezarezvani/claude-skills/blob/main/markdown-html/skills/md-review/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/alirezarezvani/claude-skills/blob/main/markdown-html/skills/md-review/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œUbah tinjauan kode markdown ini dengan diff dan catatan tingkat keparahan menjadi halaman HTML dua kolom.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill mengurai diff menjadi hunk, melampirkan setiap catatan tingkat keparahan ke perubahan kode terdekat, dan merender halaman dengan menu lompat dan nama peninjau.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

md-review โ€” Code-review markdown โ†’ 2-column HTML

The code-review converter from Tier 2 of Shihipar's essay ("Code Review and PR Writeups"). Takes a markdown PR writeup with diff blocks + severity callouts and produces a single-file HTML review with a jump-nav, 2-column diff + annotation layout, and a named reviewer footer.

Three stdlib tools pipeline together:

diff_parser.py  โ†’  annotation_extractor.py  โ†’  review_html_renderer.py
   (md โ†’ diff hunks)   (md โ†’ severity-tagged    (hunks + annotations
                        annotations attached     + tokens โ†’ 2-col HTML)
                        to nearest hunk)

When to invoke

Symptom Action
markdown-html-orchestrator routes input as REVIEW Invoke this skill
User runs /cs-md-review <path>.md directly Invoke this skill
Input contains ```diff fenced blocks + > [!MAJOR]/> [!BLOCKER]/etc. callouts Invoke this skill
Input is a long-form spec / report (no diff blocks) Route to md-document instead
Input is a slide deck Route to md-slides instead
Input < 100 lines Refuse (Shihipar threshold)
Design-system not onboarded Refuse; surface /cs-design-system

Pipeline

# 1. Parse markdown โ†’ diff hunks JSON
python3 markdown-html/skills/md-review/scripts/diff_parser.py \
    --input <path>.md --output hunks.json

# 2. Extract severity-tagged annotations, attach to nearest preceding hunk
python3 markdown-html/skills/md-review/scripts/annotation_extractor.py \
    --input <path>.md --diff-blocks hunks.json --output annotations.json

# 3. Render 2-col HTML (--reviewer is mandatory โ€” refuses without)
python3 markdown-html/skills/md-review/scripts/review_html_renderer.py \
    --diff-blocks hunks.json --annotations annotations.json \
    --reviewer "Jane Doe" --title "PR #123: Add retry logic" \
    --output review.html

What gets rendered

  • Top jump-nav โ€” every annotation with severity badge + 80-char preview + jump link; severity counts in the heading ("3 BLOCKER ยท 2 MAJOR ยท 1 NIT")
  • 2-column hunk rows โ€” unified diff on the left (per-line old/new line numbers, +/โˆ’ marks, addition/deletion background tint from design-system tokens), annotation cards on the right (color + icon + aria-label per WCAG 1.4.1)
  • Approval bar โ€” if LGTM markers are present and no severity annotations, a success-tinted "LGTM โ€” no findings flagged" bar
  • General comments โ€” annotations not attached to any hunk render at the bottom in their own section
  • Reviewer footer โ€” mandatory; refuses to render without --reviewer
  • Responsive โ€” 2-col collapses to stacked on viewports < 900px

Hard rules

  1. --reviewer is mandatory. A code review must name a human reviewer. Refuses with exit 3 otherwise. Mirrors research-ops's "named owner" discipline.
  2. Refuses if no hunks present. No --- a/file + @@ ... @@ blocks means this isn't a code review โ€” refuses with exit 4 and recommends md-document.
  3. Refuses input < 100 lines. Markdown wins below the threshold (Shihipar).
  4. Refuses without onboarding. Same gate as every converter.
  5. Severity is never color-only. Each badge ships color + icon + aria-label + text. WCAG 1.4.1 enforced at the renderer level.
  6. Single-file output. All CSS inline. Only external is Google Fonts CSS. No Prism in md-review (diff coloring conflicts with syntax highlighting).
  7. Custom severity convention. --severity-convention "critical,important,suggestion,nit" swaps tier names; position 0 is most severe. Default is BLOCKER / MAJOR / MINOR / NIT (Google Code Review Developer Guide).

Forcing-question library (Matt Pocock grill discipline)

  1. Who is the named reviewer? Recommended: the user signing off on the review. Canon: research-ops named-owner pattern; SWE at Google ch. 9.
  2. Which severity convention applies โ€” default (BLOCKER/MAJOR/MINOR/NIT) or custom? Recommended: default unless your team has a documented alternative. Canon: Google Code Review Developer Guide.
  3. Are annotations anchored to specific hunks, or are some general? Recommended: anchor everything you can; general goes to the unanchored section. Canon: SWE at Google ch. 9 โ€” "Comments must reference a specific line".
  4. What's the PR title for the <title> and header? Recommended: the actual PR / commit title. Canon: docs-as-context-for-readers.
  5. Should LGTM markers ship as the approval bar? Recommended: yes if there are n
Pertanyaan umum

Apakah perlu nama peninjau?

Ya, skill mewajibkan nama peninjau yang ditampilkan di footer halaman.

Apa itu callout tingkat keparahan?

Yaitu catatan bertanda, seperti tag major atau blocker, yang menilai seberapa serius suatu masalah.

Bisakah menangani spesifikasi panjang tanpa diff?

Tidak. Spesifikasi tanpa blok diff dikirim ke konverter dokumen.

Detail

Deskripsi asli dari pembuat

Use when converting a markdown code review with diff blocks and severity callouts into a two-column HTML review. Parses diffs with diff_parser.py and annotations with annotation_extractor.py; requires a named reviewer.

repo: alirezarezvani/claude-skills

Popularitas

Bintang GitHub
29k
Peringkat
#9628
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa