pr-validity
Installation
SKILL.md
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 now for the issue format, and read ../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:
# 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)
# Fetch repo identifier (used in Step 6 for issue creation)
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)