agentleFS
conectlensconectlens/lenserfight/.agents/skills/github-issue-solver/SKILL.md

github-issue-solver

Skill18 starsChanged 6 months agoMITView on GitHub

Read GitHub issues, triage them, solve them using GRASP/OOAD principles, run or add tests, commit, push, open a PR linked to the issue, merge into development, and close the issue only after merge. Use when the user says /github-issue-solver, "solve issue #N", "fix GitHub issue", or "work on issue".

  • Reads credentials
  • Installs packages
  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

34 rules. About 0 are common, 27 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈27

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    All comments (may contain constraints or partial solutions)

    line 36
  2. Distinctive:

    If no issue number is provided, ask the user which issue(s) to target.

    line 39
  3. Distinctive:

    If a duplicate exists: comment on the issue linking the canonical one, then stop.

    line 48
  4. Distinctive:

    Do not assume architecture.

    line 52
  5. Distinctive:

    Before writing any code:

    line 106
  6. Distinctive:

    Check whether the bug is in domain, data, feature, UI, or infra layer.

    line 110
  7. Distinctive:

    No duplicated domain logic across layers

    line 128
  8. Distinctive:

    No unrelated refactors bundled with the fix

    line 129
  9. Distinctive:

    No hardcoded temporary fixes

    line 130
  10. Very specific:

    Never work on main or development directly.

    line 144
  11. Distinctive:

    No doc additions unless the behavior change requires them.

    line 150
  12. Very specific:

    If schema changes are needed, create a new migration file in supabase/migrations/.

    line 151
  13. Very specific:

    If RLS changes are needed, invoke supabase-rls-security-reviewer first.

    line 152
  14. Distinctive:

    Keep changes auditable: one logical concern per commit.

    line 153
  15. Distinctive:

    Run the smallest relevant test set first:

    line 169
  16. Distinctive:

    If no adequate tests exist for the fixed behavior, add them.

    line 177
  17. Distinctive:

    If the fix touches database logic, run migration/RLS tests:

    line 179
  18. Distinctive:

    If the fix crosses feature boundaries, run integration tests.

    line 186
  19. Distinctive:

    Run broader checks if the affected area is critical (auth, billing, RLS, battle engine):

    line 188
  20. Distinctive:

    If tests cannot be run, explain why and what manual verification was done.

    line 195
  21. Very specific:

    Use the smart-commit skill for staged changes, or:

    line 199
  22. Very specific:

    Never commit .env, secrets, or credentials

    line 219
  23. Distinctive:

    Read the failure output.

    line 287
  24. Distinctive:

    Do NOT merge while CI is failing.

    line 292
  25. Distinctive:

    All CI checks pass

    line 297
  26. Very specific:

    Use --squash only if the team's merge strategy is squash.

    line 307
  27. Distinctive:

    If post-merge validation fails, open a follow-up issue immediately and do not close the original.

    line 323
  28. Distinctive:

    Only after merge is confirmed and post-merge validation passes:

    line 327
  29. Very specific:

    If the PR used Closes #N syntax and GitHub auto-closed the issue on merge, verify the issue is closed and add a comment with the merge …

    line 333
  30. Distinctive:

    No unrelated refactors bundled in the fix

    line 358
  31. Distinctive:

    No force-push to protected branches

    line 361
  32. Distinctive:

    No detached HEAD states

    line 363
  33. Distinctive:

    No stale branch work

    line 364
  34. Distinctive:

    After completing the workflow, output:

    line 386

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

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

GitHub Issue Solver

Solve GitHub issues end-to-end: triage → explore → design → implement → test → PR → merge → close.

Never guess architecture. Never close an issue before the PR is merged.


Activation Criteria

Invoke this skill when:

  • User says /github-issue-solver or /solve-issue
  • User says "solve issue #N", "fix GitHub issue #N", "work on issue #N"
  • User pastes a GitHub issue URL
  • User asks to process open issues from the repository

Workflow

Step 1 — Fetch Issue Metadata

gh issue view <number> --json title,body,labels,milestone,assignees,comments,url,state,linkedBranches

Capture and record:

  • Title and full body
  • Labels (bug, feature, security, docs, performance, DX, auth, database, workflow, battle, CLI, mobile, web)
  • Milestone and due date
  • All comments (may contain constraints or partial solutions)
  • Linked PRs or branches

If no issue number is provided, ask the user which issue(s) to target.

Step 2 — Check for Duplicates and Related Work

gh issue list --state all --search "<key terms from title>"
gh pr list --state all --search "<key terms>"

If a duplicate exists: comment on the issue linking the canonical one, then stop.

Step 3 — Repository Exploration

Do not assume architecture. Explore:

