skills/gh-pr-review/SKILL.md
Review a GitHub Pull Request as a responsible project owner using the `gh` CLI. Use when the user provides a PR URL (e.g. https://github.com/ORG/REPO/pull/N) or a PR number for the current git repo (prefer upstream, else origin) and wants an owner-grade review document `review-N.md` written in Chinese with copy-pastable GitHub comments in English. Scope the review to lines changed by the PR (do not nitpick unrelated pre-existing code), but apply best practices and flag any clear bugs, security issues, or CI failures caused by the change.
npx skillsauth add samzong/samzong gh-pr-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate an owner-grade PR review. The review must be strict regarding correctness and safety while maintaining a gentle tone with contributors, and it must be scoped to the PR's diff. Produce review-<pr>.md, which includes a Chinese narrative and English comment snippets ready for pasting into GitHub.
gh is not installed THEN terminate execution and instruct the user to install and configure it.gh auth status fails OR repository access is missing THEN terminate execution and instruct the user to resolve authentication or permissions issues.Execute the following script:
bash skills/gh-pr-review/scripts/gh_pr_review.sh <PR_URL|PR_NUMBER>
# Example: bash skills/gh-pr-review/scripts/gh_pr_review.sh https://github.com/org/repo/pull/42
# Example: bash skills/gh-pr-review/scripts/gh_pr_review.sh 42
This action creates the directory .gh-pr-review/pr-<n>/ and a starter document review-<n>.md in the current working directory.
Artifacts produced:
pr.json: Contains metadata (title, author, base/head branches, head SHA).diff.patch: Contains the unified diff.changed-lines.json: Provides per-file hunk and new-side line mapping.checks.txt: Summarizes checks.failed-logs.txt: Contains failed workflow logs (best-effort collection).changed-lines.json to identify the affected subsystem (e.g., src/router/*, docs/*, tests/*).checks.txt and failed-logs.txt (if present).pyproject.toml, requirements*.txt, package.json, go.mod, Cargo.toml, toolchain files).review-<n>.md and complete the placeholders.Example:
In `src/auth/login.py:47`, the token is compared with `==` instead of `hmac.compare_digest`.
This opens a timing-attack vector on token validation.
Suggestion: replace with `hmac.compare_digest(token, expected)`.
All scripts are located under skills/gh-pr-review/scripts/ relative to the repository root.
gh_pr_review.sh: This is the entry point. It fetches PR metadata, diffs, checks, and logs, then invokes the two helper scripts, and finally outputs the review-<n>.md skeleton.parse_unified_diff.py: Maps diff hunks to new-side line numbers for scope enforcement.generate_review_md.py: Renders review-<n>.md using artifacts and a template.Reference: assets/ — This directory contains the review template and prompt fragments.
documentation
撰写微信公众号技术文章的结构化工作流。使用场景:用户要写一篇公众号文章、需要创建文章目录、组织素材、迭代草稿。强制遵循 blogs/wechat/README.md 的命名规范和目录结构。
tools
Cross-tool vibe coding profiler. Scans AI coding tool data on the machine (Claude Code sessions, OpenCode DB, Codex sessions), combined with git history and project memory, to build a true user portrait, discover workflow automation opportunities, and update the target tool's instruction file (CLAUDE.md or AGENTS.md) accordingly. Use when: "calibrate", "vibe-calibrate", "分析我的习惯", "profile me", "update my CLAUDE.md based on my history", "我的效率怎么提升", "analyze my patterns", "优化我的配置", or at the start of a long-term engagement with a new user.
development
Ruthless code simplifier: flatten abstractions, inline wrappers, remove unnecessary layers, delete dead code — without changing behavior. Use when: user says "simplify", "simplify this", "flatten", "inline", "too complex", "over-engineered", "remove abstraction", "unwrap", "reduce complexity", "make it simpler", "this is too complicated", or points at code that has unnecessary indirection. Does NOT change behavior, break public APIs, or remove meaningful error handling.
testing
Ship staged changes through a narrow release flow: auto-clean staged files, block unexpected non-i18n CJK additions, create or keep a branch, commit staged work, push, and open a pull request — all without confirmation. Use mainly when the user explicitly invokes `/ship` or says "ship it", "push and PR", or "commit and PR". Do not use for commit-only, push-only, PR-only, or existing-PR editing requests. All generated git and GitHub text must be in English.