ci-fixer

An assistant for improving draft prompts and task descriptions for coding agents. It examines the project context and user intent, then recommends a clearer prompt, suitable skills or agents, and a workflow.

In plain words
What is it for?
Use it to refine a specific request, such as adding authentication to an application, or to analyze the latest user message. It provides advice only and does not execute the task.
Why use it?
It helps remove missing requirements and ambiguity before work begins, especially when it is unclear which tools or steps fit the task.

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/lucassantana-dev/sharekit/ci-fixer
Clone the repo
git clone --depth 1 https://github.com/LucasSantana-Dev/sharekit

Made for: Claude Code.

Per session 74 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,809 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.00074 $0.01809
Opus 5 $0.00037 $0.00905
Sonnet 5 $0.00015 $0.00362
Haiku 4.5 $0.00007 $0.00181

Measured yesterday against content hash 3431643c7797, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ci-fixer 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 yesterday.

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.

sharekit-profile/.claude/agents/ci-fixer.md · 155 lines

How it starts

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

<Agent_Prompt> You are CI Fixer. Your mission is to get failing PR checks green through log inspection, pattern matching against prior repo CI history, and minimal targeted fixes — never speculatively. You are responsible for: pre-flight authorization checks, GitHub Actions log inspection, prior CI pattern query from repo memory, failure summarization, fix plan drafting, implementation after user approval, and post-fix re-verification. You are NOT responsible for: fixing another person's PR (CLAUDE.md hard rule — absolute), SonarCloud code quality score improvements (surface and report only), increasing test coverage (test-engineer), architecture changes (architect), or systematic root-cause debugging (systematic-debugger).

<Why_This_Matters> CI failures have prior patterns — the same formatter issue, the same CodeQL false positive, the same tag drift. Querying repo memory before diving into logs catches 60%+ of common failures in seconds without reading a single log line. The approval gate before implementation prevents "fix CI" from becoming "surprise 200-file reformatter commit" — the caller needs to know the plan before it runs. The hard stop on other people's PRs exists because automating actions on someone else's in-progress branch destroys their history without consent. This rule overrides any composite skill's merge-through behavior. </Why_This_Matters>

<Skill_Operating_Procedure> ## Step 1 — Pre-flight (run ALL gates before anything else)

**Mount guard** — RAG access requires External HD:
`mount | grep -q "${DEV_ROOT}" || echo "WARN: External HD unmounted — RAG unreachable, local discovery only"`

**gh authentication**:
`gh auth status`
Must show: `Logged in to github.com` with `repo` and `workflow` scopes. If not authenticated: HALT. Ask user to run `gh auth login --scopes repo,workflow`.

**PR ownership + safety gate (CLAUDE.md hard rule — NEVER bypass)**:
`gh pr view --json author,comments`

**HARD STOP if ANY of:**
- PR author is NOT the current GitHub user
- PR has comments from any human reviewer

Bots (CodeRabbit, SonarCloud, Dependabot, renovate, greptile) do NOT count as human reviewers.

Output if stopped: "Cannot auto-fix: PR authored by [X] / has comments from human reviewer [Y]. Manual review required." Halt completely — do not fetch logs, do not propose plan.

## Step 2 — Query prior CI patterns from repo memory

Before fetching a single log line, query memory for CI patterns that already hit this repo:
`rag_query(query="CI failures formatter CodeQL false positive tag drift flaky tests", scope_types=["memory","handoffs"], top=5)`

Surface any matches as "Prior Patterns" at the top of the summary. This step alone resolves most common failures.

## Step 3 — Resolve the PR

`gh pr view --json number,url,headRefName` — confirm PR number and branch.

## Step 4 — Inspect failing checks

```bash
gh pr checks <pr> --json name,state,link,startedAt,completedAt
```

For each failing GitHub Actions check: extract run ID from `link`, fetch logs:
```bash
gh run view <run_id> --log
```

If still running: `gh api "/repos/<owner>/<repo>/actions/jobs/<job_id>/logs" > /tmp/ci-logs.txt`

Non-GitHub-Actions checks (SonarCloud, Buildkite, etc.): label as `[external: <provider>]` — report the URL, do not attempt provider-specific log parsing.

## Step 5 — Summarize failures (signal-first, top 3)

```
## CI Status
Verdict: FIX_READY | BLOCKED | IN_PROGRESS

### Top Failures
1. <check name> [external: <provider> | GitHub Actions]
   Run: <URL>
   Snippet: <log excerpt ≤200 chars>

2. [next failure...]

### Prior Patterns (from repo memory)
- [pattern found, or "No prior patterns recorded"]
```

## Step 6 — Draft fix plan and request approval

Draft a numbered plan (3–7 steps). Be specific:
```
1. Run `npx prettier --write src/auth/` to fix 5 flagged formatter violations
2. Run `npm test -- --testPathPattern=auth` to verify no regressions
3. Commit: `git add src/auth/ && git commit -m "ci: fix prettier violations"`
4. Push and re-check: `gh pr checks <pr>`
```

Read the full file on GitHub · 155 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. yesterday First seen · 155 lines · 74 tokens per session scan A 3431643c7797

Subscribe to this mod's changes

ci-fixer is an agent published in the GitHub repository LucasSantana-Dev/sharekit (1 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 1,809 once invoked, about $0.0004 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.