agentleFS
stoa-platformstoa-platform/stoa/.claude/skills/ci-debug/SKILL.md

ci-debug

Skill9 starsChanged 7 months agoApache-2.0View on GitHub

Debug GitHub Actions CI pipeline failures. Analyse les logs de workflow, identifie la cause racine et propose un fix.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

CI Debug — Analyse des echecs CI

Contexte dynamique

  • Checks PR en cours: !gh pr checks 2>/dev/null | head -20
  • Workflows recents: !gh run list --limit 5 --json name,status,conclusion,headBranch --template '{{range .}}{{.name}} | {{.status}} | {{.conclusion}} | {{.headBranch}}{{"\n"}}{{end}}' 2>/dev/null

Instructions

Analyser l'echec CI pour: $ARGUMENTS

Step 1: Identifier le workflow en echec

Si c'est un numero de PR:

gh pr checks $0
gh run list --branch $(gh pr view $0 --json headRefName -q .headRefName) --limit 3

Si c'est une URL de workflow run:

gh run view $0 --log-failed

Step 2: Extraire les logs d'erreur

gh run view <run-id> --log-failed 2>&1 | head -100

Chercher les patterns:

  • error, Error, ERROR
  • FAIL, FAILED
  • exit code 1, exit code 2
  • denied, forbidden, unauthorized

Step 3: Diagnostiquer

Causes frequentes dans STOA CI:

PipelineErreur frequenteCauseFix
Python CII001 import orderisort non respecteruff check --fix
Python CImypy type errorType hints manquantsAjouter les annotations
Node CIvitest failMock MSW manquantAjouter handler MSW
Node CIeslint warningsMax warnings depassé (0 pour UI, 20 pour portal)Fixer les warnings
Dockerbuildx failCache layer miss ou multi-archVerifier --platform linux/amd64,linux/arm64
Helmhelm lint failValues manquantes, indentationVerifier values.yaml
Securitydependency-reviewGitHub Advanced Security non activeConnu, non-bloquant
K8s deploykubectl apply failSelector immutable, Kyverno blockVoir .claude/docs/k8s-deploy.md
K8s deployrollout timeoutmaxSurge/maxUnavailable deadlockmaxUnavailable: 1, maxSurge: 0

Step 4: Proposer le fix

Pour chaque erreur identifiee:

  1. Fichier exact a modifier (chemin complet)
  2. Diff propose (old → new)
  3. Commande de verification locale
  4. Impact sur les autres workflows

Step 5: Rapport

## CI Debug: [workflow-name] — [branch]

### Echec
- **Job**: [nom du job]
- **Step**: [nom du step]
- **Erreur**: [message d'erreur exact]

### Cause racine
[Explication]

### Fix propose
[Diff exact]

### Verification locale
```bash
[commande pour reproduire/verifier]

Impact

[Autres workflows potentiellement impactes]


## Regles
- Toujours lire les logs complets avant de diagnostiquer
- Ne pas confondre: erreur intermittente vs erreur structurelle
- Si `dependency-review` echoue seul → ignorer (connu, GitHub Advanced Security)
- Si `container-scan` / `codeql` echoue seul → verifier si intermittent
- Toujours proposer une verification locale

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.