Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/openshift-eng/ai-helpers/detect-permafailgit clone --depth 1 https://github.com/openshift-eng/ai-helpersWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/openshift-eng/ai-helpers/detect-permafail)<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/detect-permafail"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/detect-permafail.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00009 | $0.00557 |
| Opus 5 | $0.00005 | $0.00279 |
| Sonnet 5 | $0.00002 | $0.00111 |
| Haiku 4.5 | $0.00001 | $0.00056 |
Grade A, and why
detect-permafail scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Name
ci:detect-permafail
Synopsis
/ci:detect-permafail --job-urls="[url1,url2,...]" --job-name="job-name" --pr="owner/repo#123"
Description
Analyzes 2-10 consecutive failures of the same job to determine if they represent a systematic/permanent failure (permafail) versus a flaky failure. This is critical for CI/CD pipeline analysis to distinguish between:
- Permafail: A systematic failure affecting the same test(s) or infrastructure issue, detected by analyzing comparable runs (same failure type):
- Separates test failures from infrastructure failures
- Applies thresholds based on comparable run count (not total URLs)
- 2-3 comparable runs: All must match (100% required)
- 4-5 comparable runs: At least 4 must match (80% required)
- 6-10 comparable runs: At least ceil(count×0.7) must match (70% required)
- Example: 7 URLs where 5 are test failures and 4 of those 5 have same test → 4/5 = 80% → PERMAFAIL
- Flaky: Non-deterministic failures with varying root causes, or failures that don't meet the permafail thresholds
How It Works
The command uses a deterministic Python classifier script for artifact-based failure classification, compares failure signatures across runs, and returns a JSON result with the permafail verdict, confidence score, failure type, and detailed signatures for each run.
Implementation
- Load the "detect-permafail" skill
- Pass the job URLs, job name, and PR info to the skill
- The skill handles all analysis including:
- Artifact fetching and classification via
plugins/ci/scripts/classify-job-failures.py - Signature comparison and pattern detection
- Threshold-based permafail determination
- Artifact fetching and classification via
Arguments
--job-urls: JSON array of 2-10 consecutive Prow job URLs (required, newest first)--job-name: Name of the job being analyzed (required, e.g., "e2e-aws-ovn")--pr: PR identifier (required, format: "owner/repo#number")
Prerequisites
- Access to Prow CI job artifacts via gcsweb URLs
- Access to Bash for running the classifier script
- Python with the
requestspackage available
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 47 lines · 9 tokens per session scan A 6a9b3863084d
detect-permafail is a command published in the GitHub repository openshift-eng/ai-helpers (116 stars, last pushed yesterday), licensed Apache-2.0. It adds 9 tokens to every session and 557 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
monitor-ci
You are the orchestrator for monitoring Nx Cloud CI pipeline executions and handling self-healing fixes. You spawn the ci-monitor-subagent subagent to poll CI status and make decisions based on the results.
actions
Command "actions" from openclaw/crabbox, covering actions, subcommands, hydrate, register and dispatch.
dart-fix-ci
Command "dart-fix-ci" from dartsim/dart, covering required reading, workflow and output.
domains
Apply the CLI runtime and safety contract before executing a command. Runtime --help is authoritative.
access
Apply the CLI runtime and safety contract before executing a command. Runtime --help is authoritative.
analyst
Use when performing local analyst review before pushing PR changes. Assesses code quality, impact analysis, and maintainability.