← ClaudeAtlas

pr-validitylisted

PR validity analysis: fetch PR diff, extract new code additions, search existing codebase for duplicate or overlapping implementations, classify changes, and create a structured GitHub issue.
rube-de/cc-skills · ★ 10 · Code & Development · score 75
Install: claude install-skill rube-de/cc-skills
# DLC: PR Validity Analysis Detect duplicate or redundant code introduced by a PR. Read-only analysis — no code modifications. Before running, **read [../dlc/references/ISSUE-TEMPLATE.md](../dlc/references/ISSUE-TEMPLATE.md) now** for the issue format, and **read [../dlc/references/REPORT-FORMAT.md](../dlc/references/REPORT-FORMAT.md) now** for the findings data structure. ## Step 1: Resolve Target PR Determine the PR to check and fetch **all** data needed for subsequent steps in a single call: ```bash # If PR number provided as argument PR_JSON=$(gh pr view <PR_NUMBER> --json number,title,url,headRefName,state,additions,changedFiles,files,body) # If no argument — detect from current branch PR_JSON=$(gh pr view --json number,title,url,headRefName,state,additions,changedFiles,files,body) # Display PR summary echo "$PR_JSON" | jq '{number, title, url, headRefName, state, additions, changedFiles}' ``` If no open PR is found, abort with: "No open PR found for the current branch. Push your changes and open a PR first." ### PR Description Quality Check Extract `.body` from `PR_JSON` and evaluate against a minimal structure rubric: | # | Missing Element | Severity | Type | Message | |---|-----------------|----------|------|---------| | 1 | PR body is empty or < 50 chars | **High** | `pr-description` | "PR has no meaningful description — reviewers need context" | | 2 | No summary section heading — any Markdown heading level (`#`–`######`) containing `Summary`, `What`, `Cha