apps/*                  — entry points and composition roots
libs/domain/*           — business concepts, invariants, core types
libs/api/*              — contracts and DTOs
libs/data/*             — repositories, Supabase integration
libs/features/*         — feature slices and orchestration
libs/infra/*            — analytics, moderation, storage adapters
libs/ui/*               — UI components, forms, layout, tokens
libs/utils/*            — low-level shared utilities
supabase/               — schema, migrations, RLS policies, SQL functions
.github/workflows/      — CI/CD pipelines and test commands
apps/cli/               — CLI if issue is CLI-related
apps/mobile/            — mobile app if issue is mobile-related
package.json / pnpm-workspace.yaml — test and build commands
CLAUDE.md / CONTRIBUTING.md        — coding standards and rules
.claude/skills/         — available AI agent skills

Load relevant skills before implementing:

  • Feature placement → feature-slice-designer
  • Architecture concern → repo-architecture-auditor
  • Schema change → supabase-schema-reviewer
  • RLS/security → supabase-rls-security-reviewer
  • Migration → migration-risk-reviewer
  • Contract/DTO → contract-dto-consistency-reviewer
  • Code quality → deep-code-reviewer or grasp-ooad-review
  • Performance → vite-performance-engineer
  • UI/UX → tailwind-ui-ux-reviewer
  • Tests → unit-test-planner

Step 4 — Classify the Issue

Determine issue type:

TypeDetection criteria
bugUnexpected behavior, crash, incorrect output
featureNew capability or enhancement request
securityAuth bypass, data leak, RLS gap, injection
performanceSlow query, bundle size, N+1, memory leak
docsMissing or incorrect documentation
DXDev tooling, CI, build, test setup
databaseSchema change, migration, RLS, index
workflowBattle workflow, automation, trigger
CLICLI command, output, TUI
mobileMobile app screen, navigation, native
webWeb app route, UI, API integration

A single issue may span multiple types; note all that apply.

Step 5 — Identify Root Cause

Before writing any code:

  1. Trace data flow from the issue symptom back to its origin.
  2. Identify which module owns the broken invariant.
  3. Check whether the bug is in domain, data, feature, UI, or infra layer.
  4. Confirm whether backend validation is missing (do not enforce only in frontend).
  5. Identify affected tests and whether they currently catch the bug.

State the root cause explicitly before designing a solution.

Step 6 — Design Solution (GRASP + OOAD)

Apply references/grasp-ooad-checklist.md.

Rules:

  • Single source of truth: one place owns each business rule
  • Low coupling: changes should not ripple unexpectedly
  • High cohesion: related behavior stays together
  • Information Expert: assign responsibility to the class/module with the required data
  • Creator: the object that aggregates or uses another creates it
  • Controller: one entry point handles a use case
  • Backend validation: business rules enforced server-side, never frontend-only
  • No duplicated domain logic across layers
  • No unrelated refactors bundled with the fix
  • No hardcoded temporary fixes
  • No security bypasses

Design the solution in 1–3 sentences before touching any file.

Step 7 — Create a Branch

git checkout development
git pull origin development
git checkout -b fix/issue-<number>-<short-slug>
# or feat/issue-<number>-<short-slug> for features

Never work on main or development directly. See docs/en/how-to/contributors/branching.md for naming rules and conventional commit format.

Step 8 — Implement Minimal Correct Fix

  • Edit only files required to resolve the root cause.
  • No opportunistic refactors.
  • No doc additions unless the behavior change requires them.
  • If schema changes are needed, create a new migration file in supabase/migrations/.
  • If RLS changes are needed, invoke supabase-rls-security-reviewer first.
  • Keep changes auditable: one logical concern per commit.

Step 9 — Add or Update Tests

Load references/test-discovery-checklist.md.

  1. Find existing test commands:
# From workspace config
cat package.json | grep -E '"test|"spec'
pnpm nx show project <affected-project> --json | jq '.targets | keys'
# From CI
cat .github/workflows/*.yml | grep -E 'run:|nx run'
  1. Run the smallest relevant test set first:
pnpm nx test <affected-project> --testPathPattern=<related-spec>
pnpm nx typecheck <affected-project>
pnpm nx lint <affected-project>
  1. If no adequate tests exist for the fixed behavior, add them. Do not ship without test coverage for the root cause.
  2. If the fix touches database logic, run migration/RLS tests:
pnpm nx test supabase --testPathPattern=<related>
# or pgTAP via supabase test db
  1. If the fix crosses feature boundaries, run integration tests.
  2. Run broader checks if the affected area is critical (auth, billing, RLS, battle engine):
pnpm nx affected --target=test --base=origin/development
pnpm nx affected --target=typecheck --base=origin/development

If tests cannot be run, explain why and what manual verification was done.

Step 10 — Commit

Use the smart-commit skill for staged changes, or:

git add <specific-files>
git commit -m "$(cat <<'EOF'
fix(scope): concise imperative description

Root cause: <one sentence>

Closes #<issue-number>

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"

Rules:

  • Conventional Commits format
  • Include Closes #N only when the PR fully resolves the issue
  • Never use --no-verify
  • Never commit .env, secrets, or credentials

Step 11 — Push and Open PR

git push -u origin <branch-name>
gh pr create \
  --base development \
  --title "<type>(scope): short description (fixes #N)" \
  --body "$(cat <<'EOF'
## Issue

Closes #<number>

## Root Cause

<one paragraph>

## Solution

<one paragraph>

## Files Changed

- `path/to/file.ts` — what changed and why

## Tests

- [ ] Existing tests pass
- [ ] New tests added for: <what>
- [ ] Typecheck passes
- [ ] Lint passes

## Commands Run

\`\`\`bash
pnpm nx test <project> --testPathPattern=<spec>
pnpm nx typecheck <project>
\`\`\`

## Migration Notes

<!-- If schema changed -->

## Security Notes

<!-- If auth/RLS/data/provider logic changed -->

## Screenshots

<!-- If UI changed -->

## Remaining Risks

<!-- Anything not fully addressed -->
EOF
)"

Load references/pr-template.md for a full PR body template.

Step 12 — Monitor CI

gh pr checks <pr-number> --watch

If CI fails:

  1. Read the failure output.
  2. Fix the root cause locally.
  3. Push the fix.
  4. Re-run failing checks.

Do NOT merge while CI is failing.

Step 13 — Merge into Development

Only after:

  • All CI checks pass
  • No unresolved conflicts
  • No unsafe migrations
  • No security regressions
  • Implementation is complete
gh pr merge <pr-number> --merge --delete-branch

Use --squash only if the team's merge strategy is squash. Use --rebase only if the team uses rebase. Default to --merge unless CLAUDE.md or CONTRIBUTING.md specifies otherwise.

Step 14 — Post-Merge Synchronization

git checkout development
git pull origin development

Verify:

pnpm install --frozen-lockfile
pnpm nx typecheck <affected-project>
pnpm nx test <affected-project>

If post-merge validation fails, open a follow-up issue immediately and do not close the original.

Step 15 — Close the Issue

Only after merge is confirmed and post-merge validation passes:

gh issue close <number> --comment "Fixed in PR #<pr-number> (merged into development)."

If the PR used Closes #N syntax and GitHub auto-closed the issue on merge, verify the issue is closed and add a comment with the merge commit hash for traceability.


Issue Closing Rules

ConditionAction
PR merged, fully resolves issueClose with merge commit reference
PR merged, partial fixLeave open, comment what remains
DuplicateLink canonical issue, close as duplicate
Not reproducibleComment evidence, close as invalid
CI failsDo not merge, do not close
Post-merge test failsOpen follow-up, leave original open

Never close an issue speculatively or before the PR merges.


Engineering Constraints

  • Single source of truth — one module owns each business rule
  • GRASP principles enforced — see references/grasp-ooad-checklist.md
  • Backend validation for all business rules — never frontend-only
  • No duplicated domain logic across layers
  • No unrelated refactors bundled in the fix
  • No hardcoded temporary fixes
  • No security bypasses
  • No force-push to protected branches
  • No --no-verify on commits
  • No detached HEAD states
  • No stale branch work

Failure Handling

FailureResponse
Issue not foundAsk user to confirm issue number and repo
Cannot reproduceState what was tried, ask for reproduction steps
Root cause unclearDocument exploration, ask for clarification
Tests fail after fixDiagnose failure, do not suppress
Migration unsafeInvoke migration-risk-reviewer, halt if risky
RLS regression detectedInvoke supabase-rls-security-reviewer, halt
CI failsFix before merging, never skip
Merge conflictResolve conflict, verify tests still pass
Post-merge regressionOpen follow-up issue, link to original

Final Report Format

After completing the workflow, output:

## GitHub Issue Solver — Final Report

### Issue
#<number>: <title>
URL: <url>

### Root Cause
<one paragraph>

### Solution
<one paragraph>

### PR
URL: <pr-url>
Branch: <branch-name>

### Merge
Commit: <hash>
Branch: development
Status: merged / failed

### Post-Merge Validation
- Install: pass / fail
- Typecheck: pass / fail
- Tests: pass / fail
- Migrations: valid / invalid

### Issue Status
Closed / Open (reason)

### Remaining Risks
<bullet list or "none">

Example Triggers

  • /github-issue-solver 42
  • /solve-issue 118
  • "Fix GitHub issue #86"
  • "Work on issue #139"
  • "Solve the bug reported in issue #84"

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.