一键导入
diagnose-integration-failure
Diagnose a failing TMDb integration-test run — summarise the failure, rank the likely cause, and suggest a concrete fix
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Diagnose a failing TMDb integration-test run — summarise the failure, rank the likely cause, and suggest a concrete fix
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Take the current plan all the way to a ready-to-merge pull request — review the plan (scaled to risk), implement it test-first, code-review and fix, run the CI gate, open the PR, and watch it green. Use after you have an approved plan (e.g. from /plan) and want the rest of the feature pipeline run end-to-end. Invoking it is itself plan approval — it then runs autonomously to a single hard stop: ready-to-merge.
Diagnose and fix a failing scheduled (or standalone) TMDb Integration workflow run — re-run transients, or fix real drift on a branch off main, then PR and (optionally) merge. Use for the weekly Sunday Integration cron failure, or any red Integration run not tied to an open PR.
Review the working-tree changes (vs main) for correctness, concurrency, architecture, testing, and API/doc issues — following .github/CODE_REVIEW.md — and return a severity-graded report. Scales the machinery to the diff size: a single code-reviewer agent for a small change, or a fan-out-and-verify Workflow for a large/multi-unit one. Produces findings; it does not apply fixes (the caller does).
Watch the current branch's PR — reply to and resolve review threads, fix failing checks, and optionally merge when ready
Compile the TMDb package AND all test targets (without running the tests) to catch test-code compile errors. Use after changing tests or shared code to check everything still builds — delegates to the tooling-runner agent (Haiku) and returns a concise pass/fail + errors-as-file:line summary. Differs from /build, which compiles only the library; to run the tests, use /test.
Compile the TMDb Swift package for the current platform to check it builds. Use to verify code compiles after changes — delegates the build to the tooling-runner agent (Haiku) and returns a concise pass/fail + errors-as-file:line summary, keeping logs out of context. To also compile the test targets, use /build-for-testing.
| name | diagnose-integration-failure |
| description | Diagnose a failing TMDb integration-test run — summarise the failure, rank the likely cause, and suggest a concrete fix |
The TMDb integration tests hit the live TMDb API. The suite runs on three
triggers — pull_request / push (where it gates the change) and
schedule (the nightly live-API canary). Which run failed flips the most
likely cause, so determine the trigger first (step 0):
/watch-pr or /fix-pr-checks.Wrong suite? If a CI check failed instead (lint, markdown, build, or unit tests from
ci.yml), use/diagnose-ci-failure. That one leads with the opposite assumption: a CI failure is almost always caused by the change under review.
Produce a concise markdown analysis with exactly these three sections:
Summary: one or two sentences on what failed — name the failing suite/test where visible.
Likely cause: the most probable root cause, ranked most-likely first — ranked by the trigger (step 0):
git diff main...HEAD).
A new/renamed request path or query item, a changed model/CodingKeys, or a
decoder tweak can break a live call. This run is the gate, so the diff is a
prime suspect — but still weigh causes 1–3 below, since the live API can drift
independently of your change.Decodable. Confirm against the OpenAPI
spec (see step 3).timeout-minutes, and a cancelled
(timed-out) run still surfaces as a workflow failure. A truncated log with
no assertion failure, or a run that ran the full 30 minutes, points here.Cite the specific HTTP status codes, error messages, or failing assertions from the log that point to your conclusion.
Suggested fix: the concrete next step — which Swift model or JSON fixture to update for an API change, which integration-test assertion to relax or refresh for drifted data, or (only for case 3) re-run the job / wait out rate limiting / investigate the slow run if it timed out.
Keep it under ~150 words.
Determine the trigger (it sets the cause ranking above). If the caller told
you (e.g. /watch-pr / /fix-pr-checks diagnose a PR run), use that.
Otherwise read it from the run with mcp__github__actions_get method
get_workflow_run (owner/repo from the origin remote, resource_id: <id>) →
event is pull_request, push, or schedule (headless / no MCP:
gh run view <id> --json event,displayTitle). If you can't tell, assume
PR/push when a local diff vs main exists, else scheduled.
Locate the failure log, in this order — use the first that exists:
failure-log.txt in the working
directory, used by the CI alert workflow)..build/last-integration-test.log — written by the /integration-test
skill. If you (or the user) haven't run the tests yet locally, run
/integration-test first, then read this log.origin): mcp__github__actions_list method list_workflow_runs
(resource_id: integration.yml, workflow_runs_filter: { status: completed },
then filter to conclusion == "failure"), and read its log with
mcp__github__get_job_logs (run_id: <id>, failed_only: true,
return_content: true). Headless / no MCP:
gh run list --workflow Integration --status failure --limit 1 then
gh run view <id> --log-failed.Read the failing portion — focus on the assertion failures and error messages, which surface near the end. Read the specific test, model, and fixture files the log points to so your suggested fix names real symbols.
Check the OpenAPI spec when the failure looks like a decode/shape error.
The live spec is the source of truth for the current response shape, but it
is ~3 MB of minified JSON on a single line — NEVER grep, cat, or
Read it whole; that dumps the entire file into context. Extract only the
one endpoint you need with jq (requires jq, which is present in CI and
installable via Homebrew locally; if jq is unavailable, skip this step and
say so):
tmdb-openapi.json in the working directory if present; otherwise
fetch it (best-effort):
curl -fsSL --max-time 30 https://developer.themoviedb.org/openapi/tmdb-api.json -o tmdb-openapi.jsoncomponents.schemas). Find the endpoint, then pull
just its 200-response schema:
jq -r '.paths | keys[]' tmdb-openapi.jsonjq '.paths."/3/movie/{movie_id}".get.responses."200".content."application/json".schema' tmdb-openapi.json
(swap in the path + HTTP method for the failing request)… .schema.properties | keys[]jq is unavailable, say so and proceed
without it.Output the analysis. If the caller asked you to write it to a file (e.g.
claude-analysis.md), write the three-section markdown there and nothing
else. Otherwise present it directly in your reply.