work-on-issues
Skill0 starsChanged 45 days agoMITView on GitHub
Fetch, implement, audit, and close GitHub/GitLab issues sequentially (one main issue starting with PRD:/feat: at a time). Handles parallel subtasks, dependency parsing, worktrees, and env propagation. Every resolved ticket gets an independent code audit against its acceptance criteria before it merges.
- Reads credentials
In this repository55 other files it gives its agents.
- ipof-moscow-7layerSkill
- jdtaia-ieee-documentSkill
- ask-utarnSkill
- bug-trackerSkill
- codebase-designSkill
- code-reviewSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- find-mismatchSkill
- grill-noviceSkill
- grill-with-docsSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- init-bug-trackerSkill
- prototypeSkill
- prSkill
- researchSkill
- retroSkill
- setup-utarn-skillsSkill
- setup-utarn-skills-yesSkill
- tddSkill
- to-issuesSkill
- to-issues-yesSkill
- to-prdSkill
- to-specSkill
- to-spec-yesSkill
- to-ticketsSkill
- to-tickets-yesSkill
- triageSkill
- wayfinderSkill
- wayfinder-yesSkill
- chief-of-staffSkill
- claude-handoffSkill
- loop-meSkill
- setup-ts-deep-modulesSkill
- software-factorySkill
- wizardSkill
- writing-beatsSkill
- writing-fragmentsSkill
- writing-shapeSkill
- git-guardrails-claude-codeSkill
- migrate-to-shoehornSkill
- scaffold-exercisesSkill
- setup-pre-commitSkill
- edit-articleSkill
- obsidian-vaultSkill
- grillingSkill
- grill-meSkill
- handoffSkill
- teachSkill
- to-questionnaireSkill
- wait-whatSkill
- writing-for-agentsSkill
- thai-docxSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
List open issues: Use gh issue list --state open --json number,title,labels or glab issue list -O json.
- Very specific: line 21
Filter: Keep only main issues (title starts with PRD: or feat:).
- Distinctive: line 24
Verify open (Skip if closed).
- Very specific: line 34
If possible, create native tracker links (e.g., GitLab API /links with is_blocked_by or GitHub sub-issues API with blocked_by=true).
- Very specific: line 65
Commit: Ensure changes are committed in worktree (fix: resolve #<number> — <desc>).
- Very specific: line 73
Mark resolved: After the implementer returns its commit, apply the resolved label and post a Resolved comment naming the commit.
- Very specific: line 98
Close: Remove triage/progress labels (in-progress, resolved), add closed, and close issue.
- Very specific: line 119
After closing a sub-issue, check all PRDs in PRD_TRACKER.
- Distinctive: line 127
Keep sequential if they share files, have strict flow dependencies, or need configuration first.
- Distinctive: line 154
Run verification -> code audit -> fix commits -> PR/MR merge -> close -> env propagation -> clean up -> check PRDs.
- Very specific: line 178
No CLI: Use APIs directly or ask user to install gh/glab.
- Very specific: line 179
No Fallow: Ask user to install fallow for JS/TS security audit.
- Distinctive: line 181
External Blockers: Treat open external issues as unresolved blockers.
- Distinctive: line 185
Audit never converges: If two fix-and-re-audit rounds still leave material findings, stop and surface the findings on the issue rather than …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Work on Issues
There are three phases to work on issues:
1. Tracker Setup
Detect host via git remote -v. Set $TRACKER to gh or glab.
Terminologies:
- GitHub:
pr/comment - GitLab:
mr/note
2. Phase 1: Fetch & Triage
- List open issues: Use
gh issue list --state open --json number,title,labelsorglab issue list -O json. - Filter: Keep only main issues (title starts with
PRD:orfeat:). Others are skipped for auto/batch runs (but allowed if explicitly picked). - Choice: User selects issue number or onwards mode.
- Pre-checks:
- Verify open (Skip if closed).
- Detect PRD/Epic by label
PRDor title prefixPRD:. Skip implementation, add to$PRD_TRACKERfor auto-close check.
- Read Details: Fetch full issue view and comments (
gh issue view --comments/glab issue view --comments). - Resolve Parent PRD: Find the PRD owning this issue — search open PRD issues (
PRD:prefix orPRDlabel) for a body referencing#<number>, or use tracker sub-issue/blocked-by links — and fetch its body and comments. This context is passed to the implementer in Phase 2. - Assign & Label: Mark
in-progress(by applyingin-progresslabel and removingready-for-agentandneeds-triage).
3. Dependencies & Linking
Parse ## Blocked by in issue body (matches #42 or full issue URL) to build DEPS[issue] = [blockers].
If possible, create native tracker links (e.g., GitLab API /links with is_blocked_by or GitHub sub-issues API with blocked_by=true). Fall back to text references.
4. Phase 2: Implement (One Main Issue at a Time)
Sub-agent only. Every issue is implemented by a dispatched sub-agent, started with a fresh context window (never a fork of this conversation), in single-issue mode, batch mode, and onwards mode alike. The orchestrator fetches, triages, dispatches, and submits; it never edits files, writes code, or runs tests itself. If an issue looks too small to bother dispatching, that is exactly the case that still goes to a sub-agent.
- Create Worktree:
git worktree add .claude/worktrees/issue-<number> -b work-on-issue-<number> - Copy
.envfiles: Copy.envand.env.*files into worktree directory. - Dispatch Sub-Agent using haiku model (inside
.claude/worktrees/issue-<number>): The sub-agent starts with no context beyond this prompt — a constraint not inlined here does not exist for the implementer. Fill every slot below; an AC line like "follows PRD #3" carries no weight until the PRD's actual constraints are inlined. Prompt spec:Implement issue #<number>: <title>. Issue body (verbatim): <full issue description — summary, acceptance criteria, everything in the body> Issue comments (verbatim, in order, or "none"): <all comments, attributing each to its author> Parent PRD context (#<PRD number>: <PRD title>, or "none"): <full PRD body and its comments, or "no comments"> Branch/Worktree: work-on-issue-<number> in .claude/worktrees/issue-<number> API/best-practices: Search via `context7`, `/brightdata-plugin:search`, `/search`, or WebSearch before writing code if unsure. Stuck on errors: If 2+ consecutive failures, you MUST research via `context7`, `/brightdata-plugin:search`, `/search`, or WebSearch first (they are available) to find the correct API/approach, then retry. Only escalate after researching. Parallel subtasks: Decompose & dispatch sub-agents if tasks are independent (no shared files/dirs). Post-implementation: Check output, diff, and run tests and run `/find-mismatch` skill on modified files only. If the programming language is typescript or javascript, run `npx fallow audit` (Make sure to install `fallow` if not present). If errors, fix and re-run tests. Output: Summary, find-mismatch fixes, tests run, and commit hash. Commit format: `fix: resolve #<number> — <short description>` - Commit: Ensure changes are committed in worktree (
fix: resolve #<number> — <desc>).
5. Phase 2.5: Code Audit
The implementation is resolved when its commit lands, but it is not accepted until an independent auditor has read it against the ticket's own criteria. Issue the audit as soon as the ticket is marked resolved — do not wait for the PR/MR to be created or merged. In batch mode, the audit for issue N may run while issue N+1 is being implemented, but issue N must not merge or close until its audit is clean.
- Mark resolved. After the implementer returns its commit, apply the
resolvedlabel and post aResolvedcomment naming the commit. That marks the implementation claim; it does not close the issue. - Dispatch the code auditor. A fresh-context sub-agent (never a fork of this conversation), in the same worktree, with the issue body, acceptance criteria, comments, parent PRD, and the commit under audit. Prompt spec:
Audit issue #<number>: <title>. Issue body (verbatim): <full issue description — summary, acceptance criteria, everything> Issue comments (verbatim, in order, or "none"): <...> Parent PRD context: <...> Branch/Worktree: work-on-issue-<number> in .claude/worktrees/issue-<number> Commit under audit: <implementer commit hash> Call the Skill tool with "code-review" over the commit range, and with "find-mismatch" on the modified files. For JS/TS, run `npx fallow audit` (install fallow if missing). Verdict required: - Unimplemented: every acceptance criterion, edge case, or promised behaviour not actually implemented — stubs, TODOs, dead flags, unwired paths, missing tests. - Poorly implemented: behaviour that works but does not meet the criteria — missing error handling, weak or absent tests, contract mismatches, shortcuts the issue rules out. Return findings as a list with file:line, severity, and the criterion each violates, or "clean". - Fix with another commit. If the verdict has findings, dispatch a fixer sub-agent (fresh context) with the findings and the same worktree. It fixes, runs the tests, and commits
fix: audit #<number> — <summary>. Re-run the audit against the new commit. Repeat until the auditor returns clean, or the only remaining findings are explicitly out of scope for the ticket and are recorded on the issue. - Gate the merge. Phase 3 starts only after the audit is clean.
6. Phase 3: Submit & Close
- Create PR/MR: Link to issue using "Closes #
<number>". - Auto-Merge: Merge immediately (squash & delete branch).
- Comment: Post summary of implementation and the audit verdict.
- Close: Remove triage/progress labels (
in-progress,resolved), addclosed, and close issue. - Propagate
.envfiles: Copy modified env files back to main working directory before worktree removal:WT=.claude/worktrees/issue-<number> for wtf in "$WT"/.env "$WT"/.env.*; do [ -f "$wtf" ] || continue base=$(basename "$wtf") if [ ! -f "$base" ] || ! cmp -s "$base" "$wtf"; then cp "$wtf" "$base" && echo "Propagated $base back" fi done - Clean up:
git worktree remove .claude/worktrees/issue-<number> git branch -d work-on-issue-<number>
7. PRD Auto-Close
After closing a sub-issue, check all PRDs in PRD_TRACKER. Read PRD description/links. If all referenced sub-issues (#42 etc.) are closed, close the PRD and remove from PRD_TRACKER.
8. Subtask Parallelization
The dispatched sub-agent decomposes the issue into subtasks if:
- Touch non-overlapping files/folders.
- Independent outputs (no order dependency). Keep sequential if they share files, have strict flow dependencies, or need configuration first.
Subtask Prompt Spec:
Sub-agents are fresh contexts too — each subtask prompt inlines the context bearing on that subtask (same rule as the main dispatch).
Implement subtask for issue #<number>: <title>.
Subtask: <details>
Issue context (verbatim excerpts bearing on this subtask): <issue body / comments / parent-PRD constraints>
Working Directory: .claude/worktrees/issue-<number>
Scope: Modify <MAY_MODIFY>, DO NOT modify <MUST_NOT_MODIFY>.
Compile/Lint errors: If 2+ consecutive failures or any 3rd party dependency issues, research via `context7`, `/brightdata-plugin:search`, `/search`, or WebSearch first (they are available) to find the correct API/approach, then retry. Check Reference Directories (<RefDirs>) to align configurations.
Post-implementation: Run `/find-mismatch` skill on modified files, auto-fix.
Verification: Run relevant tests. Return summary, modified files, test results.9. Execution Modes
Batch & Onwards Mode
- Fetch all open issues, filter to main issues (
PRD:,feat:). - Parse
DEPSmap from issue bodies, set formal links. - Show progress table:
| Issue | Title | Type | Blocked By | Agent | Status | PR/MR | - Loop:
- Select next issue with zero unresolved blockers. Skip closed or PRD issues.
- Dispatch sub-agent to worktree.
- On the implementer's commit, mark the issue
resolvedand dispatch the code auditor immediately (Phase 2.5). The audit may overlap the next issue's implementation, but this issue cannot merge until it is clean. - Run verification -> code audit -> fix commits -> PR/MR merge -> close -> env propagation -> clean up -> check PRDs.
- Re-evaluate dependencies. Repeat.
- Re-fetch all open issues after finishing (Outer loop) to pick up new main issues. Exit only if no open main issues remain or user interrupts.
Single Issue Mode
Execute only the selected issue, end to end, via the same Phase 2 dispatch and Phase 2.5 audit. Skip dependency graph processing.
10. Labels & Helpers
| Label | Meaning | Color |
PRD | Parent tracking issue | #0075CA |
in-progress | Active | #E4E669 |
resolved | Implementation committed; audit in flight | #FBCA04 |
ready-for-agent | Ready for agent | #0E8A16 |
closed | Closed by AI / Finished | #5319E7 |
To apply labels, try updating directly. If not found, create label first (e.g. color #E4E669 for in-progress) and retry.
11. Edge Cases
- No CLI: Use APIs directly or ask user to install
gh/glab. - No Fallow: Ask user to install
fallowfor JS/TS security audit. - Conflict/Cycle: Report circular dependencies, skip affected issues.
- External Blockers: Treat open external issues as unresolved blockers.
- API Link Failure: Fall back to text references.
- No Main Issues: Inform user, ask if they want to process non-main issues.
- Audit finding belongs elsewhere: Record it on the issue it belongs to; do not expand this ticket's scope to absorb it.
- Audit never converges: If two fix-and-re-audit rounds still leave material findings, stop and surface the findings on the issue rather than merging unverified work.
- Env files gitignored: Env files must be propagated back before worktree removal to persist across runs. Do not commit secrets.
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
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.

