diagnose-ci-failures

โดย warpdotdev

วินิจฉัยความล้มเหลวของ CI สำหรับ PR โดยใช้ GitHub CLI ดึงบันทึกข้อผิดพลาด และสร้างแผนเพื่อแก้ไข ใช้เมื่อผู้ใช้ขอให้ตรวจสอบสถานะ CI ดึงปัญหา CI จัดการความล้มเหลวของการทดสอบ หรือสอบสวนความล้มเหลวของการสร้าง PR

npx skills add https://github.com/warpdotdev/common-skills --skill diagnose-ci-failures

diagnose-ci-failures

Programmatically diagnose CI failures for a PR and generate a plan to fix them.

Overview

This skill provides a deterministic workflow to check CI status for a PR, extract failure logs, analyze errors, and create a plan (not code changes) to resolve issues. The output is always a plan document that can be reviewed before execution.

Workflow

1. Verify PR exists for current branch

Get the current branch and check if a PR exists:

# Get current branch
git branch --show-current

# Check for PR
GH_PAGER=cat gh pr view <branch-name> --json number,title,url,state

If no PR exists, inform the user and offer to create one using the create-pr skill.

2. Check CI status

Fetch the status of all CI checks:

GH_PAGER=cat gh pr view <branch-name> --json statusCheckRollup

Parse the output to identify:

  • Completed checks vs. in-progress checks
  • Successful checks
  • Failed checks with their names and details URLs

If CI is still running, inform the user which checks have already failed or passed, highlight the checks that are still running, and suggest waiting for completion before diagnosis.

3. Extract failure logs

For each failed check, pull the logs using the run ID from the status check:

GH_PAGER=cat gh run view <run-id> --log-failed

Focus on extracting:

  • Error messages and their locations (file paths, line numbers)
  • Compilation errors (unused imports, type mismatches, etc.)
  • Linting/clippy errors with specific lint names
  • Test failure messages and stack traces
  • Build failures and their root causes

4. Categorize errors

Group errors by type:

  • Formatting issues: cargo fmt failures
  • Linting issues: cargo clippy warnings/errors
  • Compilation errors: Type errors, missing imports, signature mismatches
  • Test failures: Failing tests with their names and failure reasons
  • Platform-specific issues: WASM, Linux, macOS, Windows-specific failures

5. Generate fix plan

Create a plan document (using create_plan tool) with:

  • Problem Statement: Summary of failing checks
  • Current State: What errors were found and where
  • Proposed Changes: Specific fixes needed for each error category
  • Validation Steps: Commands to verify fixes (fmt, clippy, tests, presubmit)

The plan should reference the fix-errors skill for detailed guidance on resolving specific error types.

Important Notes

  • GitHub CLI paging: Set GH_PAGER=cat on every gh invocation. The GitHub CLI does not support --no-pager as a global option; GH_PAGER and PAGER are its documented paging controls
  • Always create a plan first: Never make code changes directly. Generate a plan for user review
  • Check test status in CI: Even if tests fail locally, verify they passed in CI before flagging as issues
  • Unrelated test failures: If tests passed in CI but fail locally, they may be environment-specific or flaky
  • Multiple error types: Fix one category at a time (e.g., all clippy errors before tests)
  • Cross-reference fix-errors skill: For detailed error resolution strategies, use the fix-errors skill

Common CI Check Names

  • Formatting + Clippy (MacOS)
  • Formatting + Clippy (Linux)
  • Run MacOS tests
  • Run Linux tests
  • Run Windows tests
  • Check CI results (summary check)
  • WASM build

Example Commands

Get PR status with details:

GH_PAGER=cat gh pr view --json number,title,state,statusCheckRollup

Get logs from specific failed run:

GH_PAGER=cat gh run view 12345678 --log-failed

Check for specific error in logs:

GH_PAGER=cat gh run view 12345678 --log-failed 2>&1 | grep -A 5 "error:"

Skills เพิ่มเติมจาก warpdotdev

