agentleFS
kossakovskykossakovsky/selfhost-ai/.claude/skills/fix-issues/SKILL.md

fix-issues

Skill940 starsChanged 2 months agoApache-2.0View on GitHub

Fix a batch of open GitHub issues end to end - one git worktree and one agent per issue (feature-dev for implementation, review-pr for review), individual PRs into develop, a release PR to main with a final multi-agent integration review, and optional tag/release/issue-comment publishing. Use when the user asks to sweep and fix open issues of this repo.

  • Reads credentials
  • Commits and pushes

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. FerroxLabs/wayland★ 608same name
    2. CES-Ltd/TitanX★ 48same name
    3. AI-Answer/Agent-Club★ 9same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 3 are distinctive, and 13 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If develop is strictly behind main (0 unique commits), fast-forward it: git push origin origin/main:develop.

    line 16
  2. Very specific:

    If develop has unique commits, ask the user how to proceed before branching anything.

    line 17
  3. Very specific:

    All fix branches are created from origin/develop.

    line 18
  4. Very specific:

    Read EVERY issue in scope with comments: gh issue view <n> --comments.

    line 23
  5. Distinctive:

    Ask the user (AskUserQuestion) before starting work:

    line 25
  6. Distinctive:

    Create worktrees as siblings of the repo:

    line 33
  7. Very specific:

    Use fix/ for bugs, feat/ for features (feat!

    line 37
  8. Very specific:

    Read its PR diff (gh pr diff <pr>) and sanity-check it yourself — minimal, on-topic, matches the report.

    line 53
  9. Very specific:

    Check mergeability: gh pr view <pr> --json mergeable -q .mergeable.

    line 54
  10. Very specific:

    After ALL merges, validate the combined develop: full bash -n list from CLAUDE.md "Testing Changes", python3 -m py_compile …

    line 56
  11. Very specific:

    Commit (chore: release X.Y.Z), push develop.

    line 61
  12. Very specific:

    If an external reviewer bot (e.g.

    line 70
  13. Very specific:

    Verify the issues auto-closed, then comment on each: fixed in release (link), one-line what changed, any caveat specific to that issue, and …

    line 77
  14. Distinctive:

    Remove worktrees and branches once merged:

    line 81
  15. Very specific:

    When a fix removes a service, grep the whole repo for its name at the end.

    line 93
  16. Very specific:

    Never log success after a suppressed command (|| true).

    line 94

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Batch Issue Fixing Pipeline

Arguments: $ARGUMENTS — optional space-separated issue numbers to limit the batch. Empty means all open issues.

This skill encodes the full process: triage -> parallel fixes in isolated worktrees -> merge into develop -> release -> final review -> publish. Follow the phases in order. All gh commands run from the repo root (no --repo flag needed).

Phase 0 — Preflight

  1. git fetch origin and confirm the working tree is clean (git status --short). If dirty, stop and ask the user.
  2. Compare branches: git rev-list --left-right --count origin/main...origin/develop.
    • If develop is strictly behind main (0 unique commits), fast-forward it: git push origin origin/main:develop.
    • If develop has unique commits, ask the user how to proceed before branching anything.
  3. All fix branches are created from origin/develop.

Phase 1 — Triage

  1. List issues: gh issue list --state open --limit 100 --json number,title,labels.
  2. Read EVERY issue in scope with comments: gh issue view <n> --comments. Comments often contain the real root cause or a maintainer-agreed approach.
  3. Build a summary table (number, type bug/feature, one-line problem). Explicitly check for duplicates and overlapping fixes.
  4. Ask the user (AskUserQuestion) before starting work:
    • Scope: which issues go into this batch (call out breaking changes and pure feature requests separately).
    • Whether to auto-merge fix PRs into develop or leave them open for manual review.
    • Anything that looks external/not-a-bug (e.g. Docker Hub rate limits): propose fix / message-only / skip-and-close options.
  5. Decide the version bump now (semver table in CLAUDE.md) so the release phase is mechanical. The user may override.

Phase 2 — Parallel fixes (one worktree + one agent per issue)

  1. Create worktrees as siblings of the repo:
    git worktree add ../<repo-name>-worktrees/issue-<n> -b fix/issue-<n>-<slug> origin/develop
    Use fix/ for bugs, feat/ for features (feat! commit prefix for breaking changes).
  2. Launch one background agent per issue, all in parallel. Each agent prompt MUST include:
    • Work EXCLUSIVELY in its worktree path; never touch the main checkout.
    • Work fully autonomously; never wait for user input.
    • Step 1: read the issue with gh issue view <n> --comments and the worktree's CLAUDE.md.
    • Step 2: invoke the Skill tool with feature-dev:feature-dev to implement. Skip interactive steps; prefer the minimal robust fix.
    • Step 3: commit with a conventional-commit message.
    • Step 4: invoke the Skill tool with pr-review-toolkit:review-pr on the diff origin/develop...HEAD. Fix ALL critical and important findings; ignore nitpicks. Commit fixes.
    • Step 5: git push -u origin <branch> and open a PR to develop with gh pr create --base develop. Body in plain English: summary, what changed, verification, and the line Fixes #<n>.
    • Constraints: do NOT modify CHANGELOG.md or VERSION (prevents 7-way merge conflicts; release handles both). Verification: bash -n on every changed script, cp .env.example .env (gitignored, delete after) + docker compose -p localai config --quiet, node --check welcome/app.js if touched. Docker CLI may not be on PATH — try /usr/local/bin/docker.
    • Known facts from the codebase report (file, line numbers, verified behavior) — give each agent everything already learned during triage.
    • Push the agent to verify root causes upstream (WebFetch the upstream repo/Dockerfile/entrypoint) rather than trusting the issue's proposed fix. Issues regularly misdiagnose (wrong mount path vs stale volume; missing tool vs wrong endpoint).

Phase 3 — Merge into develop

As each agent finishes (do not wait for all):

  1. Read its PR diff (gh pr diff <pr>) and sanity-check it yourself — minimal, on-topic, matches the report.
  2. Check mergeability: gh pr view <pr> --json mergeable -q .mergeable. UNKNOWN right after another merge is normal — poll a few times with short sleeps.
  3. Merge with a merge commit (repo convention): gh pr merge <pr> --merge. Resolve conflicts manually if CONFLICTING.
  4. After ALL merges, validate the combined develop: full bash -n list from CLAUDE.md "Testing Changes", python3 -m py_compile start_services.py, node --check welcome/app.js, compose config with a temp .env, and a repo-wide grep for anything a removal-type fix should have fully cleaned.

Phase 4 — Release on develop

  1. In a develop worktree: set VERSION, add the CHANGELOG.md section ## [X.Y.Z] - <today> under [Unreleased] with Added/Changed/Removed/Fixed entries in the file's established style (one bold service name + detailed prose + (#issue) per entry). Match the file's actual conventions, not assumed ones (e.g. this changelog has never used compare links at the bottom).
  2. Commit (chore: release X.Y.Z), push develop.
  3. Open the release PR: gh pr create --base main --head develop --title "Release X.Y.Z" with a per-issue summary and Fixes #<n> lines for every issue in the batch (auto-close only fires when the merge reaches main, so these lines belong HERE, not only in the fix PRs).

Phase 5 — Final integration review

The per-fix reviews cannot see interactions between fixes, so review the aggregate diff origin/main...origin/develop:

  1. Launch review agents in parallel (read-only, on the main checkout): pr-review-toolkit:code-reviewer, pr-review-toolkit:comment-analyzer, pr-review-toolkit:silent-failure-hunter. Skip test/type analyzers (no test suite, no typed code here).
  2. Point them explicitly at cross-fix interactions (e.g. does fix A's preserve/cleanup logic interact with fix B's removals? Is the update-flow ordering in apply_update.sh still correct?), CHANGELOG factual accuracy, and paths other than make update (git pull + make restart is a documented user path — new secrets are NOT generated there).
  3. Fix all critical and important findings (plus cheap correctness suggestions) directly on develop, verify (bash -n, targeted roundtrip tests under bash -c, compose config), push. The PR updates automatically.
  4. If an external reviewer bot (e.g. CodeRabbit) commented on the PR, fetch its findings (gh api repos/{owner}/{repo}/pulls/<pr>/comments), verify each against the code, fix the valid ones, and reply to the inline comments with the fix commit.
  5. Present the aggregated report (Critical / Important / Suggestions / deliberately skipped) and leave the release PR open for the user unless they said to merge it.

Phase 6 — Publish (only on explicit user go-ahead)

  1. gh pr merge <release-pr> --merge, then tag the merge commit: git tag vX.Y.Z <sha> && git push origin vX.Y.Z (v-prefix per existing tags).
  2. gh release create vX.Y.Z --title "vX.Y.Z" — match the format of previous releases (gh release view <prev> first): changelog sections, an ## Upgrade block with make update plus per-service migration notes, and a **Full Changelog** compare link.
  3. Verify the issues auto-closed, then comment on each: fixed in release (link), one-line what changed, any caveat specific to that issue, and "please update with make update".

Cleanup

Remove worktrees and branches once merged:

git worktree remove --force ../<repo-name>-worktrees/issue-<n>
git branch -D <branch> && git push origin --delete <branch>

Hard-won rules (violating these caused real problems)

  • Fix agents must never edit CHANGELOG.md/VERSION — the release commit owns them.
  • Poll mergeable when it reports UNKNOWN; GitHub recomputes it after every merge to the base.
  • Fixes #N in a PR targeting develop closes nothing — repeat the keywords in the release PR to main.
  • New secrets in 03_generate_secrets.sh are only generated by make update/make install; every fix that adds one needs a doctor.sh check and, where it matters, a restart.sh warning for the git pull + make restart path.
  • When a fix removes a service, grep the whole repo for its name at the end; expect leftovers in GOST_NO_PROXY, wizard, welcome page, doctor, final report, update_preview, Caddyfile, docs, and add a one-time migration (see cleanup_removed_* functions in scripts/utils.sh).
  • Never log success after a suppressed command (|| true); branch the message on the actual result.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.