Skill

/hanzo-web:ci-status

Te dice cómo va el CI de una rama, un MR o un pipeline y, si algo falla, por qué.

Fuente: plugins/hanzo-web/skills/ci-status/SKILL.md · hanzo-web v0.2.0

  • Claude Code /hanzo-web:ci-status [branch | !MR | pipeline id]
  • Cursor /ci-status

Cuándo usarlo

Después de subir un MR o cuando falla un job del CI.

Qué hace

  • Usa el primer acceso a GitLab que funcione: el MCP de GitLab, glab o la API con un GITLAB_TOKEN ya configurado.
  • Muestra el último pipeline con sus jobs agrupados por etapa.
  • De cada job fallido extrae las líneas útiles del log y la causa probable: gate de CodeClimate, lint, tests, build o infraestructura.
  • Lista los jobs manuales pendientes, como los despliegues, sin lanzarlos.

Qué te entrega

El estado del pipeline y la causa de cada fallo.

Pídelo así

/hanzo-web:ci-status [branch | !MR | pipeline id]

O con tus palabras: «¿cómo va el pipeline?», «¿por qué falla el CI?», «estado de los jobs».

A tener en cuenta

Solo reintenta, cancela o lanza jobs si se lo confirmas para esa acción concreta. Nunca te pedirá que pegues un token en el chat.

Definición en el plugin

Las instrucciones que sigue la skill, tal como están en el plugin (en inglés).

Qué hace

Check GitLab CI for the current branch, an MR or a pipeline in a Hanzo project:
  • pipeline status
  • failed jobs
  • the relevant log lines and the likely cause (quality_gate, lint, tests, build)

Cuándo usarlo

Use when the user asks:
  • "¿cómo va el pipeline?"
  • "¿por qué falla el CI?"
  • "estado de los jobs"
or after pushing an MR.

Paths: ${CLAUDE_PLUGIN_ROOT} is this plugin's folder (Claude Code expands it). If you see it literally (e.g. in Cursor), use the "Plugin scripts" path from the session context, or the plugin folder two levels above this skill (../../ from the folder of this SKILL.md).

Project: gitlab.host / gitlab.project from the main checkout's .claude/hanzo-project.json (else derive them from git remote get-url <gitlab.remote>). Target: the argument, or the current branch.

1. Pick the access method (first that works)

  1. GitLab MCP if this session has it: get_merge_request / get_merge_request_pipelines → get_pipeline_jobs.
  2. glab CLI: glab auth status --hostname <host>; then glab ci status -b <branch>, glab ci view -b <branch> (non-interactive: glab ci list -b <branch> + glab api projects/:id/pipelines/<id>/jobs), glab ci trace <job-id>, glab mr view <iid>. Run with GITLAB_HOST=<host> or -R <host>/<project> when outside the repo.
  3. REST API with a token already in the environment (GITLAB_TOKEN): curl -s --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "https://<host>/api/v4/projects/<url-encoded project>/pipelines?ref=<branch>&per_page=5", /pipelines/<id>/jobs, /jobs/<id>/trace.

If none works, tell the user how to set up one (glab auth login --hostname <host> with a personal access token with read_api) and stop. Never ask them to paste a token in the chat, and never print, store or commit tokens.

2. Report

  • Latest pipeline for the target: id, status, ref, link, duration; jobs grouped by stage with status.
  • For each failed job: the relevant log lines (tail of the trace, trimmed to the error), and the likely cause:
    • quality_gate / code_quality → run node "${CLAUDE_PLUGIN_ROOT}/scripts/quality-gate-local.mjs" <worktree> and list the new issues; remember each new .js file adds 2 minor "rule not found" issues in CI.
    • lint / tests → reproduce the exact command locally in the worktree.
    • build → Node version (.nvmrc), missing env/CI variable, Strapi not reachable during the build, @hanzo registry auth.
    • runner/infra errors (timeouts, no space left, registry 5xx) → say it's infra and suggest a retry.
  • Manual jobs pending (deploys) — list them, never trigger them.

3. Actions (ask first)

Retrying a failed job, cancelling or running a pipeline, or playing a manual job only after the user's explicit yes for that specific action. Never touch production deploy jobs unless the user asks for exactly that.