# Resolve PR Failures Until CI Passes

Pull request failures and scattered review feedback slow delivery. This skill investigates evidence, applies targeted fixes, and repeats checks until the branch is ready.

## Install

```bash
npx skillstore add davila7/iterate-pr
```

## Metadata

- Status: approved
- Slug: davila7-iterate-pr
- Skillstore revision: r2
- Version status: missing
- Tree hash: 43e6d3773ce9a189d79d740cbc0e395d620de9b799fca61f1f3925a539155221
- Author: davila7
- GitHub username: davila7
- License: MIT
- Repository: https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/sentry/iterate-pr
- Ref: c43861a65bb95efcae259cd161c9d6f4dc7eec6f
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 70
- Public page: https://skillstore.pages.dev/skills/davila7-iterate-pr
- Manifest: https://skillstore.pages.dev/api/skills/davila7-iterate-pr/manifest

## Capabilities

- Identifies the pull request associated with the current branch.
- Reads CI check states and waits for pending analysis checks.
- Collects human reviews, inline comments, conversation comments, and bot feedback.
- Inspects failed GitHub Actions logs before selecting a fix.
- Applies targeted fixes, commits changes, pushes the branch, and waits for CI.

## Use Cases

- Repair a Failing Feature PR: Trace failed checks, fix the responsible code, and monitor the next CI run.
- Process Review Feedback: Collect human and automated comments, validate each concern, and address only confirmed issues.
- Prepare a Release Branch: Verify required checks, investigate remaining failures, and report blockers before release approval.

## Prompt Templates

### Check Pull Request Health

```
Check the current pull request. Report failing or pending CI checks and summarize unresolved review feedback. Do not change files.
```

### Investigate Failed Checks

```
Investigate failed CI logs for the current pull request. Explain each root cause, then propose the smallest targeted fixes before editing.
```

### Address Valid Feedback

```
Address valid CI failures and review comments. Show planned files, make targeted changes, run relevant tests, then request approval before committing.
```

### Run a Controlled Iteration

```
Iterate until required checks pass. Validate feedback, make minimal fixes, test, and pause before each commit or push. Stop after three repeated failures.
```

## Limitations

- Requires an authenticated GitHub CLI installation.
- Operates on the current branch and its associated pull request.
- Can stage, commit, and push changes, so every diff requires review.
- Cannot guarantee resolution of flaky, unrelated, or infrastructure failures.

## Best Practices

- Review failed logs and relevant source before modifying code.
- Inspect repository status and diffs before staging any file.
- Request explicit approval before each commit and remote push.

## Anti Patterns

- Do not infer a root cause from a check name alone.
- Do not stage unrelated changes with a broad repository command.
- Do not repeat the same failed repair more than three times.

## Security Audit

- Audited at: 2026-07-23T15:18:22.755\+00:00
- Summary: Most static findings are false positives caused by Markdown backticks and code fences. The shell substitution performs a fixed local branch lookup without an injection path. A medium-risk workflow issue remains because the skill stages all changes and pushes without explicit approval.

## Stats

- Views: 207
- Downloads: 10
- Favorites: 0
- Popularity score: 0
