# Fix Issues

Auto-fix GitHub issues labeled as bugs: fetch open bug issues, analyze feasibility, fix...

- Repository: https://github.com/FerroxLabs/wayland (616 stars)
- Category: Git and review
- License: AGPL-3.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add FerroxLabs/wayland --skill fix-issues -g -a claude-code -y`
Codex: `npx skills add FerroxLabs/wayland --skill fix-issues -g -a codex -y`
Cursor: `npx skills add FerroxLabs/wayland --skill fix-issues -g -a cursor -y`
Gemini CLI: `npx skills add FerroxLabs/wayland --skill fix-issues -g -a gemini-cli -y`

## Description

Auto-fix GitHub issues labeled as bugs: fetch open bug issues, analyze feasibility, fix code, and submit PRs. One issue per invocation. Use when: (1) User says "/fix-issues", (2) User asks to fix GitHub issues.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Fix Issues Skill

Automated workflow: GitHub bug issues → analyze → fix → PR.

**Announce at start:** "I'm using fix-issues skill to find and fix a GitHub bug issue."

## Operating Modes

### Batch Mode (default)

Invocation: `/fix-issues`

- Fetches open bug issues, finds the best candidate, fixes it
- Runs full Phase 1 → Phase 2 → Phase 3
- Fixes 1 issue per invocation

### Daemon Mode

Invocation: `/fix-issues limit=1` (from daemon script)

- Phase 1 uses **priority descent**: high-signal issues first, then progressively lower
- Fixes only 1 issue (controlled by `limit` parameter), then exits
- If no fixable issue exists → outputs `[NO_FIXABLE_ISSUES]` and exits

## Prerequisites

- **gh CLI** must be authenticated
- Working directory will be auto-cleaned (stash + checkout main) at startup

## Workflow

### Phase 1: Collect & Filter Issues

#### Step 1.1: Verify Environment

```bash
git status --porcelain
git branch --show-current
```

If working directory has **staged or modified tracked files**, stash them and proceed:

```bash
git stash -m "fix-issues: auto-stash before starting"
```

**Do NOT use `--include-untracked`** - untracked files (like skill files not yet merged to main)
must remain in the working directory.

Then switch to main:

```bash
git checkout main
git pull origin main
```

#### Step 1.1b: Load Skip List (Daemon Mode Only)

In daemon mode (`limit > 0`), load the skip list to avoid re-analyzing issues that were already
triaged in previous sessions. The skip list is stored at:

```
~/.wayland-fix-issues/skip-list.json
```

Format:

The rest: https://github.com/FerroxLabs/wayland/blob/HEAD/.claude/skills/fix-issues/SKILL.md
