Investigates why a Konflux PipelineRun failed by drilling through PLR conditions, failed TaskRuns, pod status, container exit codes, and timing. Use for 'why did my build fail?' or 'PLR failed'.
Ships in investigating-failed-plrs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Help user answer: "Why did my PipelineRun fail?"
Work through these steps interactively — ask user for input when needed, skip steps where info already provided.
oc CLI with KubeArchive plugin installed - check this with oc ka version (if not, let user install using https://kubearchive.github.io/kubearchive/main/cli/installation.html)yq and jq available - check with yq --version and jq --versionoc whoami --show-server)Check currently logged-in cluster:
oc whoami --show-server
Ask user for the tenant namespace (<something>-tenant). Verify access:
oc get namespace/<tenant>
If you have a skill for listing available Konflux clusters, use it. Otherwise, ask the user which cluster to connect to.
If login is needed, suggest:
oc login --web <api_server>
IMPORTANT: KubeArchive wraps results in .items[] — always use yq '.items[0]...'.
If user already provided a specific PipelineRun name, skip to Step 3.
Find recent failed ones:
oc ka get -n <tenant> --limit 20 pipelinerun -o yaml | yq '.items[] | select(.status.conditions[0].status != "True") | [.metadata.name, .status.conditions[0].reason, .metadata.creationTimestamp] | @tsv'
If no failures found with the above, list all recent PLRs and let user pick:
oc ka get -n <tenant> --limit 10 pipelinerun
Note the PipelineRun name for use in the next steps.
Run the bundled error analysis script (it fetches the PLR via KubeArchive):
<skill_dir>/check-plr-errors.sh <tenant> <pipelinerun-name>
This script:
Review the output. The script classifies failures into known categories (blue) vs unknown (red). Focus on red items — those need investigation.
Run the bundled timing analysis script (it fetches the PLR via KubeArchive):
<skill_dir>/check-plr-timings.sh <tenant> <pipelinerun-name>
This script:
Even for failed PLRs, timing is valuable — it shows whether the failure happened early or late, whether the PLR was stuck pending, and which task was running when it failed.
All scripts share a local cache directory (./collected-data/, overridable via PLR_CACHE_DIR). Artifacts are only downloaded once — subsequent runs reuse cached files. Use these cached files for followup investigation instead of re-fetching from KubeArchive.
To collect all artifacts (PLR, TaskRuns, Pod manifests, and container logs) for deeper offline investigation:
<skill_dir>/collect-plr-artifacts.sh <tenant> <pipelinerun-name>
This downloads everything via KubeArchive into the shared cache. Run it when the error/timing scripts don't provide enough detail and you need to read full container logs or inspect pod state.
Note: oc ka logs returns an error for containers with empty logs (treats them as non-existent), so a "Failed to fetch" message for a log does not necessarily mean something went wrong — the container may simply have produced no output.
Naming conventions:
collected-pipelinerun-<plr-name>.yamlcollected-taskrun-<taskrun-name>.yamlcollected-pod-<pod-name>.yamlpod-<pod-name>-<container-name>.logReusing cached data in followup investigation:
yq '.items[0]...' collected-data/collected-taskrun-<name>.yamlyq '.items[0]...' collected-data/collected-pipelinerun-<name>.yamlyq '.items[0]...' collected-data/collected-pod-<name>.yamlcat collected-data/pod-<pod-name>-<container-name>.logls collected-data/TODO: This section needs human touch to make it practical and easy to follow
Based on scripts output, investigate further:
If PLR was Cancelled or Stopped:
If TaskRun had ImagePullFailed:
If TaskRun was OOMKilled:
If container failed with non-zero exit code:
workingDir in Task)If PLR was stuck pending (large creation→start gap):
/investigating-slow-builds insteadIf TaskRun had PodCreationFailed:
oc auth can-i create pods --as=system:serviceaccount:<namespace>:<sa-name>If workspace or volume mount errors occurred:
oc get pvc -n <tenant>If permission or RBAC errors ("Forbidden", "unauthorized"):
oc get sa <sa-name> -n <tenant>oc get rolebindings -n <tenant>oc auth can-i <verb> <resource> --as=system:serviceaccount:<namespace>:<sa-name>If PLR timed out:
Summarize:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
/investigating-failed-plrs:investigating-failed-plrsfrom investigating-failed-plrs
npx claudepluginhub konflux-ci/agent-plugins --plugin investigating-failed-plrs2 plugins in one repository ship this exact skill · first indexed Sep 17, 2026