/flagrare:ticket-hygienefrom Flagrare
Pairs open tickets with their PRs to determine real work stage (started, in review, merged, done) and updates ticket statuses accordingly. Handles sweep, single ticket, event-driven, and scheduled modes.
Ships in Flagrare. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The board should show what is really happening. This skill reads the user's tickets and PRs, pairs them, and moves each ticket to the status its work is at. It is the place where merges and deploys get reflected, since no other skill runs at those moments.
REQUIRED BACKGROUND: read <plugin root>/lib/tickets/LIFECYCLE.md first, the plugin root being two directories above this skill's base directory. It defines the stages, how a stage maps to a real status, and the rules every move follows. This skill does not repeat them.
SKU-123): the same checks for that ticket only.merged SKU-123, deployed SKU-123, verified SKU-123): the user is telling you something happened. Use it as evidence for that ticket, then run the one-ticket checks./loop, a schedule or another agent, or args contain scheduled): run the sweep, write nothing, and list the moves for the user.Read ~/.claude/skills/flagrare/config.json (github_login, repo_scope, and the tickets block). Find the tracker MCP or CLI the same way /flagrare:intake Step 0 does. With no tracker reachable, say so in one line and stop.
Run these in parallel.
Tickets. Open tickets assigned to the user, not in a Done-category status.
assignee = currentUser() AND statusCategory != Done ORDER BY updated DESCcompleted or canceledPRs. The user's PRs in the configured repo scope:
gh search prs --author "@me" --owner <org from repo_scope> --state open --json number,title,url,isDraft,repository,updatedAt --limit 50
gh search prs --author "@me" --owner <org from repo_scope> --merged-at ">=<14 days ago>" --json number,title,url,repository,closedAt --limit 50
gh search prs --author "@me" --owner <org from repo_scope> --state closed --closed ">=<14 days ago>" --json number,title,url,repository,closedAt --limit 50
Get each PR's branch name with gh pr view <url> --json headRefName,body,mergeCommit. Closed PRs that also appear in the merged list are merged, not abandoned.
Deploy evidence, for merged PRs only: did a release or deploy run that holds the merge commit finish? Check the repo's release workflows (gh run list --commit <merge sha> or the runs created after the merge), or the deploy tool the user has connected. Record "deployed" only with a finished run or the user's word. "Verified" needs a check in production, or the user saying it works there.
A PR belongs to a ticket when the ticket key appears in its branch name, title or body. Use the project keys from the tickets in Step 2 to build the pattern (\b(SKU|IOPS)-\d+\b). One ticket can have several PRs and a PR can mention several tickets; keep all the pairs.
Then work out each ticket's stage from its PRs, using "What stage the work is at" in LIFECYCLE.md.
Epics and parent tickets are out. Their status follows their children and the team lead usually moves them, so never move one and never flag one as stale. Leave them out of the table.
| Situation | Action |
|---|---|
A PR backs a forward move to started or in_review | Apply |
All PRs merged, merged_auto is true | Apply |
All PRs merged, merged_auto is false or unset | Propose (the first time, also ask whether to make it automatic, and store the answer) |
| Merged, deployed and verified | Propose done, quoting the evidence |
| Merged and deployed, not verified | Flag: say what check would prove it works |
| Every PR closed without merging | Propose reopened: back to its earlier status, or the user's choice |
Ticket is started or later, no PR, nothing touched it in 5 working days | Flag as stale |
Ticket is in_review or later but has no PR at all | Flag: a PR may be missing the key |
| PR with no ticket key | Flag: the PR needs a ticket |
| Ticket unassigned but a user's PR references it | Propose assigning it to the user |
| Ticket already at or past the expected stage | Nothing |
Map every target stage to a real status with "Picking the real status for a stage" in LIFECYCLE.md, and follow its rules on every move (own tickets only, read before writing, forward only).
Show one table, then act. Skip tickets that need nothing.
Name every ticket by what it does, not by its number. The user does not know tickets by key. Wherever a ticket appears (the table, the questions, the one-line move notes, the closing line), lead with a short plain description of what the ticket changes, in the product's words ("say when the venue is closed in the test order dialog", "hide another venue's items on the menu page"), with the key as a link after it. The ticket title is the starting point; rewrite it when it reads like code or shorthand. A bare key, or a list of keys like "SKU-1029 + SKU-1048", is never enough.
| Ticket | PR | Now | Should be | Action |
|---|---|---|---|---|
| [SKU-123](url) Menu disabled state | [#481](url) open | To Do | Needs Code Review | moved |
| [SKU-130](url) Payout export | [#490](url) merged Nov 10, deployed | Needs Code Review | Ready to Release | moved |
| [SKU-131](url) Report email | [#495](url) merged, deployed, checked | Ready to Release | Finished | proposed |
| [SKU-140](url) Image upload | none, quiet 6 days | In Progress | ? | stale |
Apply every Apply row (in a scheduled run, mark them "would move" instead). Then ask about the Propose rows in one AskUserQuestion with multiSelect: true, one option per move, and apply the ones the user picks. Each option's label is the plain description of the ticket, and its description says the move and why ("finished during this sprint, so it counts here"), with the key at the end. The question names what kind of move it is asking about, never only the keys. Flag rows need no answer; they stay in the table.
Close with one line: how many moved, how many are waiting on the user.
/flagrare:work-prep → started (automatic, through intake)
/flagrare:open-pr → in_review (automatic)
[PR merges] → merged /flagrare:ticket-hygiene
[deploy + check] → done /flagrare:ticket-hygiene (asks)
/flagrare:standup-report flags mismatches and points here
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub flagrare/agent-skills --plugin flagrare43 skills in this plugin
/atdd-planProduce an ATDD-first implementation plan in Claude Code's native plan mode, with named design patterns called out where they earn their keep. The skill enters plan mode automatically (via the EnterPlanMode tool), runs /flagrare:codebase-explore to ground the plan in the actual codebase, then produces a plan-mode plan that MUST include both: (1) 3-5 acceptance tests in plain English defining 'done' before any implementation, written behavior-first against the public API only; and (2) any non-trivial structural decisions named as design patterns with a one-line rationale. Plan mode's native approve/edit/reject button UI is the close, ExitPlanMode is how the skill ends. Use whenever the user wants to plan a feature, fix, or refactor, 'how should we implement X', 'plan this', 'let's design X', 'where do we start on Y'. Tests follow Kent Dodds Testing Trophy: behavior over implementation, integration-heavy, public-API-only, refactor-proof. The skill stops at the plan; it does not write implementation code./brag-docGenerate a comprehensive, impact-framed brag-doc entry for a chosen time window (day, week, biweek, month, or custom). Pulls authored PRs, reviews given, commits, deploys, and linked tickets across GitHub, local git, and configured MCPs, then synthesises a themed narrative, leading with outcomes, quantifying impact, owning the work in first-person past tense, separating IC contributions from amplification, and naming the judgment exercised. Output is designed to drop straight into a developer journal, a personal bragging sheet, or a performance-review packet. Accepts a mode argument, `/flagrare:brag-doc resumancer` renders the output as ready-to-paste Resumancer CLI commands (`resumancer impact "..." --branch ...`) instead of markdown. Use whenever the user says "brag doc", "brag sheet", "what did I do this week", "weekly recap", "monthly recap", "performance review prep", "what should I tell my manager", "summarise my impact", "career log entry", "give me my wins", "biweekly recap", or any variant about looking back over a longer window than a single day's standup. Also trigger near review season ("self-review", "perf packet", "evaluation prep"), and on phrases like "log my wins to resumancer" or "make resumancer entries for this week" (which should pass the `resumancer` mode). For windows longer than about a month, a tenure retrospective, a departure record, or "everything I did at this company", hand off to `/flagrare:impact-timeline` instead; this skill's window tops out at a month.Other plugins' skills for the same job