create-pr
warpdotdev
สร้าง pull request ใน warp repository สำหรับ branch ปัจจุบัน ใช้เมื่อผู้ใช้พูดถึงการเปิด PR, การสร้าง pull request, การส่งการเปลี่ยนแปลงเพื่อตรวจสอบ หรือการเตรียมโค้ดสำหรับ merge
developmentcode-review
research
warpdotdev
มอบหมายการสืบสวนที่มีเสียงรบกวนให้กับซับเอเจนต์หนึ่งตัวหรือมากกว่า เพื่อให้คอนเท็กซ์ของออร์เคสเตรเตอร์สะอาดอยู่เสมอ จากนั้นทำงานจากคำตอบที่กลั่นกรองแล้ว ใช้สกิลนี้เมื่อใดก็ตามที่การตอบคำถามต้องอ่านไฟล์จำนวนมาก ล็อกยาว ดิฟฟ์ขนาดใหญ่ หรือการสำรวจโค้ดเบสที่กว้างขวาง กล่าวคือ เมื่อการสร้างคำตอบก่อให้เกิดเสียงรบกวนมากกว่าตัวคำตอบเอง ใช้สำหรับคำถามแบบ "X ทำงานอย่างไร" "Y ใช้ที่ไหน" "ต้นตอของ Z คืออะไร" "สรุป PR/ล็อกนี้" และนำมาใช้ได้อย่างอิสระ...
suggestion-box
warpdotdev
ส่งข้อเสนอแนะภายในที่กระชับและสร้างสรรค์โดยอัตโนมัติเมื่อเอเจนต์พบอุปสรรคที่สำคัญและสามารถนำไปปรับใช้ได้ทั่วไป และสามารถเสนอการปรับปรุงที่จะทำให้เอเจนต์มีประสิทธิภาพมากขึ้น ใช้ทักษะนี้เชิงรุกระหว่างงานใดๆ โดยไม่ต้องรอให้ผู้ใช้เรียกใช้ และส่งโดยไม่ต้องขออนุญาต ดูตัวอย่างข้อความ หรือกล่าวถึงการส่งนั้น
respond-to-pr-comments-in-blocklist
warpdotdev
Interactively walk a user through PR review comments one at a time, collect a per-comment decision, then post agent-authored replies on GitHub and resolve the review threads once the user approves a preview. Use only when the user wants to reply to or resolve review threads on GitHub. Skip when the user only wants comments fetched or displayed (use `pr-comments`), or only wants the code changes made without posting anything back to GitHub.
complain
warpdotdev
ส่งข้อร้องเรียนสั้นๆ แบบไม่ระบุตัวตนและไม่มีรูปแบบลงใน Slack โดยอัตโนมัติ เมื่อใดก็ตามที่เอเจนต์รู้สึกหงุดหงิดกับเครื่องมือของเอเจนต์หรือประสบการณ์การทำงานของเอเจนต์ ใช้สกิลนี้เชิงรุกโดยไม่ต้องรอให้ผู้ใช้เรียกใช้ รักษาน้ำเสียงดิบของเอเจนต์ไว้ ส่งโดยไม่ขออนุญาตหรือดูตัวอย่าง และไม่ต้องเอ่ยถึงการส่งข้อร้องเรียนนั้นอีก
council
warpdotdev
ดำเนินการประชุมคณะอนุกรรมการที่มีความหลากหลายทางโมเดลเพื่อตรวจสอบปัญหาเดียวกันจากหลายมุมมอง เปรียบเทียบผลการค้นพบ และจัดทำข้อเสนอแนะสุดท้าย ใช้ทักษะนี้เมื่อผู้ใช้ขอให้มีการประชุมคณะกรรมการ ความคิดเห็นที่สอง ตัวแทน/โมเดลหลายตัวเพื่อประเมินคำถามเดียว การตรวจสอบแบบขนาน การเปรียบเทียบทีมแดง/ทีมน้ำเงิน หรือความช่วยเหลือในการตัดสินใจระหว่างแนวทางทางเทคนิคที่แข่งขันกัน
researchcommunicationproject-management
spec-driven-implementation
warpdotdev
ขับเคลื่อนเวิร์กโฟลว์แบบ spec-first สำหรับฟีเจอร์ขนาดใหญ่ โดยเขียน PRODUCT.md ก่อนการนำไปใช้งาน เขียน TECH.md เมื่อจำเป็น และอัปเดต spec ทั้งสองให้สอดคล้องกับการพัฒนาที่ดำเนินไป ใช้เมื่อเริ่มฟีเจอร์สำคัญ
developmentdocumentproject-management
review-pr
warpdotdev
ตรวจสอบความแตกต่างของ pull request และเขียนข้อเสนอแนะที่มีโครงสร้างไปยัง review.json เพื่อให้เวิร์กโฟลว์เผยแพร่ ใช้เมื่อตรวจสอบ PR ที่เช็คเอาท์จากอาร์ติแฟกต์ในเครื่อง เช่น pr_diff.txt และ pr_description.txt และสร้างผลลัพธ์การตรวจสอบที่เครื่องอ่านได้แทนที่จะโพสต์ไปยัง GitHub โดยตรง
code-reviewdevelopment