# Openai Gh Fix Ci > Úsalo cuando alguien pida depurar o arreglar checks de PR fallidos en GitHub Actions: inspecciona logs con `gh`, resume el fallo y propone un plan antes de implementar. Fuente: https://skillsagentes.com/skills/trailofbits/skills-curated/openai-gh-fix-ci Markdown: https://skillsagentes.com/skills/trailofbits/skills-curated/openai-gh-fix-ci.md Repositorio: https://github.com/trailofbits/skills-curated Autor: trailofbits Licencia: CC-BY-SA-4.0 Actualizado: hace 9 meses Coste de contexto: 91 tok instalada, 955 tok al activarse, 4.8k tok con todos los archivos del bundle Bundle: 2 archivos, 19 KB Permisos que pide: bash, read, grep, glob, write, edit ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add trailofbits/skills-curated --skill openai-gh-fix-ci --agent claude-code # Cursor npx -y skills add trailofbits/skills-curated --skill openai-gh-fix-ci --agent cursor # Codex npx -y skills add trailofbits/skills-curated --skill openai-gh-fix-ci --agent codex # Gemini CLI npx -y skills add trailofbits/skills-curated --skill openai-gh-fix-ci --agent gemini # Windsurf npx -y skills add trailofbits/skills-curated --skill openai-gh-fix-ci --agent windsurf # Cline npx -y skills add trailofbits/skills-curated --skill openai-gh-fix-ci --agent cline ``` ## Qué hace - Usa `gh` para localizar checks fallidos de un PR y descargar los logs de GitHub Actions - Resume el fragmento de log con el fallo y redacta un plan de corrección - Implementa el fix solo tras aprobación explícita del usuario - Marca los checks de proveedores externos (por ejemplo Buildkite) como fuera de alcance y solo informa la URL - Sugiere volver a ejecutar tests y `gh pr checks` tras aplicar los cambios ## Cuándo usarla - El usuario pide depurar o arreglar checks de un PR en GitHub que están fallando en GitHub Actions ## Cuándo no - Los checks fallidos corren en proveedores externos como Buildkite (solo se reporta la URL de detalles) ## Qué la activa - "Arréglame los checks que están fallando en este PR" - "Revisa por qué falla el CI de GitHub Actions en el PR 123" - "Investiga los logs del Action fallido y propón un fix" ## Antes de instalar - Requiere tener `gh` autenticado (`gh auth login` con scopes repo + workflow) y confirmado con `gh auth status`. - runs shell commands - writes to your files ## Archivos - SKILL.md — 4 KB - scripts/inspect_pr_checks.py — 15 KB ## SKILL.md Reproducido tal cual desde trailofbits/skills-curated bajo CC-BY-SA-4.0. Esta sección es el documento original y está en inglés. # Gh Pr Checks Plan Fix ## Overview Use gh to locate failing PR checks, fetch GitHub Actions logs for actionable failures, summarize the failure snippet, then propose a fix plan and implement after explicit approval. - If a plan-oriented skill (for example `create-plan`) is available, use it; otherwise draft a concise plan inline and request approval before implementing. Prereq: authenticate with the standard GitHub CLI once (for example, run `gh auth login`), then confirm with `gh auth status` (repo + workflow scopes are typically required). ## Inputs - `repo`: path inside the repo (default `.`) - `pr`: PR number or URL (optional; defaults to current branch PR) - `gh` authentication for the repo host ## Quick start - `python "{baseDir}/scripts/inspect_pr_checks.py" --repo "." --pr ""` - Add `--json` if you want machine-friendly output for summarization. ## Workflow 1. Verify gh authentication. - Run `gh auth status` in the repo. - If unauthenticated, ask the user to run `gh auth login` (ensuring repo + workflow scopes) before proceeding. 2. Resolve the PR. - Prefer the current branch PR: `gh pr view --json number,url`. - If the user provides a PR number or URL, use that directly. 3. Inspect failing checks (GitHub Actions only). - Preferred: run the bundled script (handles gh field drift and job-log fallbacks): - `python "{baseDir}/scripts/inspect_pr_checks.py" --repo "." --pr ""` - Add `--json` for machine-friendly output. - Manual fallback: - `gh pr checks --json name,state,bucket,link,startedAt,completedAt,workflow` - If a field is rejected, rerun with the available fields reported by `gh`. - For each failing check, extract the run id from `detailsUrl` and run: - `gh run view --json name,workflowName,conclusion,status,url,event,headBranch,headSha` - `gh run view --log` - If the run log says it is still in progress, fetch job logs directly: - `gh api "/repos///actions/jobs//logs" > ""` 4. Scope non-GitHub Actions checks. - If `detailsUrl` is not a GitHub Actions run, label it as external and only report the URL. - Do not attempt Buildkite or other providers; keep the workflow lean. 5. Summarize failures for the user. - Provide the failing check name, run URL (if any), and a concise log snippet. - Call out missing logs explicitly. 6. Create a plan. - Use the `create-plan` skill to draft a concise plan and request approval. 7. Implement after approval. - Apply the approved plan, summarize diffs/tests, and ask about opening a PR. 8. Recheck status. - After changes, suggest re-running the relevant tests and `gh pr checks` to confirm. ## Bundled Resources ### scripts/inspect_pr_checks.py Fetch failing PR checks, pull GitHub Actions logs, and extract a failure snippet. Exits non-zero when failures remain so it can be used in automation. Usage examples: - `python "{baseDir}/scripts/inspect_pr_checks.py" --repo "." --pr "123"` - `python "{baseDir}/scripts/inspect_pr_checks.py" --repo "." --pr "https://github.com/org/repo/pull/123" --json` - `python "{baseDir}/scripts/inspect_pr_checks.py" --repo "." --max-lines 200 --context 40` ## When to Use ## When NOT to Use ## Dónde encaja - Categoría: [DevOps e infraestructura](https://skillsagentes.com/categorias/devops-infraestructura.md) — Despliegues, contenedores, IaC y flujos de gestión de incidentes. - Creador: [trailofbits](https://skillsagentes.com/creators/trailofbits.md) — 117 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [Grilling](https://skillsagentes.com/skills/trailofbits/skills-curated/grilling.md): Interroga al usuario sin descanso sobre un plan, decisión o idea hasta resolver cada rama del árbol de decisión, o cuando dice "grill me on this". - [Handoff](https://skillsagentes.com/skills/trailofbits/skills-curated/handoff.md): Compacta la conversación actual en un documento de traspaso para que un agente nuevo pueda continuar el trabajo en otra sesión. - [Teach](https://skillsagentes.com/skills/trailofbits/skills-curated/teach.md): Enseña al usuario una nueva habilidad o concepto a lo largo de varias sesiones, usando el directorio actual como un espacio de enseñanza con estado, con lecciones, registros de aprendizaje y materiales de referencia. - [Writing Great Skills](https://skillsagentes.com/skills/trailofbits/skills-curated/writing-great-skills.md): Referencia para escribir y editar bien skills de agentes: el vocabulario y los principios que hacen que un skill sea predecible. Consúltalo al redactar, revisar o podar un SKILL.md. - [Ffuf Web Fuzzing](https://skillsagentes.com/skills/trailofbits/skills-curated/ffuf-web-fuzzing.md): Guía experta para el fuzzing web con ffuf en pentesting autorizado: descubrimiento de directorios y subdominios, fuzzing de parámetros, peticiones autenticadas y análisis de resultados. ## Skills relacionadas - [Wizard](https://skillsagentes.com/skills/mattpocock/skills/wizard.md): Genera un wizard bash interactivo que guía a un humano por los pasos que solo él puede dar. Úsalo para aprovisionar infraestructura, credenciales o secretos de CI, o una migración puntual. - [Deploy Release Test](https://skillsagentes.com/skills/vercel/next.js/deploy-release-test.md): Valida el paquete de preview de Next.js específico de un commit y dispara manualmente toda la suite de tests de despliegue vía el workflow test_e2e_deploy_release.yml de GitHub Actions. - [Canary](https://skillsagentes.com/skills/garrytan/gstack/canary.md): Monitoreo canary post-deploy: vigila la app en producción tras el despliegue. (gstack) - [Gstack Upgrade](https://skillsagentes.com/skills/garrytan/gstack/gstack-upgrade.md): Actualiza gstack a la última versión. - [Land And Deploy](https://skillsagentes.com/skills/garrytan/gstack/land-and-deploy.md): Fusiona el PR, espera CI y el despliegue, y verifica la salud de producción con checks canary. Continúa el trabajo que /ship dejó iniciado. (gstack) --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)