skill-koji-triage
What it does
This skill looks at failed builds in a Koji build system, reads task information and logs, and explains what went wrong. It is for developers who package software and need to understand build failures.
When to use it
- ✓When a Koji build task has failed and you need to know the reason.
- ✓When you want to download build logs from a Koji web page.
- ✓When you need to search for broken packages in a batch of Koji builds.
Skill link
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/skill-koji-triage/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Koji task 3307 failed. Can you pull the logs and tell me the root cause?”
5 new skills a week. 1 minute to read.
How it works
The agent fetches task pages and logs from the Koji web interface, saves them to files, and searches them for errors. It then summarizes the most likely root cause.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
Does it need a Koji web address?
Yes. The skill uses a base address from you, an environment setting or a preset server, and asks you for one if none is set.
What if the site has a bad certificate?
The skill asks whether you want to skip the certificate check for that request.
Does it change any builds?
The skill's tools fetch and read pages and logs, which is what it uses for investigation.
Details
Original description by the author
[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
Popularity
- GitHub stars
- 5.4k
- Ranking position
- #14970
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
azldev-add-component
5.4kHelps your agent add a new software component to an azldev Linux distribution build, from inspecting the upstream spec to validating the result.
azldev-build-component
5.4kHelps your agent build and debug an azldev package, including the render, build and test loop and fixes for failing build checks.
azldev-comp-toml
5.4kHelps your agent write, edit and review the component definition files that azldev uses to describe how each package is built.
azldev-image
5.4kHelps your agent build, boot and test a Linux image, such as a container or virtual machine image, using the azldev image commands.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.