Files
claude-foundations/memory/skill-ci-triage-minimax.md
Paul O'Reilly df243cd953 docs: memory + usage docs for review-minimax and ci-triage-minimax offloads
Four memory docs (2 skills, 2 wrapper scripts) + MEMORY.md index lines;
ask-minimax-usage.md gains both delegation targets. Records the gac
v0.0.2.10 token-discovery gap (needs GITEA_TOKEN_FILE pointed at
ai_admin/token; the wrapper defaults it).

Claude-Session: https://claude.ai/code/session_01Ku87DDWwbJkTx6SuV3sQDc
2026-09-11 13:48:22 +12:00

2.3 KiB

/ci-triage-minimax Skill

Purpose: Delegate triage of a failing Gitea Actions run to a MiniMax M3 sub-session: logs fetched via gitea-agent-companion, analysed in MiniMax, and a short triage file (failing step, error excerpt, probable cause, suggested action, confidence) returns. Classic payload-dwarfs-answer offload. Canonical placement: after gac tail --until run-complete exits 1.

Location: custom-claude-skills/skills/ci-triage-minimax/ — thin wrapper over ci-triage-minimax-run (small-scripts), which owns all mechanics.

Usage

/ci-triage-minimax owner/repo [run-number] [job] → the skill picks the newest failure row from gac inspect owner/repo if no run number, then runs:

ci-triage-minimax-run --repo owner/repo --run <N> [--job <name>]

Triage lands in ${XDG_RUNTIME_DIR:-/tmp}/ci-triage-minimax/<owner>-<repo>/run-<N>-triage.md.

Key design points

  • Token boundary stays inside gac (env → token file → secrets path); the wrapper never reads or passes the Gitea token. Logs are redacted (credential patterns → [REDACTED]) before reaching MiniMax — CI logs carry unmasked clone URLs.
  • gac's failed_step steers the prompt: when non-null MiniMax analyses why, not which; when null the contract requires the literal UNKNOWN — no fabricated step names.
  • gac exit mapping: gac 2 (usage) → 1, gac 3 (auth/API/not-found, often transient) → 2, so the skill's retry/fallback logic fires correctly.
  • Exit contract 0/1/2/3; fallback on 2/3 = gac inspect --logs directly, triage in-session.
  • ## Suggested next action is advisory only — the operator re-derives commands, never copy-runs third-party model output shaped by anyone who can trigger CI.

Which modes use it

Any mode doing post-push CI watching (gac tail pattern in root CLAUDE.md). Related: script-ci-triage-minimax-run, skill-review-minimax, skill-ask-minimax.

Gotchas

  • The run number is the web-UI number, not the API id; gac resolves it within its --limit window — very old runs may report not-found (exit 2 here).
  • Multi-job runs with no failed job need --job (gac CLI-17); the skill passes the third argument through.
  • Run-picking (newest failure) is done by the skill reading gac's human table — deliberately not automated in the script (unversioned parse).