Skill fix-develop
Automatiza el diagnóstico y la reparación de flujos de trabajo de CI que fallan en la rama por defecto de un repositorio mediante la creación de worktrees y pull requests.
- Estrellas en GitHub
- 32
- Archivos
- 1
- Último commit
- 10 nov 2026
- Licencia
- Apache-2.0
- Herramientas permitidas
- —
¿Qué hace la skill fix-develop?
fix-develop es una agent skill. Automatiza el diagnóstico y la reparación de flujos de trabajo de CI que fallan en la rama por defecto de un repositorio mediante la creación de worktrees y pull requests.
Resumen generado a partir del SKILL.md de la skill.
Sobre la skill fix-develop
La función principal de este SKILL es automatizar la reparación de pipelines de integración continua rotos en la rama por defecto de un repositorio. Está diseñado para desarrolladores e ingenieros de DevOps que necesitan mantener una rama main o develop saludable sin intervención manual ante cada fallo de compilación. La herramienta identifica ejecuciones de workflow fallidas usando la GitHub CLI, analiza los logs para categorizar los errores como fallos de pruebas, problemas de linting o de dependencias, y luego implementa correcciones específicas.
Cuando un agente carga este SKILL, opera creando un git worktree separado para asegurar que el repositorio principal permanezca intacto durante el proceso de reparación. Genera un pull request dirigido a la rama por defecto que incluye un resumen de la causa raíz y la evidencia específica de la solución. El proceso sigue un protocolo estricto de cambios mínimos, evitando el refactorizado para centrarse exclusivamente en resolver el error reportado. El agente continúa iterando con las correcciones y atendiendo comentarios de revisión hasta que el estado de CI vuelva a ser exitoso o alcance un límite de diez intentos.
Lo que un agente puede hacer con ella
- 1Reparar flujos de trabajo de CI fallidosSe puede asignar a un agente la tarea de diagnosticar y solucionar automáticamente compilaciones rotas en la rama main.
- 2Identificar problemas de pruebas intermitentes (flaky tests)La herramienta puede distinguir entre errores de código reales y fallos transitorios de infraestructura para evitar pull requests innecesarios.
Escrito a partir del SKILL.md de la skill. Cada caso de uso se verifica con una cita del mismo.
Cómo instalar la skill fix-develop
Cada comando copia la carpeta de la skill al directorio de skills del cliente. Reinicia el cliente o inicia una nueva sesión para cargarla.Instalar la skill fix-develop en Plugin
/plugin marketplace add bjcoombs/ai-native-toolkit /plugin install ai-native-toolkit@ai-native-toolkit
Instalar la skill fix-develop en Claude Code
~/.claude/skills/fix-develop/SKILL.md
$ npx degit bjcoombs/ai-native-toolkit/skills/fix-develop ~/.claude/skills/fix-developInstalar la skill fix-develop en Claude Code (project)
.claude/skills/fix-develop/SKILL.md
$ npx degit bjcoombs/ai-native-toolkit/skills/fix-develop .claude/skills/fix-developInstalar la skill fix-develop en Codex
~/.agents/skills/fix-develop/SKILL.md
$ npx degit bjcoombs/ai-native-toolkit/skills/fix-develop ~/.agents/skills/fix-developInstalar la skill fix-develop en Gemini CLI
~/.gemini/skills/fix-develop/SKILL.md
$ npx degit bjcoombs/ai-native-toolkit/skills/fix-develop ~/.gemini/skills/fix-developInstalar la skill fix-develop en Claude.ai
npx degit bjcoombs/ai-native-toolkit/skills/fix-develop fix-develop && zip -r fix-develop.zip fix-develop # claude.ai → Customize → Skills → + → Create skill → Upload a skill → fix-develop.zip
SKILL.md
Ver en GitHubFix 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
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
# 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
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.
# 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
-
Autonomous Loop - no permission needed between iterations:
- Check CI + comments, fix, push
- Report: "Iteration N: Fixed X issues" or "Iteration N: Waiting for CI"
-
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 -
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
-
After merge (if user merges):
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")notselect(.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
Archivos de esta skill
1Preguntas sobre la skill fix-develop
¿Cómo instalo la skill fix-develop en Claude Code?
Ejecuta npx degit bjcoombs/ai-native-toolkit/skills/fix-develop ~/.claude/skills/fix-develop. Claude Code carga las skills desde ~/.claude/skills (todos los proyectos) o .claude/skills (un proyecto) y usa una skill cuando su descripción coincide con la tarea.
¿Qué clientes pueden usar la skill fix-develop?
Cualquier cliente que lea el formato Agent Skills: Claude Code, Codex, Gemini CLI y claude.ai (subir como ZIP). Los scripts de la skill se ejecutan solo donde el cliente permite la ejecución de código.
¿Cuánto refactorizado está permitido al implementar una solución?
El agente debe mantener los cambios al mínimo, enfocándose únicamente en corregir las pruebas o la compilación fallida sin realizar refactorizaciones ni limpieza de código.