MCPInstall

sc-pr-check

Run all local CI checks before creating a PR with interactive failure remediation. Use when validating code quality before pull requests, running pre-flight checks, or fixing CI failures locally.

Installs
67
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/tony363/superclaude --skill sc-pr-check
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads sc-pr-check automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Pre-PR Check Skill

Run comprehensive local CI checks before PR creation. Auto-detects project tooling, runs all checks, and offers interactive fixes on failure.

Quick Start

# Run all detected checks
/sc:pr-check

# Run specific check categories
/sc:pr-check --only lint,test

# Quick mode - skip slow checks (e2e, security)
/sc:pr-check --quick

# Fix mode - auto-fix what's possible
/sc:pr-check --fix

# Dry run - show what would be checked
/sc:pr-check --dry-run

Behavioral Flow

  1. Detect - Identify project tooling (language, linter, formatter, test runner, security scanner)
  2. Plan - Build check sequence based on detected tools
  3. Execute - Run checks sequentially, streaming output
  4. Remediate - On failure, offer interactive fixes per check type
  5. Re-run - After fixes, re-run all checks until green or user stops
  6. Report - Summary of results and fixes applied

Flags

FlagTypeDefaultDescription
--onlystringallComma-separated: lint, format, test, security, types, e2e, build
--quickboolfalseSkip slow checks (e2e, security scan)
--fixboolfalseAuto-fix fixable issues without prompting
--dry-runboolfalseShow detected checks without running
--strictboolfalseTreat warnings as errors

Phase 1: Project Tooling Detection

Auto-detect the project's tooling by examining config files and package manifests.

Detection Matrix

Check TypePythonJavaScript/TypeScriptGoRust
Linterruff, flake8, pylinteslint, biomegolangci-lintclippy
Formatterruff format, blackprettier, biomegofmtrustfmt
Typesmypy, pyrighttsc(built-in)(built-in)
Testspytest, unittestjest, vitest, mochago testcargo test
Securitybandit, pip-auditnpm audit, snykgovulncheckcargo audit
Build-tsc, vite buildgo buildcargo build
E2E-playwright, cypress--

Detection Strategy

# Python detection
[ -f "pyproject.toml" ] || [ -f "setup.py" ] || [ -f "requirements.txt" ]

# JavaScript/TypeScript detection
[ -f "package.json" ] || [ -f "tsconfig.json" ]

# Go detection
[ -f "go.mod" ]

# Rust detection
[ -f "Cargo.toml" ]

# Check for specific tools in config files
grep -q "ruff" pyproject.toml 2>/dev/null      # Ruff
[ -f ".eslintrc*" ] || grep -q "eslint" package.json 2>/dev/null  # ESLint

Detection Output

## Project Tooling Detected

| Category | Tool | Config | Status |
|----------|------|--------|--------|
| Language | Python 3.12 | pyproject.toml | OK |
| Linter | Ruff | pyproject.toml [tool.ruff] | OK |
| Formatter | Ruff Format | pyproject.toml [tool.ruff] | OK |
| Type Check | mypy | pyproject.toml [tool.mypy] | OK |
| Tests | pytest | pyproject.toml [tool.pytest] | OK |
| Security | bandit | .bandit | OK |
| E2E | playwright | playwright.config.ts | OK |

Running 7 checks...

Phase 2: Check Execution

Run checks in dependency order:

StepCheckRationale
1LinterCatch syntax/style errors first (fastest)
2FormatterEnsure consistent formatting
3Type checkerCatch type errors before runtime
4Unit/Integration testsVerify correctness
5Security scanCatch vulnerabilities
6BuildVerify compilation
7E2E testsFull integration (slowest, skipped with --quick)

Execution Pattern

For each check:

  1. Display step number and check name: [1/7] Running Ruff linter...
  2. Execute the command with timeout
  3. Capture exit code and output
  4. On success: show green checkmark, move to next
  5. On failure: enter remediation flow

Phase 3: Interactive Remediation

When a check fails, identify the failure type and offer targeted fixes.

Lint Failures

[1/7] Ruff linter... FAILED (3 errors)

  src/api/routes.py:15:1 F401 unused import
  src/models/user.py:8:5 E712 comparison to True
  src/utils/helpers.py:22:80 E501 line too long

Actions:
  [f] Auto-fix with `ruff check . --fix` (fixes 2 of 3)
  [m] Manually fix remaining issues
  [s] Skip and continue
  [q] Quit

Test Failures

[4/7] Tests... FAILED (2 failures)

  FAILED tests/test_api.py::test_create_user - AssertionError
  FAILED tests/test_auth.py::test_login_expired - TimeoutError

Actions:
  [a] Analyze and fix failing tests
  [r] Re-run failed tests only
  [s] Skip and continue
  [q] Quit

Security Failures

[5/7] Security scan... FOUND 2 issues

  HIGH: SQL injection risk in src/api/users.py:45 (B608)
  LOW:  Assert used in production code src/utils/debug.py:12 (B101)

