sc-pr-fix
БесплатноЗапускает вложенные скриптыНе проверенCreate PR and iteratively fix CI failures with interactive confirmation. Automates branch creation, commit, push, PR creation, and CI monitoring until all…
Об этом скилле
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-fix
Behavioral 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,url
Poll 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 ESLi
Установить sc-pr-fix в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sc-pr-fix?
Create PR and iteratively fix CI failures with interactive confirmation. Automates branch creation, commit, push, PR creation, and CI monitoring until all checks pass.
Как установить скилл sc-pr-fix?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-pr-fix запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic