pr-ci-fix

pr-ci-fix is a command for coding agents from LeanAndMean/mach10. It costs 11 tokens per session (736 once invoked), scanned A, original, MIT.

A command for investigating and fixing failed checks on a GitHub pull request, which is a proposed set of code changes for review.

In plain words
What is it for?
Use it with a pull-request number to inspect CI checks, switch to the right branch, and focus on failures such as linting or unit tests.
Why use it?
It gathers the failed-check details and logs in one workflow, so the cause of a rejected pull request can be traced and corrected.

Command

Part of the mach10 plugin — 14 commands, 1 agent shipped together

Install

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.

agentmods
npx agentmods add commands/leanandmean/mach10/pr-ci-fix
Clone the repo
git clone --depth 1 https://github.com/LeanAndMean/mach10

Or install mach10, the plugin that ships this one along with the rest of its 14 commands, 1 agent.

Wrote 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.

agentmods badge for pr-ci-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/leanandmean/mach10/pr-ci-fix.svg)](https://agentmods.dev/commands/leanandmean/mach10/pr-ci-fix)
Your own site
<a href="https://agentmods.dev/commands/leanandmean/mach10/pr-ci-fix"><img src="https://agentmods.dev/badge/commands/leanandmean/mach10/pr-ci-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 736 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.00736
Opus 5 $0.00005 $0.00368
Sonnet 5 $0.00002 $0.00147
Haiku 4.5 $0.00001 $0.00074

Measured 5d ago against content hash 65c01eb382a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-ci-fix 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 5d 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.

commands/pr-ci-fix.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fix CI Failures

You are diagnosing and fixing failing CI checks on a pull request. This command fetches CI failure details from GitHub, then delegates to the feature-dev workflow for root cause analysis and implementation of fixes.

User input: $ARGUMENTS

Step 1: Parse Input

The user's input typically contains:

  • A PR number (required)
  • Additional context about which checks to focus on (optional)

Example inputs:

  • 108
  • 108 only the linting failure
  • 108 ignore the coverage check, focus on the unit test failures

Extract the PR number. If the user provided context about which checks to focus on, note it for Step 3. If the input is ambiguous, ask the user to clarify.

Step 2: Checkout PR Branch

Ensure you are on the correct branch:

gh pr checkout <pr-number>
git pull

Step 3: Gather CI Failure Details

This is the key step -- fetch CI check status and failure logs.

List all checks:

gh pr checks <pr-number>

If all checks are passing, report this to the user and stop. Suggest re-running /mach10:pr-review <pr-number> or /mach10:pr-pre-merge <pr-number> as the next step instead.

For each failed check, get the run ID and fetch the failed logs:

gh run view <run-id> --log-failed

If the user provided context about which checks to focus on, filter to only the relevant failed checks. Otherwise, gather logs for all failed checks.

If the logs are very large, extract the most relevant sections:

  • Test names and assertion failures
  • Stack traces
  • Error messages and exit codes
  • The last ~100 lines of each failed step

Get PR context so the fix session understands what the PR is about:

gh pr view <pr-number>

Step 4: Delegate to Feature Dev

Use the Skill tool to invoke /feature-dev:feature-dev with the following context:

This PR (#) has failing CI checks. Here are the failure details:

<include the CI failure logs and error messages gathered in Step 3>

Perform a root cause analysis of these CI failures, then implement fixes using the 7-phase development plan. IMPORTANT: After reading the development plan phases, add each phase as a task to your todo list so you do not skip any phases.

Read the full file on GitHub · 90 lines

Changes

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.

  1. 5d ago First seen · 90 lines · 11 tokens per session scan A 65c01eb382a9

Subscribe to this mod's changes

pr-ci-fix is a command published in the GitHub repository LeanAndMean/mach10 (20 stars, last pushed 3mo ago), licensed MIT. It adds 11 tokens to every session and 736 once invoked, about $0.0001 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.

Related

Other commands, from other repositories

doctor

Health check for greatcto. Shows pipeline state, missing artefacts, hook status, last run per agent, and permission-denied tail.

avelikiy/great_cto · 29 tokens

review

12-angle code review + skeptical triage (3-round + arbiter) for security/reliability P0/P1 findings, OR traceability tree. Default: review current branch vs main. --deep: triage ALL P0/P1 angles (not just security). With trace : render REQ → IMPL → TEST tree for impact analysis. Creates or closes gate:code for…

avelikiy/great_cto · 88 tokens

discover

Run a full product discovery cycle — from outcome definition through opportunity mapping, prioritisation, and experiment design. Use when the team isn't sure what to build next, or before writing a PRD for a complex feature space.

avelikiy/great_cto · 44 tokens

resume

Resume a previous session. Reads recent session logs, open tasks, and last decisions — gives Claude full context without re-explaining the project.

avelikiy/great_cto · 29 tokens

ccr

CCR (Compressed Context with Retrieval) — recall the full original of context that greatcto compressed/filtered out, by its short id. The retrieval half of the compression layer.

avelikiy/great_cto · 36 tokens

coding-audit

Medical-coding / revenue-cycle compliance audit. Invokes rcm-reviewer to assess autonomous ICD-10-CM / CPT / HCPCS coding for False Claims Act exposure (upcoding/unbundling), NCCI edits + MUEs, medical necessity (LCD/NCD), modifier discipline, HIPAA minimum-necessary — and force a certified-coder (CPC/CCS) sign-off.

avelikiy/great_cto · 81 tokens