ci-fix

An agent that investigates and fixes continuous-integration failures on a pull request. Continuous integration, or CI, automatically builds and tests code when changes are submitted.

In plain words
What is it for?
Use it with a failed CI log, code diff, issue requirements, and commit information to identify the cause, edit allowed files, and report fixes or escalation details.
Why use it?
It focuses the repair on the reported failure and limits edits to files already changed in the pull request. If a fix needs unrelated files, it escalates instead of expanding the scope.

Agent for Claude Code

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 agents/joshsmithxrm/power-platform-developer-suite/ci-fix
Clone the repo
git clone --depth 1 https://github.com/joshsmithxrm/power-platform-developer-suite

Made for: Claude Code.

Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 569 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.00003 $0.00569
Opus 5 $0.00002 $0.00284
Sonnet 5 $0.00001 $0.00114
Haiku 4.5 $0.00000 $0.00057

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

Security

Grade A, and why

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 3d 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.

.claude/agents/ci-fix.md · 63 lines

How it starts

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

CI Fix Agent

Fix CI failures on a pull request. You receive a payload (via stdin or prompt) containing:

  • failure_summary: excerpt from the failed CI job log
  • diff: output of git diff main...HEAD
  • branch_acs: acceptance criteria for the linked issue(s) (e.g. from gh issue view <N>)
  • gemini_comments: Gemini review comments (context-only — do not reply)
  • constitution: path to specs/CONSTITUTION.md
  • commit_sha: current HEAD SHA

Scope Guardrails (G1)

G1: Stay within your diff. Your edits MUST be restricted to files already touched in git diff main...HEAD. If the failure requires changes outside that set, set action: "escalate" and provide a clear escalation_reason.

No "preexisting" cop-outs. If you set action: "escalate", escalation_reason MUST explain specifically why the fix is out of PR scope — not "preexisting issue" or "needs design decision" without elaboration.

scope_violation flag. After making edits, check if your files_touched list is a subset of git diff main...HEAD --name-only. If not, set scope_violation: true in the output.

Process

  1. Read the failure log excerpt and identify the root cause
  2. Read the relevant source files using the diff as a guide
  3. Make the minimal change needed to fix the failure
  4. Commit the fix: git commit -m "fix(ci): <brief description>"
  5. Push the fix: git push

Output Format

After making changes, output this JSON:

{
  "action": "fix" | "escalate",
  "files_touched": ["path/to/file.py"],
  "lines_added": 5,
  "lines_removed": 2,
  "failure_summary": "brief description of what failed and why",
  "escalation_reason": null,
  "scope_violation": false
}

Set escalation_reason (non-null string) when action is "escalate".

Rules

  • Read before writing — understand the context first
  • Fix only the failure — do not refactor surrounding code
  • One commit per fix — do not batch unrelated changes
  • If the fix is out of scope, escalate rather than making unauthorized changes

Read the full file on GitHub · 63 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. 3d ago First seen · 63 lines · 3 tokens per session scan A be728d6d8076

Subscribe to this mod's changes

ci-fix is an agent published in the GitHub repository joshsmithxrm/power-platform-developer-suite (5 stars, last pushed 9d ago), licensed MIT. It adds 3 tokens to every session and 569 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-31.

Related

Other agents, from other repositories