AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Gh Fix Ci

skill-graysurf-agent-kit-gh-fix-ci · by graysurf

A Claude skill from graysurf/agent-kit.

No reviews yet
0 installs
11 views
0.0% view→install

Install

$ agentstack add skill-graysurf-agent-kit-gh-fix-ci

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-graysurf-agent-kit-gh-fix-ci)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
Archived

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Gh Fix Ci? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

GitHub CI Auto Fix

Contract

Prereqs:

  • Run inside the target git repo (or pass --repo).
  • git, gh, and python3 available on PATH.
  • semantic-commit and git-scope available on PATH (required for commits).
  • Evidence primitives and workflow skills available for unattended fix loops:

test-first-evidence, agent-scope-lock, canary-check, web-evidence, and browser-qa.

  • gh auth status succeeds for the repo (workflow scope required for logs).
  • Push access to the target branch (PR branch or specified branch).

Inputs:

  • --repo : repo working directory (default .).
  • --pr : PR number or URL (optional).
  • --ref : branch name or commit SHA (optional).
  • --branch : branch name to inspect (alias of --ref).
  • --commit : commit SHA to inspect (alias of --ref).
  • --limit : max workflow runs to inspect when using branch/commit targets (default 20).
  • PR-only flags: --required (only required checks).
  • Optional log extraction flags: --max-lines, --context, --json.

Outputs:

  • One or more fix commits pushed to the target branch.
  • CI ends green (no failing required checks) or a terminal report of what blocked automation.
  • Text summary or JSON report of failing checks (including log snippets when available) for each iteration.

Exit codes:

  • N/A (multi-command workflow; failures surfaced from underlying commands).

Failure modes:

  • Not inside a git repo or unable to resolve the PR/branch/commit target.
  • gh missing or unauthenticated for the repo.
  • semantic-commit/git-scope missing (cannot auto-commit).
  • gh pr checks field drift; fallback fields still fail.
  • gh run list failed for branch/commit targets.
  • Logs unavailable (pending, external provider, or job log is a zip payload).
  • Insufficient permissions to push to the target branch.

Scripts (gh-fix-ci entrypoints)

  • $AGENT_HOME/skills/automation/ci/gh-fix-ci/scripts/gh-fix-ci.sh
  • $AGENT_HOME/skills/automation/ci/gh-fix-ci/scripts/inspect_ci_checks.py

Evidence and guardrail records are created by invoking the nils-cli primitives directly from the workflow. Do not add gh-fix-ci script flags for evidence unless a future change needs deterministic script-owned behavior.

TL;DR (fast paths)

$AGENT_HOME/skills/automation/ci/gh-fix-ci/scripts/gh-fix-ci.sh --pr 123
$AGENT_HOME/skills/automation/ci/gh-fix-ci/scripts/gh-fix-ci.sh --ref main
$AGENT_HOME/skills/automation/ci/gh-fix-ci/scripts/inspect_ci_checks.py --ref main --json

Trigger

Use this skill when the user wants end-to-end CI fixing (no manual review pauses): diagnose, fix, commit, push, and keep iterating until CI is green.

Test-First Evidence Gate

  • Before editing production behavior, capture failing-test evidence or an explicit waiver with test-first-evidence.
  • This gate applies before editing production behavior.
  • CI failure evidence may satisfy the failing-test evidence requirement when it includes the failing check, command/log snippet, exit status

or failure classification, and affected test/job name.

  • If the fix is docs-only, generated-only, infra-unavailable, or cannot be reproduced locally, record a waiver reason and substitute

validation before editing production files.

  • Each behavior-changing iteration starts a record before edits:

``bash test-first-evidence init --out /test-first \ --classification \ --production-path \ --format json ``

  • Record CI failure evidence before edits when CI is the failing signal:

``bash test-first-evidence record-failing --out /test-first \ --command "" \ --exit-code \ --summary ": " \ --test-name "" \ --artifact \ --format json ``

  • Record an explicit waiver before edits when the failure is docs-only, generated-only, infrastructure-only, external-provider-only, or not

locally reproducible:

``bash test-first-evidence record-waiver --out /test-first \ --reason "" \ --substitute-validation "" \ --format json ``

  • After the fix and before semantic-commit-autostage, push, or final report, record and verify final validation:

``bash test-first-evidence record-final --out /test-first \ --command "" \ --status pass \ --summary "" \ --format json ``

then test-first-evidence verify --out /test-first --format json.

  • Each fix iteration summary must include Change classification, Failing test before fix or Waiver reason, Final validation, and

