/dev-flow-skills:smelly-prsfrom Dev Flow Skills
Triage recently merged PRs of a GitHub repository and rank the ones that "smell" — God PRs, mixed concerns, missing tests, no reviewer, SOLID/DRY/KISS/YAGNI violations, GoF design-pattern misuse (Singleton abuse, missing Strategy/State, anemic domain, etc.), risky migrations, shotgun-surgery hotspots, and more. Use when the user wants to audit merge hygiene of a repo, find refactor candidates, hunt for risky merges to post-mortem, or pick suspicious PRs from a recent window. Requires the `gh` CLI to be authenticated against the target repo. Invoke as `/smelly-prs <owner/repo> [--limit N] [--since YYYY-MM-DD] [--base BRANCH]`.
Ships in Dev Flow Skills. 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.
Pick "smelly" PRs out of a repository's recently merged set, using classic software-engineering heuristics (Fowler's code smells, SOLID, DRY/KISS/YAGNI, Law of Demeter, plus team-flow process smells).
This skill is read-only: it never pushes, comments, or modifies any repo. It only fetches PR metadata and diffs via the gh CLI and produces a ranked report.
Parse from the user's invocation:
| arg | meaning | default |
|---|---|---|
<owner/repo> | target GitHub repo (required) | — |
--limit N | how many recent merged PRs to scan | 20 |
--since YYYY-MM-DD | only consider PRs merged on/after | 14 days ago |
--base BRANCH | restrict to this base branch | omit (any base) |
If <owner/repo> is missing, ask the user once. Do not guess.
gh auth status
If not authenticated, stop and tell the user to run gh auth login (do not attempt it yourself).
gh pr list --repo <owner/repo> \
--state merged \
--search "merged:>=<since>" \
--limit <N> \
--json number,title,url,mergedAt,mergeCommit,author,additions,deletions,changedFiles,baseRefName,labels,reviewDecision,body
If --base was supplied, append --base <branch> instead of filtering after the fact.
For each PR, spawn an Explore subagent in parallel (cap concurrency at ~8; if there are more PRs, batch). Each agent receives the PR's JSON metadata and runs:
gh pr view <n> --repo <owner/repo> --json reviews,comments,files,commits,closingIssuesReferences
gh pr diff <n> --repo <owner/repo>
If the diff exceeds ~3000 lines, ask the agent to read only the first 1500 lines and a sampled tail (~500 lines) and explicitly note in its findings that the diff was truncated.
Each agent returns a structured finding per detected smell:
{ pr: <n>, category: <string>, smell: <string>, severity: 1|2|3, evidence: <short snippet or file:line>, principle: <SOLID|DRY|KISS|YAGNI|LoD|GoF|process|risk|history> }
Score each PR by summing severities across the categories below. Score conservatively — when in doubt, don't fire.
a.b().c().d() introduced.switch/if-else chain on a type tag is extended again rather than via polymorphism.Look for both missing patterns (a hand-rolled mess where a known pattern would fit) and misapplied patterns (a pattern bolted on where simpler code would do). Cite the pattern name explicitly in evidence so reviewers can verify.
switch / if-else if chain that dispatches on a type tag / enum / string is extended again in this PR. Cite the existing branches plus the new one. (Closely related to the OCP violation in section C — score once, prefer this label when a clear pattern fix exists.)getInstance() that owns IO, config, or cache. Especially smelly if it's instantiated inside business logic (hidden dependency, kills testability).Container.get(...), ServiceLocator.resolve(...)) inside a function body to fetch its own collaborators, instead of receiving them as parameters / constructor args.*Service / *Helper / *Util class. Note: in DTO / wire-format layers this is fine — only flag inside the domain layer.type: "A" | "B") and branches internally to build different shapes. A factory / abstract factory would localize the choice.interface / abstract base with exactly one implementation and no foreseeable second. (YAGNI cousin — score once.)0, 1, -1, HTTP 200/404, etc.).When you flag a pattern smell, in evidence write the pattern name and the alternative, e.g. Strategy: dispatch on "kind" extended for the 4th time in src/payment/router.ts:88 or Singleton abuse: new Cache.getInstance() in src/api/handler.ts:14 — pass as constructor arg.
reviewDecision is null or no review comments, yet merged.docs, chore, infra etc.gh pr list --search "in:title revert #<n>" or by scanning later PR titles for Revert "<this title>".TODO / FIXME / XXX markers..skip, xit(, xdescribe(, @Ignore, t.Skip(, #[ignore], etc.catch block with empty body or only a log.Sum severities into a total score per PR. Bucket:
Output a single markdown message. Format precisely:
# Smelly PRs in <owner/repo>
window: merged since <since> · scanned <N> PRs · flagged <K>
## 🚨 High
### #<num> <title> — score <total>
<url> · <author> · merged <mergedAt> · +<add>/-<del> across <files> files
Top smell: **<one-line summary of the strongest smell>**
Smells:
- **<category>** *(<principle>, sev <n>)* — <smell name>: <evidence (file:line if possible)>
- ...
---
## ⚠️ Medium
(same shape)
---
## 💡 Low
(same shape, may be omitted if the user asked for high-signal only)
End the report with a one-line aggregate, e.g.:
> Hotspot files this window: src/payment/processor.ts (5), src/api/router.ts (3)
If K == 0, say so plainly: "No smelly PRs in the last for <owner/repo>. Merge hygiene looks clean."
gh pr comment, gh pr review, gh issue comment.User: /smelly-prs anthropics/claude-code
→ Default window (14 days), 20 PRs, any base branch.
User: /smelly-prs mitubaEX/nvim_lua_config --limit 50 --since 2026-01-01
→ Scan the last 50 merges since Jan 1, 2026.
User: /smelly-prs foo/bar --base main --limit 10
→ Only merges into main, last 10.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mitubaex/dev-flow-skills --plugin dev-flow-skills7 skills in this plugin
/autoloopWork through a backlog file with no human in the loop — each iteration picks the next task from `.autoloop/backlog.md`, gates it with `worth-it`, settles the design by self-grilling, trims it with `prune`, implements it red → green on an `autoloop/<slug>` branch, self-reviews with `layered-review`, and opens a PR. Never merges. Tasks it should not or cannot do are marked skipped or blocked with the reason, so the human's only jobs are adding tasks, answering blocked questions, and merging PRs. Designed to be driven by `/loop /autoloop` (self-paced; schedules its own next wakeup and stops when the backlog is drained or a guardrail trips). Use when the user wants an autonomous / unattended / hands-off dev loop, "放置で回す", "自律ループ", "バックログを消化して", or invokes `/autoloop`. Requires `git`, a pushable remote, and an authenticated `gh` CLI./grillingGrill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases./grill-meA relentless interview to sharpen a plan or design./layered-reviewReview a single PR (or a local diff / branch) using a top-down three-layer method — (1) production-impact check (feature-flag gating, dead references), (2) chunk-level comprehension check (SOLID / DRY / YAGNI at the "does this shape make sense" altitude, not line-by-line), (3) surface check (shallow methods, patterns foreign to this repository). Use when the user wants to review a specific PR carefully, self-review their own working-tree change before pushing, or apply a consistent review discipline. Complements `smelly-prs` — that skill triages many merged PRs; this skill goes deep on one change. Read-only by default; never pushes, comments, or edits. Requires `gh` CLI when reviewing a remote PR. Invoke as `/layered-review <PR-url|PR-number|--diff>`./pruneStrip a feature, spec, plan, UI, or code change down to what the request and its real user actually need. Looks through four lenses — product scope (features, flows, states, settings), user experience (screens, controls, dialogs, copy, polish), code design (abstractions, options, defensive code, YAGNI), and delivery (docs, tests, flags, rollout) — and labels every detail required, load-bearing, speculative, or ornamental, then emits a cut list. Also works as a silent stance while planning or building so the result stays minimal. Triggers on "keep it simple", "minimal", "MVP", "too much", "don't over-engineer", "over-build", "gold plating", "YAGNI", "作りこみすぎ", "過剰", "シンプルに", "最小限で", "削ぎ落として", "盛りすぎ", or when a spec / diff is visibly growing past its request. Read-only in audit mode; applies cuts only when the user names them. Invoke as `/prune` (audit the current plan or conversation), `/prune --diff`, `/prune <PR-url|PR-number>`, or `/prune <spec / feature list / mockup description / plan text>`./worth-itDecide whether the work about to be implemented is necessary at all, before any code is written. Separates the underlying problem from the requested solution, checks whether the problem is observed or imagined, asks what happens if nothing is done, whether existing means already cover it, and what the smallest move would be, then returns one verdict — Don't / Already covered / Smaller / Later / Build — with the evidence and what would change it. Use at the start of any ticket, feature request, refactor, "tech-debt" item, dependency upgrade, or fix, or when the user asks "do we really need this?", "is this worth doing?", "should we build this?", "本当に必要?", "やる価値ある?", "そもそも要る?", "やらなくてもいい?". Read-only; never implements. Upstream of `prune` (which trims a change already agreed on) and of `grill-me` (which sharpens how to do it). Invoke as `/worth-it <task / ticket / request / plan>` or `/worth-it` for the task currently under discussion.