Fix Develop logo

Fix Develop

Community
bjcoombs
fix-develop

Autonomous fix loop for failing CI on the repo's default branch

Overview

Publisherbjcoombs
Repositoryai-native-toolkit
Skill namefix-develop
Stars
32
Forks
6
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by bjcoombs on GitHub. Read the source before you install it.

Installation

Install the Fix Develop AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bjcoombs/ai-native-toolkit/tree/main/skills/fix-develop
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bjcoombs/ai-native-toolkit.git /tmp/ai-native-toolkit
mkdir -p .claude/skills
cp -r /tmp/ai-native-toolkit/skills/fix-develop .claude/skills/fix-develop
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Fix Develop in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Fix Develop on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Fix Develop is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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"
  2. Stop when green:

    PR #X: CI passing, all comments addressed. Ready for merge.
    
    This fixes the following $DEFAULT_BRANCH failures:
    - <list of what was broken>
    
    ---
    ## Current Work
    
    PR: #X - Fix failing CI on $DEFAULT_BRANCH
       https://github.com/org/repo/pull/X
    
    Latest: All green after N iterations
  3. Only ask for help if:

    • Root cause is unclear after reading logs + source
    • Fix requires architectural decision
    • After 5+ iterations with no progress
    • Failure is in code you don't have context on
  4. After merge (if user merges):

    bash
    cd ~/dev/github.com/$ORG/$REPO
    cd $REPO-main && git worktree remove --force ../worktree/$BRANCH_NAME
    git branch -d $BRANCH_NAME

Important

  • Minimal fixes only - fix what's broken, nothing else
  • Use positive jq filters - select(.state == "FAILURE") not select(.state != "SUCCESS")
  • Never work in repo-main - always create a worktree
  • Max iterations: 10 (ask for help after that)
  • If flaky/infrastructure: Report and STOP - don't create a PR for transient failures

Frequently asked questions

What does the Fix Develop AI skill do?

Autonomous fix loop for failing CI on the repo's default branch

Why use Fix Develop on TypingMind?

Because you install it once and use it with any model. Fix Develop is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Fix Develop in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bjcoombs/ai-native-toolkit/tree/main/skills/fix-develop. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Fix Develop?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Fix Develop?

As many as you like. As long as a model supports skills, you can use Fix Develop with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Fix Develop AI skill free?

Yes. It is published on GitHub by bjcoombs under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