the test-first-evidence.json path.

Scope And Auxiliary Evidence Primitives

  • Create or choose a project run directory for evidence, usually:

agent-out project --topic gh-fix-ci --mkdir

  • Scope safety:
  • Read the current lock before edits with agent-scope-lock read --format json.
  • If an agent-scope-lock is active, run agent-scope-lock validate --changes all --format json before staging, committing, pushing, or

reporting completion. Stop if validation reports out-of-scope changes.

  • If gh-fix-ci creates a temporary lock for the assigned repair scope, use

agent-scope-lock create --path --owner gh-fix-ci --note --format json, then clear it on successful completion with agent-scope-lock clear. If the temporary lock remains, the final report must say why.

  • Caller-owned local canary:
  • Use canary-check when one caller-owned local command is the appropriate post-fix canary:

canary-check run --out /canary --name --command "" --expect-exit 0 --format json then canary-check verify --out /canary --format json.

  • Do not use canary-check to replace project-required tests, release gates, or CI watch; it records one cited local outcome.
  • Static web evidence:
  • Use web-evidence capture --out /web-evidence --label --format json only for

static URL evidence related to CI logs, deployment previews, or status pages.

  • web-evidence does not drive a browser, execute JavaScript, reuse cookies, or store auth headers.
  • Active browser evidence:
  • Use browser-qa, backed by Browser, Chrome, Playwright, or agent-browser, when evidence requires browser behavior such as JavaScript,

screenshots, console summaries, DOM interaction, authenticated browser state, browser-only status evidence, or deploy preview inspection.

  • Do not persist raw cookies, credentials, auth headers, or full unredacted network logs.

Workflow

  1. Verify gh authentication with gh auth status. If unauthenticated, ask the user to run gh auth login (repo + workflow scopes).
  2. Create a run directory for evidence and read any active scope lock:
  • agent-out project --topic gh-fix-ci --mkdir
  • agent-scope-lock read --format json
  1. Resolve the target:
  • If the user provided --pr, use it.
  • If the user provided --ref/--branch/--commit, use that.
  • Otherwise attempt gh pr view --json number,url on the current branch; if unavailable, fall back to the current branch name (or HEAD

commit when detached).

  1. Inspect failing checks (GitHub Actions only):
  • For PR targets: run inspect_ci_checks.py, which calls gh pr checks.
  • For branch/commit targets: run inspect_ci_checks.py, which calls gh run list + gh run view.
  • For each failure, capture the check name, run URL, and log snippet.
  1. Handle external providers:
  • If detailsUrl is not a GitHub Actions run, label as external and report the URL only.
  • For static external status URLs, optionally capture redacted evidence with web-evidence capture.
  • For browser-only deploy/status evidence, use browser-qa instead of web-evidence.
  1. Auto-fix loop (repeat until green):
  • Reproduce locally when feasible (prefer the repo’s documented lint/test commands; otherwise use the failing command shown in logs).
  • Capture the Test-First Evidence Gate before production edits in each behavior-changing iteration by recording either

test-first-evidence record-failing or test-first-evidence record-waiver.

  • Implement the minimal fix; avoid refactors.
  • Run the most relevant local validation command(s) as a gate (lint/test/build as applicable).
  • When a single caller-owned local validation command is the right canary, record it with canary-check run and canary-check verify.
  • Record final validation with test-first-evidence record-final, then verify with test-first-evidence verify.
  • If an agent-scope-lock is active, run agent-scope-lock validate --changes all --format json.
  • Commit using semantic-commit-autostage (single commit per iteration unless splitting is clearly beneficial).
  • Push the current branch (update the PR branch when targeting a PR).
  • Wait for CI:
  • PR: gh pr checks --watch --interval 10 --required (wait until required checks finish, then confirm pass/fail)
  • Branch/commit: watch the latest run for the pushed SHA (use gh run list then gh run watch --interval 10 --exit-status)
  • If CI still fails, inspect again and continue the loop.

Notes

  • inspect_ci_checks.py returns exit code 1 when failures remain so it can be used in automation.
  • Pending logs are reported as log_pending; rerun after the workflow completes.
  • Guardrail: if the failure indicates missing secrets, infra outage, or an external provider, stop and report the blocking detail/URL

instead of guessing.

  • Guardrail: do not preserve raw CI logs, cookies, credentials, auth headers, or unredacted browser/network artifacts; cite redacted

evidence records instead.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.