agentleFS
AlexisBalayreAlexisBalayre/claude-code-power-config/.claude/skills/backfill-issues/SKILL.md

backfill-issues

Skill2 starsChanged 28 days agoMITView on GitHub

Generate tracker issues from merged PRs for the current sprint following strict grouping and review rules.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Read these from .env (never hardcode real account IDs in the repo):

    line 19
  2. Very specific:

    Check $ARGUMENTS for --since YYYY-MM-DD.

    line 29
  3. Very specific:

    If missing, call mcp__linear-server__list_cycles(teamId: "${TRACKER_TEAM_ID}", type: "current").

    line 30
  4. Very specific:

    Use the cycle's startDate.

    line 31
  5. Distinctive:

    Wait for user approval. Users may:

    line 80
  6. Distinctive:

    Update and re-display the proposal until approved.

    line 86
  7. Distinctive:

    CRITICAL: NEVER create issues without explicit user approval of the grouping.

    line 107

≈ “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

Issue Generator from Merged PRs

You generate tracker issues from merged GitHub PRs that lack corresponding issues. You group related PRs into single issues and require user review before creation.

Setup: this skill files through an issue-tracker MCP server (examples use a Linear-style API). Fill in your own IDs via .env (see .env.example) and enable the server in .claude/settings.local.json. The mcp__linear-server__* tool names are placeholders — swap them for your tracker's tools.

Tracker Metadata

Read these from .env (never hardcode real account IDs in the repo):

  • Assignee: ${TRACKER_ASSIGNEE_ID}
  • Team: ${TRACKER_TEAM_ID}
  • Project: ${TRACKER_PROJECT_ID}

Workflow

1. Date Range & Context

  • Check $ARGUMENTS for --since YYYY-MM-DD.
  • If missing, call mcp__linear-server__list_cycles(teamId: "${TRACKER_TEAM_ID}", type: "current").
  • Use the cycle's startDate. Inform the user of the start date being used.

2. Fetch Merged PRs

Execute:

gh pr list --author=@me --state=merged --search="merged:>=YYYY-MM-DD" --json number,title,url,mergedAt,body --limit 100

Stop if no PRs are found.

3. Filter Linked PRs

Call mcp__linear-server__list_issues(assignee: "${TRACKER_ASSIGNEE_ID}", team: "${TRACKER_TEAM_ID}").

  • Exclude PRs where the URL exists in an issue description or attachment.
  • Exclude PRs where the body contains "Closes ${TRACKER_ISSUE_PREFIX}-XXXX" (flag these to the user).
  • Report the count of filtered/skipped PRs. Stop if none remain.

4. Auto-Group Logic

Group unlinked PRs based on:

  • Scope/Prefix: (e.g., fix(engine):, feat(api):).
  • Semantic Similarity: Related features or bug fixes.
  • Labels:
    • feat: → Feature
    • fix: → Bug
    • chore:/refactor: → Chore
    • perf: → Improvement
  • Estimates: 1 PR = 1pt, 2-3 PRs = 2pts, 4+ PRs = 3pts.

5. Present Proposal

Display the groups clearly:

📋 Proposed Issues (X groups from Y PRs)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Group 1: "title" [Label] (N pts)
  - #PR_NUM title
...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Skipped: Z PRs

6. Review & Adjust

Wait for user approval. Users may:

  • Approve all
  • Merge/Split groups.
  • Rename/Reclassify or change estimates.
  • Remove specific PRs or groups. Update and re-display the proposal until approved.

7. Issue Creation

For each approved group, call mcp__linear-server__save_issue:

  • State: "Done" (PRs are already merged).
  • Description: Include a summary and a markdown list of linked PRs with URLs.
  • Metadata: Assignee, Team, Project, and Current Cycle ID.
  • Links: Attach PR URLs as issue links.

8. Summary

Display the final results:

✅ Created X issues:
  - ${TRACKER_ISSUE_PREFIX}-XXXX: "title" (Label, N pts) — N PRs linked
Total: X points across Y PRs

CRITICAL: NEVER create issues without explicit user approval of the grouping. Always link PR URLs to prevent duplicates in future runs.

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.