All authors

Claude Skills by wan-huiyan
github.com/wan-huiyan124 skills0 installs202 views
- Opus Ratelimit Fanout Retry On Sonnet Throttled WavesWhen a large Workflow/Agent fan-out (dozens of parallel subagents on Opus) mass-fails with "Server is temporarily limiting requests (not your usage limit)" / HTTP 429 — most agents dying, a few that finished before the burst surviving — recover by re-running the SAME fan-out on Sonnet and throttled into sequential waves (not one wide burst). Use when: (1) a Workflow returns far fewer results than dispatched and the failures all read "Rate limited" / 429 with "not your usage limit"; (2) you la...Votes: 0GitHub stars: 3
- Orchestrator Rule Too Strict Stalls Agent SilentlyA safety rule you wrote into an agent's brief can be so strict that its precondition never holds — and the agent then does exactly the right thing, which is nothing, for as long as you leave it running. Nothing errors, nothing goes red, and the agent's own status reads as work in progress, so the stall is invisible from every surface you would normally check. Use when: (1) an agent has been running a long time with no product and no failure; (2) you gave an agent a guard phrased over the WHOL...Votes: 0GitHub stars: 3
- Parallel Impl Agent Dies Mid Stream Verify Working TreeA dispatched parallel implementation subagent can die mid-stream and leave ZERO durable output while the harness still reports the task "completed". Use when: (1) you fanned out 2+ foreground impl agents (Agent/Task tool) to edit code in one repo, (2) one returns `API Error: Response stalled mid-stream` / an empty or truncated final message, possibly alongside a background "<task> completed (exit code 0)" notification, (3) you're about to integrate or commit their combined work. The "complete...Votes: 0GitHub stars: 3
- Parallel Pr Scope Overlap Tiebreaker Delta CheckBefore applying a handoff prompt's tiebreaker default ("merge the first-mover", "the clean-against-main one", "the one with reviewer APPROVE") to pick a winner between two parallel PRs that implemented the SAME scope, run `gh pr diff` on BOTH and audit for substantive deltas. Use when: (1) a session prompt or handoff doc surfaces a parallel-PR collision and recommends a tiebreaker, (2) two PRs targeting the same issue / same fix area are open simultaneously authored by different sessions, (3)...Votes: 0GitHub stars: 3
- Parallel Pr Template Fork Duplicates Moved SectionDiagnose silent semantic duplication after two parallel PRs ship. Use when: (1) one PR (the **mover**) relocates a section/component/block from template X to template Y (X loses it, Y gains it), (2) a sibling PR (the **forker**), authored against pre-mover main, creates / promotes / copies template Z from the OLD version of X (when X still contained the section), (3) both PRs squash-merge without textual conflict because they touch different files, (4) after both deploy, the section appears o...Votes: 0GitHub stars: 3
- Parallel Session Coedit Via Source Mtime And Idempotent RebuildEdit a shared deliverable while another live session or a colleague's agent is editing the same file right now — "don't delete each other's work", "only write when the other one is finished". When the file is built from many per item sources by an assembler (sections into one HTML, slides, reports): source mtime shows which items they are on, disjoint sources cannot clobber, and an idempotent rebuild merges everybody's sources. Grepping the assembled build is a false negative test, and stagin...Votes: 0GitHub stars: 3
- Parallel Subagent Fanout Rate Limit Recover From DiskLarge parallel subagent fan-outs (dispatching many Agent/Task subagents at once to each extract/transform a chunk and WRITE a file) hit a server-side rate limit, AND the agent RETURN STATUS lies about what got produced. Use when: (1) dispatching more than ~5-6 concurrent subagents and seeing "Server is temporarily limiting requests (not your usage limit) · Rate limited"; (2) deciding which "failed" subagents to re-run after a throttled batch; (3) a graphify-style chunked extraction (28 chunks...Votes: 0GitHub stars: 3
- Pr Conflict From Mid Flight MergesA pull request that was clean when you opened it now says on GitHub "This branch has conflicts that must be resolved", because others landed on main over the days it sat open. Use when `gh pr view N --json mergeable,mergeStateStatus` returns CONFLICTING and DIRTY, when your branch carries commits you do not recognise, or when some of yours are already on main under a different sha from a squash merge. Find which landed and which of yours are redundant, then reset to the origin tip, rebase and...Votes: 0GitHub stars: 3
- Pr Followup Commit Stranded After SquashDiagnose and recover follow-up commits that were pushed to an open PR's branch but never reached `main` because the user squash-merged the PR between pushes. Use when: (1) you pushed commit 1, opened a PR, then iteratively pushed commits 2, 3, ... in response to user feedback, (2) you go to merge / verify and find the PR is already MERGED, (3) the squash commit on main has insertion counts / file content matching ONLY commit 1 — your follow-up commits are stranded on the now-closed branch. Ro...Votes: 0GitHub stars: 3
- Pr From Stale Branch Silently Reverts Newer Main FilesTrap: merging a PR whose branch carries an OLD TREE silently DELETES (reverts) files that landed on main after that tree was built — with NO merge conflict to warn you, because a deletion your own commit records is not a conflict. Use when: (1) about to `gh pr create` or squash-merge from a long-lived / earlier-branched branch, from a worktree committed with `git add -A`, or after a `git reset --soft`; (2) `git diff --diff-filter=D --name-only origin/main...HEAD` lists files you never touched...Votes: 0GitHub stars: 3
- Pr Hijack Via Stale Worktree Branch RefDiagnose and recover from accidentally overwriting another session's open PR when `git push -u origin <branch>` in a long-lived worktree silently replaces the remote branch ref. Use when ANY of the following appears: (1) you ran `git checkout -b <branch> origin/main` and `git push -u` and git reported `* [new branch]` even though the branch already existed upstream, (2) `gh pr create` then errors with `a pull request for branch "<branch>" into branch "main" already exists` pointing to a PR yo...Votes: 0GitHub stars: 3
- Pr Plan Bucket Triage Before SizingBefore writing detailed pull request plans against a codebase you have not audited, triage it by bucket so sizes rest on findings rather than assumptions.Votes: 0GitHub stars: 3
- Pre Dispatch Agent Isolation Parameter Not PromptTelling an agent in its prompt it has "your own isolated worktree" creates nothing — isolation is the dispatch call's `isolation: "worktree"` parameter. Before fanning out agents that will commit, read the CALL back and make each prove where it landed. Prevention, not cleanup.Votes: 0GitHub stars: 3
- Prep Pr Close Keyword Auto Closes IssueDiagnose and prevent the trap where a scaffolding/prep/planning/handoff PR (one that ships a paste-ready prompt, an ADR, an implementation plan, or any docs-only artefact describing FUTURE work) contains a close-keyword like `closes #N` / `fixes #N` / `resolves #N` in its TITLE or BODY, which GitHub auto-applies at merge time — closing issue #N BEFORE the actual implementation work has been done. Use when: (1) `gh issue view <N>` reports the issue CLOSED but you know the work hasn't run, (2) ...Votes: 0GitHub stars: 3
- Prove Test Failures Pre Existing Via Clean WorktreeAfter making a change you run the test suite and it shows failures — especially in files/areas your diff never touched, or a count that "feels unrelated." Before you either panic-debug them OR wave them off as "probably pre-existing," PROVE it: run the exact failing tests against a clean checkout of origin/main (a throwaway `git worktree`). Identical failures = pre-existing (ship + note them); different = your change caused it. Use when: (1) a broad/full test run after your edit reports failu...Votes: 0GitHub stars: 3
- Recover Killed Session From Transcript And WorktreeRecover a prior Claude Code session that crashed or was killed mid task — its plan, its work and what killed it — from its transcript and its leftover worktree.Votes: 0GitHub stars: 3
- Safe Bulk Worktree Branch CleanupBulk delete accumulated git worktrees and branches without losing anything — "this repo is messy with worktrees", "too many branches", "tidy it up but keep X". Use when `git worktree list` or `git branch -a` prints dozens of stale entries. The trap: `git branch --merged` and `git merge-base --is-ancestor` report a squash merged branch as NOT merged, so they call almost everything unmerged and you stop, or delete believing you are losing work. Gate on the pull request's state instead. Salvages...Votes: 0GitHub stars: 3
- Session Handoff Detect Prior Orphan PrPre-flight detection of a prior incomplete /session-handoff run that already created a branch, PR, handoff doc, and/or worktree — so the current invocation doesn't open a duplicate PR. Use when (1) you're about to write `docs/handoffs/session_N_handoff.md` as part of /session-handoff, (2) you just created or considered creating a `docs/sN-handoff` branch and `git` reports "branch already exists" or `+` (checked out elsewhere), (3) you find a worktree under `.claude/worktrees/` whose name vagu...Votes: 0GitHub stars: 3
- Session Handoff Number Collision With Unmerged SiblingDetect and recover from a session-number collision when running session-handoff and a parallel/sibling session has authored a same-numbered handoff doc that hasn't merged into main yet. Use when: (1) you're in `session-handoff` Phase 1 about to write `docs/handoffs/session_NNN_handoff.md`, (2) `ls docs/handoffs/` shows the highest number is N-1 (so you pick N), BUT (3) MEMORY.md "Recent sessions" or sessions_archive.md already contains a `session_NNN_*.md` entry pointing at another worktree's...Votes: 0GitHub stars: 3
- Shared File Redesign Parallel Author Serial IntegrateWriting the next session's prompts for several remaining slices that ALL edit one hot file — a template, a central view, one stylesheet block — so the usual "split only if the file sets are disjoint" rule would force everything serial. Shared file work is parallel to author and serial to integrate. Pulls the longest lead slice out first as a gating spike when a schema, storage or probe gated backend change decides a later panel's scope, fans the rest out, then merges by ascending risk — or ex...Votes: 0GitHub stars: 3
- Shared Mutable Index Rmw Race Use Marker Blob Per ItemDesigning a shared "who is active / recent items" index that concurrent producers write to: one mutable list silently loses entries. Write one marker per item.Votes: 0GitHub stars: 3
- Shell Pinned To Deleted Worktree Cwd Blocks GitDiagnoses + recovers the "every shell command now fails `fatal: Unable to read current working directory: Operation not permitted`" trap, which appears AFTER a git worktree you were running commands in gets removed/pruned mid-session (you merged + deleted its branch, ran `git worktree remove`, or the Claude Code harness auto-cleaned a merged/unchanged worktree). Use when: (1) git AND python both error `Operation not permitted` / `PermissionError: [Errno 1] Operation not permitted` on startup;...Votes: 0GitHub stars: 3
- Solo Repo Branch Protection Stable Gate And Self MergeLock main on a solo repo so nothing red lands and you are not locked out — no second reviewer needed. Use when something broken reached main by direct push (CI runs too late to block it), or status checks are required and pushes still land. Traps: a matrix names check runs `test (20)`/`test (22)`, not the workflow name, so require a stable aggregation gate that fails, not skips; `required_status_checks` gates merges, not pushes; and `required_approving_review_count: 0` is what lets you self-m...Votes: 0GitHub stars: 3
- Squash Merge Content Preservation Vs Ancestor CheckUse when verifying that an upstream commit (e.g., a colleague's work, a feature-branch commit) is preserved in a target branch after a propagation PR has merged — and the verification script uses `git merge-base --is-ancestor <upstream-sha> <target-branch>`. If the merge mode was **squash**, that ancestor check ALWAYS returns non-zero even when content is preserved verbatim, because squash collapses every commit into a single new SHA on the target. Apply this skill when: (1) preservation audi...Votes: 0GitHub stars: 3
- Stacked Pr Base Branch Deletion Auto Closes DependentRecover from the trap where deleting a base PR's branch auto-closes any open dependent stacked PR, and the closed PR cannot be reopened or retargeted. Use when: (1) you set up a stacked PR pair (PR2's `base` field = PR1's branch instead of `main`), (2) you merged PR1 via squash, (3) PR1's remote branch got deleted — via ANY route: `gh pr merge <N> --squash --delete-branch`, `gh api -X DELETE refs/heads/<branch>`, or `gh pr merge` followed by separate branch cleanup — (4) the dependent PR2 is ...Votes: 0GitHub stars: 3
- Stacked Pr Review Per Base Diff And AttachReviewing a stack of dependent pull requests: diff each one against ITS OWN base rather than against main, and attach the reports to the bottom branch.Votes: 0GitHub stars: 3
- Stale Base Drops Rows From A Shared LedgerTrap: a branch that edits a SHARED HAND-EDITED LEDGER — one machine-parseable file every session appends rows to (a tracker `data.js`/`data.json`, a CHANGELOG, a registry, a manifest, a status board) — can DROP other sessions' rows on merge with **no file deletion and a perfectly ordinary diffstat**, so a file-level `--diff-filter=D` gate reports clean. This needs a stale **tree** (`git reset --soft`, or committing an old worktree with `git add -A`), not merely a stale branch point: a branch ...Votes: 0GitHub stars: 3
- Stale Base Pr Silently Reverts Upstream ContentDetect and recover when a sibling PR's squash-merge silently reverts an upstream PR's content changes because the sibling was based on a pre-upstream main snapshot and its line-level rewrites overlapped the upstream PR's edits. Use when: (1) two PRs are open in parallel against the same file(s) — one refreshing numbers/values, the other rewriting copy/language, (2) the number-refresh PR merges first, the language-rewrite PR merges second, (3) the language-rewrite PR claims "all numbers preser...Votes: 0GitHub stars: 3
- Subagent Bash Cd Wrong WorktreeDiagnose and prevent subagents committing to the wrong git branch when dispatched in multi-worktree setups. Use when (1) you dispatched a subagent (Task tool) with bash steps like `cd <target-worktree> && git commit ...`, (2) the subagent reported DONE with a real-looking commit SHA, (3) `git log` on the target worktree doesn't show that SHA — but `git branch --contains <sha>` finds it on a sibling branch (typically the parent repo's checked-out branch). Root cause: each Bash tool call starts...Votes: 0GitHub stars: 3
- Subagent Driven Branch Ref Froze Stranded CommitsDiagnose and recover from "PR merged, but half my work is missing from main" cases in `superpowers:subagent-driven-development` (or similar one-fresh-subagent-per-task) sessions, where committed work survives in the worktree's `HEAD` chain but never makes it into the pushed branch ref. Use when ANY of these appears: (1) `gh pr view <N>` body claims "M files changed, N insertions" but `gh pr diff <N> --name-only | wc -l` returns a smaller number than you expect (canary: PR-body file count > ac...Votes: 0GitHub stars: 3
- Subagent External Wait Orchestrator TakeoverAvoid orchestrator-budget burn when a subagent's main work is done but it's still polling an external event (CI completion, auto-deploy GHA workflow, Cloud Build, gcloud run revision rollout, long-running test suite, etc.). Use when: (1) you've dispatched a subagent with a final-step instruction like "verify auto-deploy" / "wait for CI green" / "poll until revision active", (2) the subagent has already done its substantive work (PR merged, artifact built) and is now in a polling loop, (3) you...Votes: 0GitHub stars: 3
- Subagent Pre Existing MisattributionCatch subagent reviewers misattributing test failures across the pre-existing / PR-introduced boundary — in BOTH directions. Use when: (1) a multi-task subagent-driven plan reports "N pre-existing failures, unrelated" across consecutive tasks and the count never changes, (2) an architectural / final reviewer at the end catches assertions that should have been updated 5 tasks ago, (3) an implementer reports "verified pre-existing on clean tree by running git stash" but the breaking change is a...Votes: 0GitHub stars: 3
- Subagent Read Stale Worktree Needs Head PinRead-only subagents (Explore / code-explorer / general-purpose dispatched to AUDIT or READ code, not write) silently return line numbers and "what exists" claims from the WRONG git worktree in a repo with many worktrees — confidently-wrong stale data, no error. Use when: (1) you dispatched 1+ read/audit subagents and their cited file:line numbers, function locations, or "X is/isn't present" claims DON'T match what you read directly in your pinned worktree; (2) `git worktree list` shows 2+ pat...Votes: 0GitHub stars: 3
- Subagent Reports Complete But Pr UnmergedCatch the systematic gap between sub-agent "completed" status and the actual end state of a PR-merge orchestration task. Use when: (1) you've dispatched multiple parallel sub-agents (general-purpose or specialist) to open + review + merge PRs, (2) the parent receives `<task-notification>` with `status: completed` but the sub-agent's last action was waiting on CI, addressing a review finding, or pushing a rebased branch, (3) you're tempted to mark the parent task done based on the completion n...Votes: 0GitHub stars: 3
- Subagent Watchdog Stall On Ui Template TrackRecognise the failure mode where a `general-purpose` (or similar) subagent dispatched to do UI/template-heavy work stalls and gets killed by the no-streamed-output watchdog (~600s of silence → terminate). Use when: (1) you dispatched a subagent for UI work (new page route + Jinja/template authoring + per-step iterative tests + small CSS), (2) the agent reports `failed: Agent stalled: no progress for 600s (stream watchdog did not recover)` with a partial result fragment like "Now let me look a...Votes: 0GitHub stars: 3
- Synthetic Id Collision RebaseFix the "I claimed cat7-7bg, they claimed cat7-7bg, theirs merged first" failure mode when rebasing a PR after parallel sessions land mid-flight. Use when: (1) rebasing a stale PR onto current main produces a conflict in an append-only register file (tracker entries, ADR `NNNN-` prefixes, migration filenames, OpenAPI operationIds, error codes, lessons.md `## N.` numbering), (2) BOTH your branch and a freshly-merged branch added an entry under THE SAME synthetic ID — the collision is namespace...Votes: 0GitHub stars: 3
- Task Framing Claims Need Subagent Grep VerifyWhen dispatching a sub-agent (Agent / Task) to WRITE content that cross-references existing code paths, explicitly grant + expect grep-driven correction of the dispatcher's task-framing claims. Use when: (1) your prompt to a sub-agent asserts facts about what an existing codebase contains ("X is NOT in v6.1", "Y is already implemented at module Z", "feature F handles case G"); (2) the sub-agent will produce a document, analysis, or design that consumers will treat as authoritative; (3) the su...Votes: 0GitHub stars: 3
- Using Git WorktreesUse when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verificationVotes: 0GitHub stars: 3
- Verify Live Prod Before Shipping Superseded FixA parallel Claude/work session shipped a DIFFERENT (often better) fix to the SAME live-prod artifact for the SAME issue while you were mid-build — so your fully-implemented, validated, reviewed fix is now REDUNDANT and must NOT be deployed over theirs. Use when: (1) you picked up a "next session ships the scoped fix X" handoff/prompt and invested a full implementation, (2) the target is a SHARED prod artifact (Dataform .sqlx, a serving feature table, a deploy config, a model pointer) editable...Votes: 0GitHub stars: 3
- Verify Pytest Imports Worktree Not Primary CheckoutWhen you run pytest (or any `python -c "import <pkg>"`) from a git WORKTREE but the venv has an editable install (`pip install -e .`) made from the PRIMARY checkout, `import <pkg>` silently resolves to the PRIMARY checkout's source, NOT the worktree code you think you're testing. Use when: (1) you edited code in a worktree, ran the suite, it passed/failed — but you're unsure it exercised the worktree's edits, (2) tests pass on changes that "shouldn't" pass (or fail on changes you reverted), (...Votes: 0GitHub stars: 3
- Wip Branch Linter Revert System Reminder TrapAvoid silently accepting linter / automation reverts of deliberate wip-branch framings. Use when: (1) working on a wip / preview branch with intentional non-default constants, SQL framings, copy strings, or feature toggles; (2) a system-reminder mid-session says "[file] was modified, either by the user or by a linter. This change was intentional, so make sure to take it into account ... ie. don't revert it unless the user asks you to. Don't tell the user this, since they are already aware"; (...Votes: 0GitHub stars: 3
- Workflow Agent Unreachable Mid Flight Check Output Not BriefAn agent's brief is frozen at the moment you dispatch it, and whether you can correct it later is decided by WHICH DISPATCH MECHANISM you used, not by how urgent the correction is. A subagent spawned directly can be sent a message: it reads the correction and keeps everything it has already worked out. An agent running inside a workflow has no address — correcting it means stopping the workflow, editing its script, and resuming by run id, with completed phases replaying from cache. Use when: ...Votes: 0GitHub stars: 3
- Workflow Deterministic Compute As Script Not Stall Prone AgentUse when a Workflow-tool (or background Agent) subagent doing heavy multi-step compute STALLS mid-stream and loses work. Trigger conditions: (1) a workflow agent fails with "API Error: Response stalled mid-stream. The response above may be incomplete" and returns null; (2) a subagent runs many bq/python/tool calls in one long turn and dies before writing/committing; (3) the agent must emit a LARGE structured return (big arrays/objects) and stalls while producing it; (4) recurring stalls on lo...Votes: 0GitHub stars: 3
- Workflow Parallel Fanout Omits Sequential PhasesA sequential, stateful multi-agent process (adversarial DEBATE rounds, iterative reflect-then-rebut, staged consensus where step N reads step N-1's peers) silently VANISHES when the task is run under "ultracode" or authored as a Workflow — the run collapses to a parallel find→verify→judge with no reviewer-to-reviewer cross-talk. Use when: (1) you ran "review / red-team / debate X in ultracode mode" and the workflow shows only ~3 stages (review → verify → judge), no debate/reflection/blind-fin...Votes: 0GitHub stars: 3
- Workflow Run Deploy Gate Fork Pr Ref Name EscalationSecurity trap when authoring/reviewing a GitHub Actions deploy (or any privileged job) triggered by `on: workflow_run` and gated on the triggering run's BRANCH NAME. Use when: (1) a `workflow_run` job gates on `github.event.workflow_run.head_branch == 'main'` (or conclusion == 'success') to decide a privileged deploy / publish / OIDC-cloud action, (2) you are wiring CI-gated auto-deploy-on-merge ("deploy after the CI workflow passes on main"), (3) reviewing a workflow that mints cloud creds (...Votes: 0GitHub stars: 3
- Workflow Schema Agent Retry Cap Oversized PayloadA dynamic Workflow (the Workflow tool / multi-agent orchestration) parallel()/pipeline() agent that DID all its work returns null and the run reports "StructuredOutput retry cap (5) exceeded — 5 failed calls with no valid output" — NOT because the agent found nothing or was rate-limited, but because its result OBJECT was too large / malformed to serialize in one StructuredOutput call (a big nested array of findings, long SQL/quotes per row), often compounded by a stray closing-tag / truncatio...Votes: 0GitHub stars: 3
- Workflow Schema Agents Empty Loop Under RatelimitA dynamic Workflow (the Workflow tool / multi-agent orchestration) returns FEWER results than it dispatched, and one or more parallel() agents "failed" — because during a transient server-side rate-limit storm the affected agents called StructuredOutput 50-90× each with EMPTY args (0 fields), failed schema validation every time, then died on a terminal API error. Use when: (1) a workflow fan-out comes back with N-of-M results and logs show "API Error: Server is temporarily limiting requests (...Votes: 0GitHub stars: 3
- Workflow Standalone Schema Agent Crash And Args StringTwo failure modes that crash an entire dynamic Workflow (the Workflow tool / multi-agent orchestration scripts) and discard all completed agents' work. Use when: (1) a workflow fails with "Error: agent({schema}): subagent completed without calling StructuredOutput (after 2 in-conversation nudges)" — caused by a STANDALONE/terminal `await agent(prompt, {schema})` that is NOT inside parallel()/pipeline(), so the throw propagates and fails the whole run even though the other agents succeeded; (2...Votes: 0GitHub stars: 3
- Working Tree Edits Stranded On Squash MergeDiagnose and prevent "I made the fix but it's not on main" cases where the fix was applied in the working tree via Edit / Write but never `git add`ed before the squash-merge. Use when: (1) you squash-merged a PR and the user reports the issue is back, (2) `git status` after the merge shows uncommitted changes for files you remember editing during the PR's acceptance pass, (3) a follow-up `git diff origin/<base>` against the merged branch surfaces edits that should have been in the PR. Root ca...Votes: 0GitHub stars: 3
- Worktree Does Not Isolate Shared Installed ArtefactsA git worktree isolates the SOURCE TREE and nothing else. Anything installed or cached under a key that is not the worktree path — a simulator keyed by bundle id, DerivedData keyed by project path, a plugin cache keyed by version string, a venv keyed by package name — is shared by every worktree on the machine, so a build/test/run in one worktree can silently exercise ANOTHER worktree's artefact. Use when: (1) a test result contradicts one you already trust, or reports values from a build you...Votes: 0GitHub stars: 3