Actions:
  [a] Analyze and remediate issues
  [i] Show details for each finding
  [s] Skip and continue
  [q] Quit

Fix Type Reference

CheckAuto-fixableManual Fix Needed
LintMost style issuesLogic errors, unused code decisions
FormatAll formattingNone
TypesNoneType annotations, casts
TestsSome assertion fixesLogic bugs, mock updates
SecuritySome patternsArchitecture changes
BuildDependency installsCode errors
E2ESelector updatesFlow changes

Phase 4: Re-run After Fixes

After applying any fix:

  1. Re-run all checks (not just the failed one)
  2. Continue the fix loop until all pass or user quits
  3. Track all fixes applied during the session

Phase 5: Results Report

## PR Check Results

**Status**: ALL PASSED | X FAILED
**Duration**: Ns

### Check Results

| Step | Check | Status | Duration |
|------|-------|--------|----------|
| 1/7 | Ruff linter | PASSED | 1.2s |
| 2/7 | Ruff formatter | PASSED | 0.8s |
| 3/7 | Type check | PASSED | 3.4s |
| 4/7 | Tests (48 passed) | PASSED | 12.1s |
| 5/7 | Security scan | PASSED | 2.3s |
| 6/7 | Build | PASSED | 5.6s |
| 7/7 | E2E tests | SKIPPED | --quick |

### Fixes Applied (if any)
- Auto-fixed 3 lint errors (ruff --fix)
- Fixed test assertion in test_create_user
- Remediated B608 SQL injection in users.py

### Next Steps
- Run `/sc:git commit` to commit changes
- Run `/sc:readme` to update documentation
- Create PR with `gh pr create`

MCP Integration

PAL MCP

ToolWhen to UsePurpose
mcp__pal__debugTest failuresRoot cause analysis for failing tests
mcp__pal__codereviewSecurity findingsValidate security remediation
mcp__pal__precommitFinal validationMulti-model pre-commit check

PAL Usage Patterns

# Pre-commit validation after all checks pass
mcp__pal__precommit(
    path="/path/to/repo",
    step="Validating all changes before PR",
    findings="Lint, test, security, type check results",
    confidence="high"
)

# Debug complex test failure
mcp__pal__debug(
    step="Investigating intermittent test failure in test_auth",
    hypothesis="Race condition in async test setup",
    confidence="medium"
)

Rube MCP

ToolWhen to UsePurpose
mcp__rube__RUBE_MULTI_EXECUTE_TOOLNotificationsPost results to Slack, update Jira

Tool Coordination

  • Bash - Execute linters, formatters, test runners, security scanners
  • Glob - Detect config files for tooling identification
  • Grep - Parse failure output, find config patterns
  • Read - Read failing test files, security findings
  • Edit - Apply auto-fixes

Related Skills

  • /sc:test - Detailed test execution and coverage
  • /sc:log-fix - Debug from log analysis
  • /sc:git - Git workflow operations
  • /sc:analyze - Deeper code quality analysis

FAQ

What does the sc-pr-check skill do?

Run all local CI checks before creating a PR with interactive failure remediation. Use when validating code quality before pull requests, running pre-flight checks, or fixing CI failures locally.

How do I install sc-pr-check?

Run npx skills add https://github.com/tony363/superclaude --skill sc-pr-check in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/sc-pr-check/ (personal) or .claude/skills/sc-pr-check/ (project).

Which AI agents can use sc-pr-check?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is sc-pr-check safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains sc-pr-check?

It is published by tony363 in tony363/superclaude. It has 67 recorded installs.

More from tony363/superclaude

View all →

agent-performance-engineer

tony363/superclaude

Expert performance engineer specializing in system optimization, bottleneck identification, and scalability engineering. Masters performance testing, profiling, and tuning across applications, databases, and infrastructure with focus on achieving optimal response times and resource efficiency.

agent-security-engineer

tony363/superclaude

Expert infrastructure security engineer specializing in DevSecOps, cloud security, and compliance frameworks. Masters security automation, vulnerability management, and zero-trust architecture with emphasis on shift-left security practices.

Security392 installs

sc-estimate

tony363/superclaude

Provide development estimates for tasks, features, or projects with intelligent analysis. Use when planning timelines, assessing complexity, or scoping resources.

agent-fullstack-developer

tony363/superclaude

End-to-end feature owner with expertise across the entire stack. Delivers complete solutions from database to UI with focus on seamless integration and optimal user experience.

Frontend & Design154 installs

sc-design

tony363/superclaude

Design system architecture, APIs, and component interfaces with comprehensive specifications. Use when planning architecture, designing APIs, creating component interfaces, or modeling databases.

Frontend & Design113 installs

agent-technical-writer

tony363/superclaude

Expert technical writer specializing in clear, accurate documentation and content creation. Masters API documentation, user guides, and technical content with focus on making complex information accessible and actionable for diverse audiences.

Docs & Writing108 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.