Gh workflow

From yofine/Mexus · View interactive version

Gh workflow is an AI agent skill from the GitHub repository yofine/Mexus. End-to-end GitHub issue workflow — list issues, pick one, implement the fix, commit, push, and reply to the reporter. Use when the user says "handle issues", "work through the issue queue", or "process issue #N end-to-end".

How to use this skill

Skill file

/gh-workflow — Full Issue → Fix → Reply Loop

Orchestrate the full flow: list → select → implement → commit → push → reply. This skill chains the behaviors of /gh-issue-list, /gh-issue-resolve, /gh-push, and /gh-issue-reply but keeps human checkpoints between phases.

Arguments passed: $ARGUMENTS.


Parse arguments

Phases

Phase 1 — List & Select

If no issue specified:

  1. Invoke the behavior of /gh-issue-list with the given filters (default: --state open --limit 30).
  2. Present the list and ask: "Which issue should I handle?" Stop and wait. Do not pick on behalf of the user.

Phase 2 — Diagnose

  1. gh issue view <N> --json title,body,labels,comments,author.
  2. Classify: bug / feature / question / unclear (same rules as /gh-issue-resolve).
  3. If question → stop Phase 2+, suggest /gh-issue-reply only. Do NOT write code.
  4. If unclear → ask clarifying questions. Stop.
  5. Otherwise produce a diagnosis summary (2-4 lines): root cause, affected files, proposed fix. Pause for user confirmation before touching code unless auto was passed AND the fix is obviously <20 LOC.

Phase 3 — Implement

Follow /gh-issue-resolve's implementation rules. Minimum-viable change, no unrelated refactor, no unrequested tests. Report file-by-file what changed.

Phase 4 — Verify

If the repo has an obvious typecheck/lint/test command (from CLAUDE.md or package.json scripts), run the narrowest applicable one. If verification fails, fix or stop and report — never push broken code.

Phase 5 — Commit & Push

Follow /gh-push's rules:

  1. Stage only relevant files (never git add -A).
  2. Show diff summary + draft commit message. Pause for confirmation regardless of auto — pushing is a one-way door.
  3. Commit with HEREDOC, match repo style, include Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>.
  4. Push to the current branch. Refuse direct push to main/master unless the user confirms in-turn.

Phase 6 — Reply

Follow /gh-issue-reply's rules:

  1. Draft a reply that:
  1. Default language: match the issue body's language (Chinese if issue is Chinese, English otherwise). Respect any language hint in $ARGUMENTS.
  2. Show draft, confirm, then post via gh issue comment.
  3. Return the comment URL.

Phase 7 — Next

After posting, ask: "Continue to the next issue?"

Global safety

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.