skill-koji-triage
Skill này làm gì
Skill này xem xét các bản build lỗi trong hệ thống build Koji, đọc thông tin và log tác vụ, rồi giải thích điều gì đã sai. Nó dành cho lập trình viên đóng gói phần mềm cần hiểu lý do build thất bại.
Khi nào nên dùng
- ✓Khi một tác vụ build Koji bị lỗi và bạn cần biết lý do.
- ✓Khi bạn muốn tải log build từ một trang web Koji.
- ✓Khi bạn cần tìm các gói bị hỏng trong một loạt bản build Koji.
Liên kết skill
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/skill-koji-triage/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tác vụ Koji 3307 bị lỗi. Bạn có thể lấy log và cho tôi biết nguyên nhân gốc không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent lấy các trang tác vụ và log từ giao diện web Koji, lưu chúng vào file, rồi tìm lỗi trong đó. Sau đó nó tóm tắt nguyên nhân gốc có khả năng nhất.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Koji Build Failure Triage
Koji Web UI
Base URL: Get from the user, or from env variable
KOJI_BASE_URL, or pre-configured in the MCP server.- If the env variable is not set, and the MCP is not pre-configured, prompt the user to input the base URL of the Koji Web UI (e.g.,
https://koji.example.com).
- If the env variable is not set, and the MCP is not pre-configured, prompt the user to input the base URL of the Koji Web UI (e.g.,
MCP tools (preferred): Use the
kojiMCP server tools to fetch pages and logs. These write output to temp files underbase/build/work/scratch/koji/to avoid bloating context. Useread_fileandgrep_searchon the resulting files to inspect content.Available tools:
koji_status,set_koji_url,koji_fetch,koji_allow_insecure,koji_cleanup. All tools return a dict with the result plus server state (base URL, output dir, etc.).- Call
koji_statusto check if a base URL is already configured (via env or a prior call). - Either call
set_koji_urlto set a default, or passoverride_base_urldirectly tokoji_fetchper-call. Setting a default is convenient when all requests target the same instance, andoverride_base_urlis useful for ad-hoc queries against other instances. - Call
koji_fetchwith the path (e.g.,/koji/taskinfo?taskID=3307). It returns the file path where content was saved.- If the fetch fails with an SSL certificate error (e.g., self-signed cert), ask the user if they want to skip SSL verification, then call
koji_allow_insecure(optionally withoverride_base_url) to proceed. Do NOT proceed without explicit user approval for the specific URL.
- If the fetch fails with an SSL certificate error (e.g., self-signed cert), ask the user if they want to skip SSL verification, then call
- Use
read_fileorgrep_searchon the saved file to extract the information you need. - Call
koji_cleanupwhen done to remove fetched temp files and reclaim disk space (NOTE: This will clean up ALL scratch files, so only call it when you're completely done with the current files).
- Call
MCP is required. If MCP tools are not working, ask the user to fix their MCP configuration rather than falling back to CLI tools.
Network issues: Koji is typically only accessible via VPN or corporate network. If you encounter connection errors or timeouts, assume it is a network permissions issue — ask the user to confirm they are connected to the appropriate network before retrying. Do NOT keep retrying on your own.
Discovery: Finding Builds by Package Name
When the user provides a package name instead of a task ID, use both discovery paths below to find all recent failures. Neither path alone is sufficient.
Why two paths? The package info page only lists builds where Koji created a build record. If a task fails early (e.g.,
buildSRPMFromSCMfails), no build record exists and the failure is invisible on the package page. The failed tasks list catches these, but doesn't filter by package — you must grep for the name. Always run both.
Path A: Package info page (finds builds with records)
- Search for the package:
/koji/search?match=glob&type=package&terms=<PACKAGE_NAME>
- If the exact name doesn't match, try a glob:
terms=<NAME>* - Extract the
packageIDfrom the results (look forpackageinfo?packageID=links) - If the search returns only one match, Koji redirects directly to the package info page (skip step 2).
- Get recent builds from the package info page:
/koji/packageinfo?packageID=<PACKAGE_ID>
- Look for
buildinfo?buildID=links with statefailed - Note the build NVRs (Name-Version-Release) for context
- Get the build's parent task ID:
/koji/buildinfo?buildID=<BUILD_ID>
- Extract the
taskinfo?taskID=link — this is the parentbuildtask - The parent task's Descendants section lists the actual failed child tasks (
buildArch,buildSRPMFromSCM)
Path B: Failed tasks list (catches failures with no build record)
Search the global failed tasks list for the package name:
/koji/tasks?owner=&state=failed&view=flat&method=build&order=-id
- This lists all recent failed
buildtasks, newest first - Grep the results for the package name to find relevant task IDs
- This catches early failures (e.g.,
buildSRPMFromSCMerrors, plugin/callback errors) that never create a build record and would be invisible on the package info page
Combine results
Collect the parent task IDs from both paths, deduplicate, then for each parent task:
- Fetch
taskinfo?taskID=<PARENT_ID>to see the Descendants tree - Identify which child task(s) failed (
buildSRPMFromSCMorbuildArch) - Proceed to th
Câu hỏi thường gặp
Có cần địa chỉ web Koji không?
Có. Skill dùng một địa chỉ gốc do bạn cung cấp, cài đặt môi trường hoặc máy chủ đặt sẵn, và sẽ hỏi bạn nếu chưa có.
Nếu trang có chứng chỉ lỗi thì sao?
Skill hỏi bạn có muốn bỏ qua kiểm tra chứng chỉ cho yêu cầu đó không.
Nó có thay đổi bản build nào không?
Các công cụ của skill chỉ lấy và đọc trang cùng log, đó là điều nó dùng để điều tra.
Chi tiết
Mô tả gốc của tác giả
[Skill] Examine Koji builds, fetch task info and logs from the Koji Web UI, identify failures, and provide root cause analysis. Use when triaging Koji build failures, investigating failed tasks, downloading build logs, or searching for broken packages. Triggers: koji failure, koji build failed, koji task, koji log, koji triage, build failure analysis.
repo: microsoft/azurelinux
Độ phổ biến
- Sao GitHub
- 5.4k
- Vị trí xếp hạng
- #14970
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
azldev-add-component
5.4kGiúp agent của bạn thêm một thành phần phần mềm mới vào bản build phân phối Linux azldev, từ việc kiểm tra đặc tả upstream đến xác thực kết quả.
azldev-build-component
5.4kGiúp agent của bạn build và gỡ lỗi một gói azldev, bao gồm vòng lặp render, build và kiểm thử cùng cách sửa các kiểm tra build bị lỗi.
azldev-comp-toml
5.4kGiúp agent của bạn viết, chỉnh sửa và xem xét các file định nghĩa thành phần mà azldev dùng để mô tả cách mỗi gói được build.
azldev-image
5.4kGiúp agent của bạn build, khởi động và kiểm thử một image Linux, chẳng hạn image container hoặc máy ảo, bằng các lệnh image của azldev.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.