一键导入
debug-ci
Debug CI failures by downloading artifact logs, reading test code, and tracing agent LLM thinking to find root causes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug CI failures by downloading artifact logs, reading test code, and tracing agent LLM thinking to find root causes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Amazon listing CRUD via the category flat-file (Add Products via Upload). Create a variation family (parent + colour/size children), update attributes, change parent-child relationships, and delete SKUs — all in one template round trip. Also covers the end-to-end sourcing flow: a supplier link (e.g. 1688) → extract product data → local GPU-free OCR of detail images → generate title / bullet points / description → bilingual review with the user → propose the parent-child structure → fill the template → upload → read the processing report. Load this BEFORE any browser-use action on sellercentral.amazon.<tld>/listing/upload or when the task is to create / edit / delete a listing from a product link.
Common Amazon Seller Central / advertising-console mechanics — marketplace TLD map; version-aware navigation (New Seller Central 'NGS' vs classic, navigate by direct URL); sign-in as a challenge LOOP with Ziniao auto-fill of password / OTP (紫鸟验证码服务) / hosted passkey (已托管账号Passkey, native overlay → coordinate-click), Ziniao-stored-else-human rule; ad-console vs seller-central account caveat; capture rule. Prerequisite: every other amazon-* skill (amazon-ads, amazon-reports, amazon-invoice, amazon-listing / amazon-fbn / etc.) expects this loaded for cross-cutting auth and navigation patterns.
Save the workflow you just carried out as a reusable skill — OR update an existing skill — whenever the user asks to remember, reuse, or amend it. Triggers include "把这个任务的流程保存为技能", "save this workflow as a skill", "save to skill", "remember how to do this", "turn this into a skill", "next time do it the same way", AND update/extend phrasings like "update that skill", "extend the skill", "add this step to the skill", "make the skill also remember to…", "更新这个技能", "把这一步加到技能里", "让技能也记住…". Search the existing skills first, then EXTEND the one that already covers this workflow or CREATE a new one — never duplicate. Skills are saved/extended ONLY through the vibe_seller_save_skill MCP tool (the built-in Write/Edit tools do not persist skill files); they then auto-load for future tasks.
Common noon Seller Center mechanics — login (OTP auto-fetch), page-structure URL map, My Catalog read access, common modals, button-click patterns, project-ID discovery. Prerequisite: every other noon-* skill (noon-listing, noon-fbn, noon-exports, noon-ads) expects this loaded for auth and shared UI patterns.
Amazon Sponsored Products / Sponsored Brands / Sponsored Display ads + Coupons on Seller Central / advertising console. ONE catalog covering BOTH mechanics (URLs, click paths, modal patterns, kat-* component gotchas, field input ranges) AND workflows (tuning existing campaigns, weekly review, search-term harvest, ACOS improvement). Load this skill BEFORE any browser-use action that creates, edits, captures, archives, or downloads campaigns / ad-groups / keywords / product targets / coupons on amazon.<tld> or advertising.amazon.<tld>. The catalog below points to topical references — load whichever ones the task needs. Defaults to last 30 days for tuning analysis but accepts any user-specified window.
MUST load BEFORE running any browser-use command. This is the only bridge between the agent and the browser — browser-use 0.13 has NO subcommands (open/click/state are gone); you drive the browser by piping Python helper code via a heredoc. Contains the helper API, wrapper rules, session management, and store-task restrictions. Without this skill, browser commands will fail.
| name | debug-ci |
| description | Debug CI failures by downloading artifact logs, reading test code, and tracing agent LLM thinking to find root causes |
Debug CI test failures by analyzing artifact logs, test code, and agent behavior.
We own the project, not just the PR.
Every CI failure has a root cause in code, config, or design — not in "flakiness." Even if a failure predates your current changes, you are responsible for finding the root cause and fixing it. Never dismiss a failure as "unrelated to this PR" or "intermittent" — those are descriptions of symptoms, not conclusions. The conclusion is the root cause and the fix.
Workarounds like increasing timeouts, adding retries, or loosening assertions are NOT acceptable. These mask the real problem. Find and fix the design flaw that the test exposed.
Before writing any fix, review the design that produced the bug. A failing test is one observation of a design that allowed a failure to be possible. Patching the observation doesn't change what's possible — only changing the design does.
Ask in this order, every time:
email_watermark value
must be a recent epoch" was an assumption, not an invariant,
so the agent's wrong value was accepted.Symptoms that mean you skipped the design pass and went straight to a workaround:
If the natural fix touches a file the PR didn't, fix it anyway. The goal is "this bug class can't recur," not "this PR is green."
# Get the failing job ID
gh api repos/{owner}/{repo}/commits/{sha}/check-runs \
--jq '.check_runs[] | "\(.name): \(.conclusion // .status) \(.id)"'
# Get the failure message
gh api repos/{owner}/{repo}/actions/jobs/{job_id}/logs 2>&1 \
| grep "FAIL\|E \|assert" | head -20
You MUST download and read the server logs before any conclusion. CI test output alone is insufficient — the real story is in the server logs (agent debug events, API calls, task state transitions).
# Find the run and artifact
run_id=$(gh api "repos/{owner}/{repo}/actions/runs?per_page=5" \
--jq '.workflow_runs[] | select(.head_sha | startswith("{sha}")) | .id' \
| head -1)
art_id=$(gh api "repos/{owner}/{repo}/actions/runs/$run_id/artifacts" \
--jq '.artifacts[] | select(.name=="e2e-server-logs") | .id')
# Download and extract
cd /tmp && gh api "repos/{owner}/{repo}/actions/artifacts/$art_id/zip" \
> ci-logs.zip && unzip -o ci-logs.zip -d ci-logs
Available artifacts:
e2e-server-logs — backend_7777.log + server_stdout.log (for e2e-test)mock-cli-server-logs — same structure (for e2e-mock-cli)Read the actual test file to understand:
For e2e tests involving LLM agents, trace the full agent lifecycle:
# Find the task ID
grep "AGENT_DEBUG.*{test_identifier}" /tmp/ci-logs/backend_7777.log \
| grep "stdin.*Design\|stdin.*Update" | head -3
# Get agent thinking
grep "AGENT_DEBUG \[{task_id}\]" /tmp/ci-logs/backend_7777.log \
| grep '"thinking"' | sed 's/.*"thinking": "//;s/", "signature.*//' \
| sed 's/\\n/\n/g'
# Get tool calls
grep "AGENT_DEBUG \[{task_id}\]" /tmp/ci-logs/backend_7777.log \
| grep '"name":' | grep -o '"name": "[^"]*"'
# Get result
grep "AGENT_DEBUG \[{task_id}\].*result.*success\|.*result.*error" \
/tmp/ci-logs/backend_7777.log | tail -1
For timeout/race failures, build an exact timeline:
# Key events with timestamps
grep "Fan-out\|task_update.*completed\|AGENT_DEBUG.*result" \
/tmp/ci-logs/backend_7777.log | grep "{relevant_pattern}" \
| cut -d' ' -f1-2
Compare against test timeouts and polling intervals.
Every failure maps to ONE of these:
| Category | Signal | Fix Location |
|---|---|---|
| Race condition | Test sees stale state, timing-dependent | Test polling logic or event ordering |
| Platform difference | Works on macOS, fails on Linux | Symlink resolution, path handling |
| Model behavior | Agent uses wrong tool, wrong path, hallucinates | Prompt wording, MCP tool design |
| Resource exhaustion | SIGSEGV, timeout after N iterations | Fixture scope, process cleanup |
| Design flaw | Symlink + Write restriction, plan mode overhead | Architecture (workspace isolation, task mode) |
| API/tool bug | Tool returns success but doesn't persist | MCP server, workspace manager |
You MUST produce a code fix. Re-triggering CI is a workaround, not a fix.
If the root cause is in code you didn't touch in this PR, fix it anyway — include it in this PR or create a separate commit. The goal is zero failures on the next run because you fixed the bug, not because the timing was different.
PIPELINE_TIMEOUT to hide slow taskstime.sleep() to work around race conditionsassert x or y when only x should be true)@pytest.mark.skip or @pytest.mark.xfail_catalog_sync → creates L2 + L3 tasks for ALL storeswrite_workspace_file (not built-in Write)browser-use open must succeed on first call (retry = infra bug)vibe_seller_set_task_error MCP tool records an error message +
category but does NOT transition status — status changes are
owned by _auto_run_task cleanup (which sees task.error and
fails the task)vibe_seller_set_task_result MCP tool records a custom result
summary but does NOT change status — status transitions are
owned by _auto_run_task after the agent session exitsIf CI runs on local GitHub Actions runners (Docker):
First, resolve the current repo name yourself — GitHub Actions
checks code out to _work/{repo}/{repo}/, so the path depends on
the active repo. Either:
REPO=$(basename "$(gh repo view --json url --jq .url)")
# or, if gh isn't available:
REPO=$(basename -s .git "$(git config --get remote.origin.url)")
Then use $REPO in the path:
# Find which runner has the test
for r in mac-mini-1 mac-mini-2 mac-mini-3 mac-mini-4; do
docker exec $r bash -c "ls /home/runner/actions-runner/_work/$REPO/$REPO/logs/backend_7777.log 2>/dev/null && echo $r" 2>/dev/null
done
# Read live logs
docker exec {runner} bash -c "tail -50 /home/runner/actions-runner/_work/$REPO/$REPO/logs/backend_7777.log"