sc-pr-fix
Skill19 starsChanged 8 months agoMITView on GitHub
Create PR and iteratively fix CI failures with interactive confirmation. Automates branch creation, commit, push, PR creation, and CI monitoring until all checks pass.
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- kreighmitchell/SuperClaudeword for word, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 1
- kreighmitchell/SuperClaude★ 4100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-data-engineerSkill
- agent-fullstack-developerSkill
- agent-kubernetes-specialistSkill
- agent-ml-engineerSkill
- agent-performance-engineerSkill
- agent-react-specialistSkill
- agent-security-engineerSkill
- agent-technical-writerSkill
- ask-multiSkill
- askSkill
- learned-skills-indexSkill
- sc-analyzeSkill
- sc-brainstormSkill
- sc-buildSkill
- sc-cicd-setupSkill
- sc-code-reviewSkill
- sc-designSkill
- sc-documentSkill
- sc-e2eSkill
- sc-estimateSkill
- sc-evaluateSkill
- sc-explainSkill
- sc-gitSkill
- sc-implementSkill
- sc-improveSkill
- sc-log-fixSkill
- sc-mcpSkill
- sc-pr-checkSkill
- sc-principlesSkill
- sc-pushSkill
- sc-readmeSkill
- sc-researchSkill
- sc-tddSkill
- sc-testSkill
- sc-workflowSkill
- sc-worktreeSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create pull requests and interactively fix CI check failures until all pass.
- Distinctive: line 28
Validate: - Check git state, ensure changes exist
- Distinctive: line 29
Branch: - Create and checkout new branch
- Very specific: line 32
PR Create: - Create pull request via gh CLI
- Distinctive: line 40
Complete: - All checks pass or max attempts reached
- Very specific: line 80
Use --auto-fix to skip prompts for low-risk fixes (lint, formatting).
- Distinctive: line 118
Interactive confirmation: All structural changes require approval
- Distinctive: line 119
Never skip checks: Must fix or explicitly abort - no skipping
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR Fix Skill
Create pull requests and interactively fix CI check failures until all pass.
Quick Start
# Create PR from current changes
/sc:pr-fix "fix: resolve test failures" --branch fix/tests
# Dry run to preview
/sc:pr-fix "feat: new feature" --dry-run
# With custom PR details
/sc:pr-fix "chore: update deps" --title "Update dependencies" --body "Monthly update"
# Auto-fix low-risk issues
/sc:pr-fix "fix: lint errors" --auto-fixBehavioral Flow
- Validate - Check git state, ensure changes exist
- Branch - Create and checkout new branch
- Commit - Stage all changes and commit with provided message
- Push - Push branch to origin
- PR Create - Create pull request via
ghCLI - Monitor - Poll CI status at configured interval
- Fix Loop - For each failing check:
- Parse failure logs
- Propose fix (with PAL MCP assistance for complex issues)
- Prompt user for confirmation (interactive mode)
- Apply fix and push
- Re-monitor checks
- Complete - All checks pass or max attempts reached
Flags
| Flag | Type | Default | Description |
--branch | string | auto | New branch name (auto: pr-fix/<timestamp>) |
--base | string | main | Target branch for PR |
--title | string | commit msg | PR title |
--body | string | auto | PR description body |
--dry-run | bool | false | Preview operations without executing |
--auto-fix | bool | false | Auto-apply low-risk fixes, prompt only for high-risk |
--max-fix-attempts | int | 5 | Max CI fix iterations (hard cap: 5) |
--poll-interval | int | 30 | Seconds between CI status checks |
--no-push | bool | false | Create branch and commit but do not push/PR |
Interactive Mode
By default, the skill prompts before each fix:
================================================================================
CI Check Failed: build (lint) Attempt 2 of 5
================================================================================
Error Summary:
- src/component.ts:42:15 - Missing semicolon (semi)
- src/utils.ts:18:1 - Unexpected console statement (no-console)
Proposed Fix:
1. Add semicolon at src/component.ts:42
2. Remove console.log at src/utils.ts:18
Risk Level: LOW (auto-fixable lint errors)
--------------------------------------------------------------------------------
[A]pply fix [S]kip this check [V]iew full log [Q]uit
>Use --auto-fix to skip prompts for low-risk fixes (lint, formatting).
High-risk fixes (test changes, security, core logic) always prompt.
Risk Classification
| Level | Examples | Behavior |
| LOW | Lint errors, formatting, whitespace | Auto-fix if --auto-fix |
| MEDIUM | Test updates, documentation | Always prompt |
| HIGH | Core logic, security, API changes | Always prompt + PAL review |
Evidence Requirements
This skill requires evidence of successful operations:
- Git operations must succeed (branch created, pushed)
- PR creation must return valid PR URL
- CI status must be retrievable via
ghCLI - Fix attempts must show file diffs
Tool Coordination
- Bash - Git and
ghCLI execution - Read - Analyze failure logs and source code
- Edit - Apply fixes to source files
- AskUserQuestion - Interactive prompts for fix confirmation
- PAL MCP debug - Diagnose complex CI failures
- PAL MCP codereview - Validate fix quality before applying
MCP Integration
- PAL MCP debug - Root cause analysis for CI failures
- PAL MCP codereview - Review proposed fixes before applying
Safety Mechanisms
- Hard cap: Maximum 5 fix iterations (cannot be overridden)
- Stagnation detection: Same error 3 consecutive times = abort
- Oscillation detection: Fix-revert-fix pattern = abort
- Interactive confirmation: All structural changes require approval
- Never skip checks: Must fix or explicitly abort - no skipping
- Backup branch: Creates
backup/<branch>-<timestamp>before starting
CI Status Polling
The skill polls GitHub Actions check status using:
gh pr checks <pr_number> --json name,state,conclusion,urlPoll behavior:
- Initial wait: 10 seconds after push (allow CI to start)
- Poll interval:
--poll-intervalseconds (default: 30) - Timeout: 10 minutes for checks to complete
- Handles pending, queued, in_progress, and completed states
Failure Log Parsing
Supported CI output formats:
- ESLint/TSLint JSON format
- pytest output with tracebacks
- ruff/flake8 format
- Jest/Vitest output format
- Generic error patterns (
error:,ERROR,failed) - GitHub Actions annotations
Examples
Basic PR Creation with Fix Loop
/sc:pr-fix "fix: resolve ESLint errors"Output:
Creating branch: pr-fix/20240115-143022
Committing: fix: resolve ESLint errors
Pushing to origin...
Creating PR #42: fix: resolve ESLint errors
Monitoring CI checks...
- lint: pending
- test: pending
[30s later]
- lint: failed
- test: passed
Parsing lint failures...
Found 2 errors in 1 file.
================================================================================
CI Check Failed: lint Attempt 1 of 5
================================================================================
...
[A]pply fix [S]kip [V]iew log [Q]uit
> a
Applying fix...
Pushing fix commit...
Monitoring CI checks...
- lint: passed
- test: passed
All checks passed! PR #42 is ready for review.
PR URL: https://github.com/owner/repo/pull/42Feature PR with Details
/sc:pr-fix "feat: add user dashboard" \
--branch feat/user-dashboard \
--title "Add User Dashboard Component" \
--body "Implements user dashboard as per spec #42"Preview Mode
/sc:pr-fix "refactor: cleanup utils" --dry-runOutput:
[DRY RUN] Would execute:
1. git checkout -b pr-fix/20240115-143022
2. git add -A
3. git commit -m "refactor: cleanup utils"
4. git push -u origin pr-fix/20240115-143022
5. gh pr create --base main --title "refactor: cleanup utils"
6. Monitor CI and fix failures interactively
No changes made.Auto-Fix Low-Risk Issues
/sc:pr-fix "fix: formatting" --auto-fixWith --auto-fix, LOW risk fixes (lint, formatting) are applied automatically.
MEDIUM and HIGH risk fixes still prompt for confirmation.
Termination Conditions
The fix loop terminates when:
| Condition | Exit Status | Message |
| All checks pass | SUCCESS | "All checks passed! PR ready for review." |
| Max attempts (5) | FAILED | "Max fix attempts reached. Manual intervention required." |
| Stagnation (3x same error) | FAILED | "Same error persists after 3 attempts. Aborting." |
| User quits | ABORTED | "Fix loop aborted by user." |
| CI timeout | TIMEOUT | "CI checks did not complete within timeout." |
Commit Message Format
Fix commits follow Conventional Commits:
fix(ci): resolve <check_name> failures
- <description of fix 1>
- <description of fix 2>
Automated fix by sc-pr-fix skillScripts
This skill uses Python helper scripts in scripts/:
check_pr_status.py- Poll PR check status viagh pr checksparse_check_failures.py- Parse CI failure logs to extract errorsfix_orchestrator.py- Coordinate fix loop with safety mechanisms
Error Handling
| Scenario | Behavior |
| No git repo | Exit with error message |
| Dirty working tree | Prompt: stash, commit, or abort |
| Branch already exists | Prompt for different name |
| Push fails | Check permissions, offer retry |
| PR creation fails | Show gh CLI error, suggest manual |
| CI timeout | Report status, offer to continue monitoring |
| Parse failure | Fall back to raw log display |
| Fix application fails | Increment attempt counter, continue loop |
| User aborts | Clean exit with status summary |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

