Source profileQuality 91/100Review permissions

ZaxbyHub/opencode-swarm/.opencode/skills/ci-fix-monitor/SKILL.md

ci-fix-monitor

Monitor CI on a PR, diagnose failures, fix them, and re-push until green. Covers reading CI logs, classifying failure types (check-title, package-check, test failures, lint), determining the correct fix, and re-pushing.

Source repository stars
451
Declared platforms
0
Static risk flags
2
Last source update
2026-08-25
Source checked
2026-08-25

Decision brief

What it does: where it fits

Activates when the user asks to monitor CI, fix CI failures, or resolve red checks on a PR.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/ZaxbyHub/opencode-swarm --skill ".opencode/skills/ci-fix-monitor"
    Safe inspection promptEditorial

    Inspect the Agent Skill "ci-fix-monitor" from https://github.com/ZaxbyHub/opencode-swarm/blob/97dc624b391c8e2e80ed42f4bfa37876554c24cb/.opencode/skills/ci-fix-monitor/SKILL.md at commit 97dc624b391c8e2e80ed42f4bfa37876554c24cb. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Step 1 — Fetch current status

      Fetch all check runs for the PR head commit. If all green: report success and stop.

      Fetch all check runs for the PR head commit. If all green: report success and stop.
    2. 02

      Step 2 — Classify each failure

      Review the “Step 2 — Classify each failure” section in the pinned source before continuing.

      Review and apply the “Step 2 — Classify each failure” source section.
    3. 03

      Step 3 — Diagnose with logs

      For every failed check, fetch the full log content. Fetch only the tail (last 80–100 lines) unless the error is near the start.

      a failure introduced by this PR,a pre-existing failure on main (verify by checking main's last CI run fora failure caused by the CI environment or branch drift.
    4. 04

      Step 4 — Fix

      No commit needed. Update the PR title.

      No commit needed. Update the PR title.package-check validates the npm tarball (npm pack + tarball contents). A failure is a source/build/package-manifest problem, not generated-file drift. dist/ is generated and NOT committed — do not stage it. Run bun run…Fix the underlying source/build/package.json files manifest issue, then commit the source fix (not dist/) and push.
    5. 05

      Step 5 — Push and monitor

      After pushing, subscribe to PR activity (if in webhook/MCP context) and wait for the next CI event rather than polling. Do not push a second time until the CI result from the first push is confirmed.

      After pushing, subscribe to PR activity (if in webhook/MCP context) and wait for the next CI event rather than polling. Do not push a second time until the CI result from the first push is confirmed.If no CI event arrives after a reasonable wait (e.g., checks are still queued and stalled), re-fetch check status manually via getcheckruns and report the stall state to the user rather than waiting indefinitely.

    Permission review

    Static risk signals and limitations

    Runs scripts

    medium · line 96

    The documentation asks the agent to run terminal commands or scripts.

    bun run build

    Runs scripts

    medium · line 97

    The documentation asks the agent to run terminal commands or scripts.

    node --input-type=module -e "await import('./dist/index.js'); console.log('dist import OK')"

    Writes files

    medium · line 134

    The documentation asks the agent to create, modify, or delete local files.

    bunx biome format --write src/path/to/changed-file.ts

    Writes files

    medium · line 141

    The documentation asks the agent to create, modify, or delete local files.

    Do NOT run `bunx biome format --write .` on the entire repo unless instructed

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars451SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    ZaxbyHub/opencode-swarm
    Skill path
    .opencode/skills/ci-fix-monitor/SKILL.md
    Commit
    97dc624b391c8e2e80ed42f4bfa37876554c24cb
    License
    MIT
    Collected
    2026-08-25
    Default branch
    main
    View the original SKILL.md

    CI Fix & Monitor Protocol

    Activates when the user asks to monitor CI, fix CI failures, or resolve red checks on a PR.

    Environment note — tool availability

    This skill was originally written for desktop Claude Code (Windows) with gh CLI. In the remote execution / GitHub MCP environment, use the equivalent MCP tools instead:

    | Capability needed | gh CLI | Example remote-MCP shape (resolve the real names via ToolSearch) | |---|---| | gh pr checks <number> | mcp__github__pull_request_read method get_check_runs | | gh pr view <number> --json checks | mcp__github__pull_request_read method get_check_runs | | gh run view <run-id> --job <job-id> --log | mcp__github__get_job_logs with job_id and return_content: true | | gh pr edit --title | mcp__github__update_pull_request with title | | gh pr view --json mergeable | mcp__github__pull_request_read method get |

    MCP tool names are injected by the runtime harness and are NOT stable across environments. Treat the right-hand column as an example SHAPE only: resolve the actual tools by CAPABILITY (PR read with check-run support, job-log read, PR update) via ToolSearch before first use in a session — never assume a specific mcp__github__* name exists (issue #2131 finding 9).

    Step 1 — Fetch current status

    Fetch all check runs for the PR head commit. If all green: report success and stop.

    Step 2 — Classify each failure

    Failure typeRoot cause patternFix action
    check-titlePR title lacks <type>(<scope>): prefixUpdate title via PR edit
    package-checknpm tarball validation failed (source/build/package-manifest problem)Fix source/build/manifest — see section below. Not generated-file drift.
    branch behind mainBranch is behind main; main had a release commit; CI uses merge-commit checkoutRebase onto main, force-push — see section below
    lint/quality: formatCode style violations (long lines, spacing)bunx biome format --write <files> then commit
    lint/quality: lintLint rule violations (noExplicitAny, etc.)bunx biome check --write <files> or fix manually
    unit testTest failuresRead log, fix code, commit
    integrationIntegration failuresRead log, check if pre-existing on main
    macOS unit testCross-platform file I/O race (atomic write-then-read returns null on macOS)See "macOS file I/O fixes" below
    securitySAST/secret findingsRead log, fix or suppress with justification
    smokeSmoke test failuresRead log, check if environment-specific

    macOS file I/O fixes (cross-platform atomic write)

    macOS/APFS has different filesystem timing than Linux ext4. fs.renameSync can complete before the data is visible to subsequent reads. The most common manifestation is unit (macos-latest) failing on tests that write-then-read atomic files (e.g., curator atomic write > writeCuratorSummary > after write, readCuratorSummary reads file back successfully), while the same tests pass on ubuntu-latest and windows-latest.

    Canonical patterns: See file:.opencode/skills/writing-tests/SKILL.md § Cross-Platform Requirements → "macOS rename-visibility race" for the full three-layer fix pattern (bunWrite + ENOENT retry + Node FileHandle.sync() not fsync()). This skill is a triage pointer; the canonical technical reference lives in writing-tests so it survives any regeneration of this generated/ file.

    Related security test pattern: if the CI failure involves a long task ID or path, the security test ADVERSARIAL: Command Services Attack Vectors > Attack Vector 1: Malformed Arguments > EVIDENCE: extremely long task ID (buffer overflow) - ACCEPTED by regex but no crash requires a path length guard BEFORE validateSwarmPath in src/evidence/manager.ts:loadEvidence. See file:.opencode/skills/engineering-conventions/SKILL.md for the evidence file flow that this gate check triggers on macOS CI.

    Step 3 — Diagnose with logs

    For every failed check, fetch the full log content. Fetch only the tail (last 80–100 lines) unless the error is near the start.

    Read the log carefully before concluding root cause. Distinguish between:

    • a failure introduced by this PR,
    • a pre-existing failure on main (verify by checking main's last CI run for the same check), and
    • a failure caused by the CI environment or branch drift.

    Step 4 — Fix

    check-title

    No commit needed. Update the PR title.

    package-check failure

    package-check validates the npm tarball (npm pack + tarball contents). A failure is a source/build/package-manifest problem, not generated-file drift. dist/ is generated and NOT committed — do not stage it. Run bun run build locally only when you need the bundle to verify the failure:

    bun run build
    node --input-type=module -e "await import('./dist/index.js'); console.log('dist import OK')"
    

    Fix the underlying source/build/package.json files manifest issue, then commit the source fix (not dist/) and push.

    branch behind main (version drift)

    Identifying this case: A version string differs (version: "X.Y.Z" changed to a higher version) because main had a release commit after the branch was cut, and GitHub Actions checks out the merge-commit for CI. Rebase onto main to pick up the release commit.

    Fix:

    git fetch origin main
    git rebase origin/main       # fast-forward the branch onto the release commit
    # If the rebase halts with conflicts, run `git rebase --abort` and escalate
    # to the user — do not attempt to resolve a conflicted rebase automatically.
    git push --force-with-lease origin <branch>   # force-push is required after rebase
    

    --force-with-lease is safe here: it refuses to overwrite commits that appeared on the remote after your last fetch. After the rebase, the local branch has diverged from remote history — a regular push will be rejected.

    • Do NOT stage or commit dist/ — it is generated and NOT committed; there is no committed-dist drift check
    • After a rebase, a force-push is required and expected — do not try a regular push

    lint/quality: format violations

    Biome format violations (line too long, spacing, bracket style) — these can appear when a code change introduces a line that exceeds Biome's print-width. Auto-fix only the changed files to minimize noise:

    bunx biome format --write src/path/to/changed-file.ts
    bun test src/path/to/changed-file.test.ts   # verify tests still pass after format
    git add <files>
    git commit -m "style: apply Biome formatting"
    git push origin <branch>
    

    Do NOT run bunx biome format --write . on the entire repo unless instructed — this can introduce formatting changes in unrelated files and bloat the diff.

    lint/quality: lint rule violations

    bunx biome check --write <specific-file>
    # or fix manually if --write does not handle the rule
    

    integration failures

    Check whether the same check failed on main's last CI run before treating it as PR-introduced. If pre-existing: document the finding and skip. If introduced by this PR: collect the full failure log, the test name, and the first error line, then delegate to a coder with that evidence.

    security (SAST/secret findings)

    Fetch the full log. If it is a secret/credential finding: confirm the file and line, remove or rotate the credential, and commit the fix. If it is a SAST code-quality finding: collect the rule ID, file, and line, then delegate to a coder. Do NOT suppress findings without an explicit justification comment approved by the user.

    unit test / smoke failures

    Delegate to coder with specific failure details (test name, assertion, first error line). See execute skill.

    Step 5 — Push and monitor

    After pushing, subscribe to PR activity (if in webhook/MCP context) and wait for the next CI event rather than polling. Do not push a second time until the CI result from the first push is confirmed.

    If no CI event arrives after a reasonable wait (e.g., checks are still queued and stalled), re-fetch check status manually via get_check_runs and report the stall state to the user rather than waiting indefinitely.

    Step 6 — Verify all green

    Do NOT declare victory until ALL required checks pass. A check in skipped state is acceptable only if the same check was skipped on the base branch (i.e. the workflow gates on a path filter). Confirm this explicitly.

    Standalone retry bound

    When this skill is invoked directly (not composed via swarm-ci-monitor's own 5-iteration counter), cap fix-push cycles at 5 iterations. If the PR is still not green after 5 fix-push cycles, stop and escalate to the user with the last failing check and a short log excerpt rather than looping indefinitely.

    Frequently asked questions

    What to verify before installation and use

    What does the ci-fix-monitor source document cover?

    Activates when the user asks to monitor CI, fix CI failures, or resolve red checks on a PR.

    How do I install ci-fix-monitor?

    The source record exposes this install command: npx skills add https://github.com/ZaxbyHub/opencode-swarm --skill ".opencode/skills/ci-fix-monitor". Inspect the command and pinned source before running it.

    Which permission-related actions were detected?

    Static rules flagged exec-script, write-files in the source; the page lists the matching lines and excerpts.

    Alternatives

    Compare before choosing

    Computed 10029,034

    garrytan/gbrain

    bulk-ingestion

    End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

    Computed 10024,921

    alirezarezvani/claude-skills

    app-store-optimization

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

    Computed 1005,241

    dotnet/skills

    migrate-vstest-to-mtp

    Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

    Computed 991,257

    vipshop/cache-dit

    cache-dit-model-integration

    High-level guide for integrating a new DiT model into cache-dit: Cache (BlockAdapter/ForwardPattern), Context Parallelism, Tensor Parallelism, Text Encoder Parallelism (TE-P), VAE Parallelism (VAE-P), generate CLI, installation, testing workflow, and detailed references. Use when adding support for a new diffusion transformer model in cache-dit.