Get the FREE Ultimate OpenClaw Setup Guide →

pactkit-review

npx machina-cli add skill pactkit/claude-code-plugin/pactkit-review --openclaw
Files (1)
SKILL.md
1.3 KB

PactKit Review

Structured PR code review with severity-ranked findings.

When Invoked

  • Check Phase 4 (PR variant): When /project-check is given a PR number/URL.
  • Sprint Stage B: As part of automated QA in Sprint orchestration.

Severity Levels

LevelNameAction
P0CriticalMust block merge
P1HighShould fix before merge
P2MediumFix in PR or follow-up
P3LowOptional improvement

Protocol

1. PR Information

  • Fetch PR metadata: gh pr view $ARG --json title,body,author,baseRefName,headRefName,files
  • Fetch PR diff: gh pr diff $ARG
  • Extract STORY-ID from title/body if present.

2. Review Checklists

  • SOLID: SRP, OCP, LSP, ISP, DIP analysis on changed files.
  • Security: OWASP baseline (injection, auth, secrets, XSS, SSRF).
  • Quality: Error handling, performance, boundary conditions, logic correctness.

3. Report

## Code Review: PR $ARG
**Result**: APPROVE / REQUEST_CHANGES
### Issues
- [P0] [file:line] Description
- [P1] [file:line] Description
### Spec Alignment
- [x] R1: Implemented
- [ ] R2: Missing

CONSTRAINT: This skill is read-only. Do not modify code files.

Source

git clone https://github.com/pactkit/claude-code-plugin/blob/main/pactkit-plugin/skills/pactkit-review/SKILL.mdView on GitHub

Overview

PACTKit Review provides a structured PR code review using severity-ranked findings across SOLID design principles, security, and quality. It helps teams catch architectural flaws and vulnerabilities early before merging.

How This Skill Works

It fetches PR metadata and diff via gh pr commands, and extracts STORY-ID when present. It then runs SOLID, Security, and Quality checklists on changed files, assigns severity levels (P0-P3), and compiles a standardized report indicating approval status.

When to Use It

  • Triggered during PR checks (Check Phase 4) when /project-check is used with a PR number or URL.
  • Used in Sprint Stage B as part of automated QA in sprint orchestration.
  • Generates severity-ranked findings (P0–P3) to decide if a merge should be blocked or awaited.
  • Applies SOLID analysis (SRP, OCP, LSP, ISP, DIP) on changed files.
  • Runs OWASP-based security checks for common vulnerabilities (injection, auth, secrets, XSS, SSRF).

Quick Start

  1. Step 1: Invoke pactkit-review on the PR (gh pr view/diff to gather data).
  2. Step 2: Run the SOLID, Security, and Quality checklists on changed files.
  3. Step 3: Review the generated report and set status to APPROVE or REQUEST_CHANGES.

Best Practices

  • Anchor findings to severity levels: P0 blocks merge, P1 requires fix before merge.
  • Apply SOLID checks (SRP, OCP, LSP, ISP, DIP) on touched components.
  • Cross-check for OWASP security risks and sensitive data exposure.
  • Verify error handling, performance implications, and boundary conditions.
  • Treat the report as read-only guidance and provide actionable next steps in PR comments.

Example Use Cases

  • A PR introduces a critical null pointer path; P0 blocks merge until fixed.
  • Security-sensitive input handling flagged for XSS risk; remediation prioritized (P1).
  • Refactor triggers DIP improvement opportunities; suggested optimizations (P3).
  • Auth flow change reviewed; potential logic flaw flagged for fixes (P2).
  • Performance regression detected in a loop; optimization recommended (P2/P3).

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers