fix-develop
Autonomous fix loop for failing CI on the repo's default branch
Skill by bjcoombs
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/bjcoombs-fix-develop
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/fix-develop
What's inside
- Skill name
fix-develop- Description
- Autonomous fix loop for failing CI on the repo's default branch
- License
- Apache-2.0
- Instructions
- 159 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Fix Default Branch
Assess failing CI on the repo's default branch (main / develop / etc., or nightly build), create a worktree with a fix, push a PR, and loop until CI passes and review comments are addressed.
**Usage**: `/fix-develop [repo-path]` - defaults to current repo context. (Command name is historical; works on whichever branch the repo treats as default.)
---
## Step 1: Assess Default Branch Health
```bash
set -euo pipefail
# Identify the repo
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "")
REPO_NAME=$(basename "$REPO_ROOT")
ORG=$(gh repo view --json owner --jq '.owner.login')
REPO=$(gh repo view --json name --jq '.name')
DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
# Fail fast if any of the above came back empty (wrong pane, no gh auth, not a repo)
: "${REPO_ROOT:?Not inside a git repo — re-run from the target repo}"
: "${ORG:?gh repo view returned no owner — check gh auth and current directory}"
: "${REPO:?gh repo view returned no name — check gh auth and current directory}"
: "${DEFAULT_BRANCH:?gh repo view returned no defaultBranchRef — check gh auth}"
# Get latest CI status on the default branch
gh api repos/$ORG/$REPO/commits/$DEFAULT_BRANCH/status --jq '{state: .state, total: .total_count}'
# Get failing workflow runs on the default branch
gh run list --branch $DEFAULT_BRANCH --status failure --limit 5 --json databaseId,name,conclusion,createdAt \
| jq '.[] | {id: .databaseId, name, conclusion, created: .createdAt}'
```
If the default branch is green, report "$DEFAULT_BRANCH is healthy, nothing to fix" and STOP.
## Step 2: Diagnose Failures
```bash
# For each failing run, get the failed jobs and logs
RUN_ID=<from step 1>
gh run view $RUN_ID --json jobs | jq '.jobs[] | select(.conclusion == "FAILURE") | {name, conclusion}'
gh run view $RUN_ID --log-failed 2>&1 | tail -100
```
**Categorize failures:**
- **Test failures** - read the failing test + source code to understand root cause
- **Lint/build errors** - read the offending file at the reported line
- **Flaky/infrastructure** - check if the same test passed on a recent re-run. If so, report as flaky (not actionable) and STOP
- **Dependency issues** - check if a dependency update broke something
Report diagnosis to user before proceeding:
```
## Default Branch Diagnosis
Branch: <DEFAULT_BRANCH>
Failing runs: <list>
Root cause: <assessment>
Proposed fix: <plan>
Proceeding to create fix PR...
```
## Step 3: Create Worktree and Fix
```bash
set -euo pipefail
: "${ORG:?ORG unset — re-run Step 1 to derive repo identity}"
: "${REPO:?REPO unset — re-run Step 1 to derive repo identity}"
: "${DEFAULT_BRANCH:?DEFAULT_BRANCH unset — re-run Step 1 to derive repo identity}"
# From repo-main (sacred, always on default branch)
cd ~/dev/github.com/$ORG/$REPO/$REPO-main
git checkout $DEFAULT_BRANCH && git pull origin $DEFAULT_BRANCH
# Create fix branch and worktree (slug the default branch in case it contains '/')
DEFAULT_BRANCH_SLUG="${DEFAULT_BRANCH//\//-}"
BRANCH_NAME="fix-${DEFAULT_BRANCH_SLUG}-$(date +%Y%m%d)-$(echo '<brief-description>' | tr ' ' '-')"
git branch $BRANCH_NAME
git worktree add ../worktree/$BRANCH_NAME $BRANCH_NAME
cd ../worktree/$BRANCH_NAME
```
Implement the fix. Keep changes minimal - fix the failing tests/build only. Do not refactor, do not improve, do not clean up.
```bash
# Commit and push
git add <specific-files>
git commit -m "fix: <description of what was failing and why>"
git push -u origin $BRANCH_NAME
# Create PR targeting the default branch
gh pr create --base $DEFAULT_BRANCH --title "fix: Resolve failing CI on $DEFAULT_BRANCH" --body "$(cat <<'EOF'
## Summary
- <What was failing>
- <Root cause>
- <What this PR fixes>
## Evidence
- Failing run: <link>
- Error: <brief>
EOF
)"
```
## Step 4: Loop Until Green
Use the pr-review-merge skill to drive the fix PR to merge-ready, passing `$PR` and
`$DEFAULT_BRANCH` and the project's bot rules. It owns the CI/threads/conversation checks
and the positive-jq-filter pitfalls.
---
## Protocol
1. **Autonomous Loop** - no permission needed between iterations:
- Check CI + comments, fix, push
- Report: "Iteration N: Fixed X issues" or "Iteration N: Waiting for CI"From bjcoombs/ai-native-toolkit, Apache-2.0.
More from bjcoombs/ai-native-toolkit
- 0.657score
skill-forge
bjcoombs
Harden a skill or any agent instruction file (CLAUDE.md, AGENTS.md, GEMINI.md, .cursor/rules, .github/copilot-instructions.md) through judge-panel refinement…
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
ghsync
bjcoombs
Bulk clone and keep in sync every GitHub repo you can access across an org or personal account.
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
deslop
bjcoombs
Detect and remove the telltale signs of AI-generated 'slop' from any written text - articles, reports, emails, essays, bios, marketing copy, documentation…
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
ghreport
bjcoombs
Read-only org repo state report.
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
ab-equivalence
bjcoombs
Compare two versions of an LLM-directed document - an original (teacher) and a candidate (student) - across a transfer set and return a per-case…
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
assess
bjcoombs
Assess a codebase's readiness for AI agent contributors using the layered contract model, and generate a complexity hotspot SVG treemap (size = LOC, hue =…
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
semantic-compress
bjcoombs
Make an LLM-directed document smaller while preserving what it does.
SkillAFreshness: A★ 32Claude Code +9 - 0.648score
pr-review-merge
bjcoombs
Drive a single pull request to merge-ready across all six criteria (sync, CI, inline comments, conversation, threads, bot re-review of the head commit), then…
SkillAFreshness: A★ 32Claude Code +9 - 0.648score
assess-pr
bjcoombs
The /assess end-of-run offers - open a PR with the report, track the Top 3 Actions in the user's issue tracker, freeze the assessment into a CI gate, and file…
SkillAFreshness: A★ 32Claude Code +9 - 0.646score
understand
bjcoombs
Deep understanding mode (nemawashi) - exhaustive context-gathering before action
SkillAFreshness: A★ 32Claude Code +9 - 0.646score
tm-marathon-config-example
bjcoombs
Example Marathon Configuration for CLAUDE.md - copy the section below into your project's CLAUDE.md
SkillAFreshness: A★ 32Claude Code +9 - 0.646score
fix-pr
bjcoombs
Autonomous PR fixing loop - iterates on CI failures and review comments until green
SkillAFreshness: A★ 32Claude Code +9
Signals
- Stars
- 32
- Forks
- 5
- Open issues
- 7
- Last commit (this folder)
- Oct 8, 2026 (21 days ago)
- Last release
- Oct 11, 2026 (19 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/bjcoombs/ai-native-toolkit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from bjcoombs
- 0.657score
ghsync
bjcoombs
Bulk clone and keep in sync every GitHub repo you can access across an org or personal account.
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
ghreport
bjcoombs
Read-only org repo state report.
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
ab-equivalence
bjcoombs
Compare two versions of an LLM-directed document - an original (teacher) and a candidate (student) - across a transfer set and return a per-case…
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
assess
bjcoombs
Assess a codebase's readiness for AI agent contributors using the layered contract model, and generate a complexity hotspot SVG treemap (size = LOC, hue =…
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
deslop
bjcoombs
Detect and remove the telltale signs of AI-generated 'slop' from any written text - articles, reports, emails, essays, bios, marketing copy, documentation…
SkillAFreshness: A★ 32Claude Code +9 - 0.657score
semantic-compress
bjcoombs
Make an LLM-directed document smaller while preserving what it does.
SkillAFreshness: A★ 32Claude Code +9
Cite this page
fix-develop skill. Agent Mart. https://agentmart.dev/skills/bjcoombs-fix-develop (last updated 2026-10-24)