All authors

Claude Skills by wan-huiyan
github.com/wan-huiyan124 skills0 installs202 views
- Claude Code Projects Jsonl Worktree FanoutSearch prior-session JSONL transcripts across worktree-namespaced project directories under `~/.claude/projects/`. Use when: (1) the user asks "find a previous session about X" or "remind me when we discussed Y" for a project that uses git worktrees, (2) you grep the canonical `~/.claude/projects/<project-dir>/*.jsonl` and the matching session isn't there, (3) you need to enumerate every conversation that touched a project regardless of which worktree it ran from. Claude Code stores each git ...Votes: 0GitHub stars: 3
- Code Review Subagent Fabricates Specifics To Inflate SeverityWhen a code-review subagent (voltagent-qa-sec, opus-tier reviewer, code-reviewer, etc.) reports a HIGH or BLOCKING severity finding, verify any SPECIFIC EVIDENCE the reviewer cites (line numbers, call counts, exact function/symbol names, file paths beyond the obvious diff) BEFORE treating the severity as actionable. Use when: (1) a single-run code-review subagent returns a BLOCKING/HIGH finding justified by concrete numeric evidence like "there are EXACTLY 4 calls at lines 3174, 3230, 3251" o...Votes: 0GitHub stars: 3
- Code Reviewer Subagent No Bash Blocked On Pr DiffCode-review subagents are frequently provisioned WITHOUT a Bash tool, so they cannot run `gh pr diff`, `git diff`, or `git checkout` — and when you prompt them to "review PR #N, fetch the diff with gh pr diff" they return a BLOCKED report (no review performed), not findings. Use when: (1) dispatching feature-dev:code-reviewer / voltagent-* / Explore agents to review GitHub PRs or branches; (2) a review agent returns "I have no shell/gh/git tool" or "the PR sources are not in the working tree"...Votes: 0GitHub stars: 3
- Concurrent Session Checkout Clobbers Shared WorktreeA second Claude Code session (or agent/person) sharing the same working directory runs `git checkout`/`git switch`, flipping the branch for the whole working tree underneath your session and clobbering your uncommitted work. Use when: (1) a file you just edited has silently reverted — often with a "file was modified, either by the user or by a linter" system reminder, (2) `git branch --show-current` shows a branch you didn't switch to, (3) `git reflog` shows a `checkout: moving from X to Y` y...Votes: 0GitHub stars: 3
- Credit Stall Mid Orchestration Revive CollisionRecover gracefully when an Anthropic credit/billing failure stalls multiple in-flight parallel subagents mid-orchestration, then later resolves. Use when: (1) you've dispatched 2+ parallel subagents (Task tool with `run_in_background: true`) and a credit/billing issue, MCP outage, or other transient harness failure has frozen them, (2) the user reports the issue is now resolved and asks you to continue, (3) you're about to relaunch "resume" agents to pick up where stalled originals left off. ...Votes: 0GitHub stars: 3
- Cross Worktree Spec Handoff Via Checkout PathsPass a shared file between two parallel sessions in different worktrees or branches, without merging to main first — a design spec, docs, a handoff prompt, a mockup. `git checkout <branch> -- <paths>` stages it. Use when a session says "the file doesn't exist". Not co editing.Votes: 0GitHub stars: 3
- Agent Refusal With Evidence Beats Literal ComplianceA dispatched agent that does exactly what you asked can ship a defect you would have stopped yourself, because it can see something at the worksite that you could not see when you wrote the brief. Use when: (1) you are writing a brief that prescribes a specific fix, threshold, wording or value rather than the outcome you want; (2) an agent reports that it did not do what you asked and you are deciding whether that is insubordination or judgement; (3) an agent asserts "this is fine" or "not ne...Votes: 0GitHub stars: 3
- Async Doc Hook Autodocs Worktree Locks Branch CheckoutFix for `git checkout <branch>` failing with `fatal: '<branch>' is already used by worktree at '.../autodocs-<name>'` (or a subagent reviewing a PR reports a path like `.../worktrees/autodocs-<topic>/...`). Use when: (1) right after a commit whose hook printed `[post-commit] Python files changed — running doc update in background...`, a later branch switch is blocked; (2) you can't check out the branch you just committed to because "another worktree" holds it; (3) a review/subagent cites a fi...Votes: 0GitHub stars: 3
- Async Post Commit Hook Commit Orphaned By Squash MergeIn a repo with an ASYNC/background post-commit hook (one that fires after a commit and creates its OWN follow-up commit — `[auto-docs] …`, a docs/site regen, a changelog/checkbox tick), the hook's commit can land LOCAL-ONLY *after* your `git push` already captured just your work commit, so it is never in the PR and gets ORPHANED + silently lost when the squash-merged branch is deleted. Use when: (1) you pushed a fix, PR'd it, and squash-merged, then a later `git status -sb` shows your feature...Votes: 0GitHub stars: 3
- Auto Merge Rearms While Agent Live Kill Then Disarm VerifyDisarming auto-merge on a PR whose agent is still running does not hold it — the agent re-arms within minutes and the PR merges, because arming is a step in the agent's brief and disarming is not an instruction to the agent at all. Use when: (1) you want to STOP a pull request from merging that an agent opened and armed, for review, for a rethink, or because it is landing into a queue you are trying to drain; (2) a PR you disarmed merged anyway; (3) you are telling agents which PRs are on hol...Votes: 0GitHub stars: 3
- Cjk Structured Llm Output Truncates Json Needs 2x TokensWhen generating LONG Chinese/Japanese/Korean (CJK) STRUCTURED output (a big JSON report, a multi-section document) from an LLM chat API, the response truncates mid-JSON and your parser throws "no parseable JSON" / "Expecting ',' delimiter" / JSONDecodeError — even though the SAME prompt in English worked. Root cause: CJK is token-heavy (≈1–2 tokens per character vs ≈0.25 for English), so a report that fit your max_tokens in English overflows it in Chinese. Some models ALSO hard-cap output wel...Votes: 0GitHub stars: 3
- Db Access Review Subagent Needs Explicit Probe BudgetDispatching a review or verification agent with live database, gcloud, psql or bash access: give it a tool call and time budget, plus the probes NOT to re-run. Also when it gives `API Error: The socket connection was closed unexpectedly`, or has run 30 minutes. Not its sources.Votes: 0GitHub stars: 3
- Deploy From Stale Worktree Silent RollbackDiagnose "I deployed a new Cloud Run / Docker image but a bunch of recently merged fixes regressed in production." Use when: (1) the deploy script does `gcloud builds submit ... "${SCRIPT_DIR}"` or `docker build <dir>` (build context = local filesystem, NOT a git ref), (2) the user has many git worktrees / multiple checkouts of the same repo, (3) the user reports "redeployed but the fix from PR #X isn't live" or "lots of fixes regressed after my deploy", (4) the deployed revision created at t...Votes: 0GitHub stars: 3
- Design Subagent With Plan Schema Executes And Deploys Live InfraCatch the failure where a subagent dispatched ONLY to DECIDE/DESIGN (a judge, a design-panel synthesizer, a "pick the mechanism" agent) instead EXECUTES the plan — and, having full Bash/gcloud/bq, provisions LIVE infrastructure (creates a BQ dataset/table, a DTS scheduled query, a log metric, a paging alert policy) and even git-commits code — when you only wanted a recommendation. Use when: (1) you author a Workflow/Agent whose structured-output schema has a field that reads as an execution m...Votes: 0GitHub stars: 3
- Dispatched Bash Agent Git Checkout Clobbers Uncommitted EditA verification/review/audit subagent YOU dispatched (Workflow agents, Explore, general-purpose, code-reviewer — anything with Bash) runs a file-level `git checkout <path>` / `git restore <path>` / `git stash` to compare your work against HEAD, and silently REVERTS your uncommitted working-tree edit in the shared worktree. The agent then reports that edit as "missing / not persisted / blocker", and sibling agents pile onto the phantom. Use when: (1) a review or verification agent reports a fil...Votes: 0GitHub stars: 3
- Docs Branch Off Feature Branch Smuggles CodeCatch the bug class where a "docs follow-up" PR silently ships the parent feature's code under a `docs(sN):` title because the docs branch was created from the current working branch (a feature branch), not from `origin/main`. Use when: (1) you just opened a PR titled `docs(...)` or `chore(...)` after wrapping up a feature session, (2) `gh pr diff <N> --name-only` shows files OUTSIDE `docs/` (source code, Dockerfile, tests, generated artefacts), (3) `git log origin/main..HEAD` shows TWO+ comm...Votes: 0GitHub stars: 3
- Executed Prompt Not Retired Sibling Redoes ItA prompt/brief/runbook file and the index that lists it are SHARED STATE between parallel sessions, so finishing the work is only half of finishing: the session that executes a brief must retire it on BOTH surfaces, and the session that writes one must register it, or a sibling redoes work that already merged or never sees the file at all. Use when: (1) you are about to execute a brief from a handoffs/plans/runbooks directory, or an index says "take this one" / "next" / "live, unclaimed"; (2)...Votes: 0GitHub stars: 3
- Extract Workflow Markdown From Output JsonUse when a Workflow (or background Agent) synthesis step returns a LARGE markdown deliverable inside a structured-output (schema) field — e.g. a `next_prompt_markdown`, a full report, a generated doc — and you need to persist it to a file. The completion notification TRUNCATES the result and shows the field JSON-escaped (literal `\n`, `\"`), so hand-retranscribing it into a Write call is both lossy (you only saw part of it) and error-prone (escapes leak as literal text). Trigger: you're about...Votes: 0GitHub stars: 3
- Factcheck Subagent Needs Complete SourcesWriting the prompt for a verifier that will "fact check" or "verify" a document or report against sources: hand it complete originals, never your own partial dump. And a verdict back that calls a claim "unsupported" or "fabricated" — check the gap is not in a source you trimmed.Votes: 0GitHub stars: 3
- Fan Out Cost ControlControl agent fan-out cost through deliberate model selection, bounded context, useful checkpoints and limits on nested consultations.Votes: 0GitHub stars: 3
- Flask Debug Cross Worktree Edit StaleDiagnose "I edited the template / view / CSS but Flask debug-mode keeps serving the old version" when running a local dev server (Flask, Django runserver, Rails server, etc.) from one git worktree while editing files in a sibling worktree of the same repo. Use when: (1) you have multiple `git worktree` checkouts of the same repo (typical with `.claude/worktrees/<feature>` directories), (2) a dev server is running in worktree A serving its working tree, (3) you're making edits in worktree B be...Votes: 0GitHub stars: 3
- Flatten Workflow Parallel Arrays Before CollectingClaude Code Workflow tool gotcha: a pipeline() stage that returns parallel([...]) resolves to a BARE ARRAY, but a sibling stage that returns {dimension, verified: []} resolves to an OBJECT — so a collector written as `per.flatMap(p => Array.isArray(p?.verified) ? p.verified : [])` SILENTLY DROPS every item from the array-shaped stages. Use when: (1) a fan-out review/verify workflow reports "0 confirmed / 0 refuted" or "0 findings" but the agent count / journal shows verify agents actually ran...Votes: 0GitHub stars: 3
- Gh Issue Claim CoordinationBefore writing code for a GitHub issue when another session might take the same one, claim it with BOTH an assignee and a `wip` label so a sibling sees it and skips. Trigger on "pick up issue #N", "work through the open issues", "is anyone on this?". Not for filing or reviewing.Votes: 0GitHub stars: 3
- Gh Pr Create Orchestration Cwd Wrong HeadDiagnose and prevent `gh pr create` opening a PR against the WRONG head branch when invoked from a parallel-orchestration setup with multiple worktrees. Use when: (1) you've dispatched subagents to work in sub-worktrees but you're finalizing PRs from a separate orchestration worktree, (2) `gh pr create` succeeds but `gh pr view --json headRefName` shows your orchestration worktree's branch (e.g. `docs/sNNN-handoff`) instead of the feature branch the subagent committed to (e.g. `fix/issue-X`),...Votes: 0GitHub stars: 3
- Gh Pr Merge Squash Stdout Shows Sibling Files As CreatedUse when `gh pr merge --squash` prints an alarming diffstat — far more files than your PR touched, with `create mode 100644 <file>` lines for files you never added (e.g. handoff docs, sibling-PR artifacts) and an inflated insertion count. This looks like your PR smuggled unrelated content onto the base branch, but it usually has NOT: the echoed diffstat reflects your branch measured against an OLDER ancestor (files from sibling PRs merged to main *after* your branch point show as "created" in...Votes: 0GitHub stars: 3
- Gh Pr Merge Unstable State Needs Auto And Watch Branch DeletesDiagnose and recover from two adjacent `gh pr merge` failure modes that masquerade as merge conflicts. Use when: (1) `gh pr merge --squash` (or `--merge`) errors with "To have the pull request merged after all the requirements have been met, add the `--auto` flag" AND "Run the following to resolve the merge conflicts locally" even though you just pushed a clean resolution; (2) `gh pr view <N> --json mergeable,mergeStateStatus` returns `MERGEABLE` + `UNSTABLE` rather than `MERGEABLE` + `CLEAN`...Votes: 0GitHub stars: 3
- Gh Pr Merge Worktree Checkout TrapDiagnose and bypass `gh pr merge --squash --delete-branch` failing with "failed to run git: fatal: 'main' is already used by worktree at ..." when another git worktree has main checked out. Use when: (1) you run gh pr merge and see this exact error, (2) you have multiple worktrees in the repo (e.g. `.claude/worktrees/*`), (3) the error appears even though the GitHub merge itself looks fine. The merge SUCCEEDED on GitHub — only gh's local-side effect (post-merge `git checkout main`) failed. Ve...Votes: 0GitHub stars: 3
- Gh Pr Pickup Designated Branch SupersedeFinish somebody else's open draft pull request when your session must push to a different, designated branch name — base it on the PR head and supersede.Votes: 0GitHub stars: 3
- Gh Squash Merge Closes Only One IssueGitHub auto-close on squash-merge only catches ONE issue per PR even when the PR title/body says "Closes #447, #448, #449, #450". The first issue closes; the rest stay OPEN. Use when: (1) you opened a PR with a title or body listing multiple "Closes #X, #Y, #Z" references, (2) the PR squash-merged successfully (`gh pr view N --json state` = MERGED), (3) `gh issue list --state open` shows some of the referenced issues are still OPEN. Root cause: GitHub's auto-close keyword parser binds one key...Votes: 0GitHub stars: 3
- Gha Pr Merge Ref Shows Upstream ChangesDiagnose "my CI failed on a file I didn't change — the test passes locally but CI insists there's a duplicate / conflict / lint violation that isn't in my branch." Caused by GitHub Actions checking out `refs/pull/N/merge` (the auto-computed merge of PR head + base) on `pull_request` events. Use when: (1) CI fails on a `git`/lint/whole-tree check (duplicate IDs, schema drift, file-content audit) that PASSES on the same SHA locally, (2) you're working in a dense parallel-PR window where main is...Votes: 0GitHub stars: 3
- Git Add U After Async Post Commit HookPrevent (and recover from) `git add -u` + `git commit --amend` + `git push --force-with-lease` catastrophically rolling thousands of unrelated tracked-file deletions into an amended commit when the project has an async post-commit hook that mutates tracked files (e.g. regenerates `docs/site/*.html`, `docs/site/index.html`, `MEMORY.md`, or any other tracked artefact in a background `&` / `nohup` / "running … in background" process). Use when: (1) you just made a small commit, the post-commit l...Votes: 0GitHub stars: 3
- Git Amend Hits Async Post Commit Hook CommitUse when a `git commit --amend` silently rewrites the WRONG commit in a repo that has an async/background post-commit hook. Trigger: after a normal commit, `git log` shows an unexpected extra commit on top that a background hook created (`[auto-docs] ...`, a docs/site regen, a changelog/checkbox tick) — and a later `--amend` folds your change into THAT hook commit instead of your feature commit. The amend reports success; no error. Also use proactively before instructing subagents to `--amend...Votes: 0GitHub stars: 3
- Git Auto Maintenance Recurring Worktree Index LockFix a RECURRING `fatal: Unable to create '.../worktrees/<name>/index.lock': File exists` that comes back after you `rm` it — in a busy/multi-worktree repo where your OWN git commands keep spawning `git maintenance run --auto` (→ `git gc --auto` / `git repack` / `git pack-objects`). Use when: (1) a `git checkout`/`add`/`commit` fails with "Another git process seems to be running … index.lock: File exists", (2) deleting the lock works ONCE then it returns on the next git command, (3) `pgrep -fl...Votes: 0GitHub stars: 3
- Git Diff 2dot Vs 3dot Merge SafetyTwo-dot `git diff origin/main..branch` reports files `main` gained after you branched as your deletions; three-dot uses the merge base and shows only real ones.Votes: 0GitHub stars: 3
- Git Pull After Squash MergeFix "untracked working tree files would be overwritten by merge" errors when pulling after a squash merge. Use when: (1) `git pull` fails listing files that should already be on main, (2) you just squash-merged a PR and can't pull on another branch, (3) files from a merged branch appear as "untracked" blocking checkout or pull. The root cause is that squash merge creates new commits — the original branch files exist on main but your local copy has them as untracked leftovers from the old bran...Votes: 0GitHub stars: 3
- Git Rebase Stalls Async Post Commit HookFix `git rebase origin/main` (or any multi-commit rebase) silently stalling mid-replay with `hint: pick <SHA> ... It has been rescheduled; To edit the command before continuing, please edit the todo list first` output, leaving a stuck `.git/worktrees/<name>/rebase-merge/` directory that `git rebase --abort` does NOT clear. Use when: (1) you ran `git rebase origin/main` on a branch with N commits to replay, (2) the rebase output shows partial progress (`Rebasing (1/N)... Rebasing (2/N)...`) th...Votes: 0GitHub stars: 3
- Git Stash Pop Pulls Unrelated StashDiagnose and avoid `git stash pop` pulling in a stale stash from a different branch when the preceding `git stash` was a no-op. Use when: (1) `git stash` reports "No local changes to save" but you `git stash pop` anyway as a reflex; (2) `git stash pop` surfaces files you don't recognize, often with "both modified" merge conflicts in files unrelated to your current work; (3) `git status` after a stash pop shows changes in files from other features / other branches; (4) `git stash list` reveals...Votes: 0GitHub stars: 3
- Git WorktreeCreate, list, switch and clean up git worktrees — a second isolated checkout for parallel work or a pull request review. Runs the bundled `skills/git-worktree/scripts/worktree-manager.sh`, which also copies `.env` in, gitignores the dir and trusts mise or direnv. Not a bare `git worktree add`.Votes: 0GitHub stars: 3
- Handoff Prompt Stale User Hint Newer StateGate execution of a structured runbook/handoff/plan prompt behind an AskUserQuestion when the user explicitly hints that newer state (issues filed, PRs merged, probes shipped) has landed since the prompt was authored. Use when: (1) the user invokes "execute docs/handoffs/session_NNN_*.md" or "run this plan" or "implement this ADR" AND adds an inline aside like "but please be aware of #A, #B, #C" / "watch out for PR #N" / "FYI #issue landed since this was written"; (2) before executing, a scan...Votes: 0GitHub stars: 3
- Harness Read Write Base Repo Path In Worktree Stale TreeIn a git-worktree session, your OWN Read/Write/Edit tool calls that use a BASE-repo absolute path (one MISSING the `.claude/worktrees/<name>/` segment) silently operate on the base repo's working tree — a DIFFERENT, often month-stale branch sharing the same `.git`. Use when: (1) a `Read`'s line numbers / function locations don't match a `grep` you ran in the worktree cwd (Bash sees the worktree; Read with a base path sees the base repo); (2) a `Write`/`Edit` "succeeds" but the file never appe...Votes: 0GitHub stars: 3
- Inherited Scope Doc Names May Not ExistA scope or plan doc from a prior session references dataset paths, table and column names that may not exist. Verify every `project.dataset.table` and column name exists, with a fast schema probe, before a multi hour dispatch of parallel subagents or batch jobs. NOT enum VALUES.Votes: 0GitHub stars: 3
- Isolate Subagent Verification From Live WorktreeA verification / gate-running subagent you dispatched into YOUR OWN worktree silently measures the branch PLUS your uncommitted edits, and reports the mixture as the branch's result. Nothing is clobbered and nothing errors — the suite really ran, the counts are real, they are just counts of a tree nobody will ever merge. Use when: (1) you dispatched an agent to "run the gates" / "verify main" / "check the suites" and pointed it at the directory you are still editing or committing in; (2) an a...Votes: 0GitHub stars: 3
- Large Redesign Parallel Branch Collision AuditBefore a redesign, restructure or migration replaces shared templates, layouts or views, audit all unmerged branches, including client variants, releases and staging. Prevent clean merges from stranding accessibility or hotfix work that later conflicts. Run before fixing the plan. Not for two PRs racing on one scope or cosmetic restyling.Votes: 0GitHub stars: 3
- Main Bash Cwd Persists Nested WorktreePrevent and diagnose nested git worktrees created at the wrong filesystem path when orchestrating parallel work from the main Claude Code agent. Use when (1) you ran `git worktree add .claude/worktrees/<name> ...` from the main agent's Bash tool, (2) `git worktree list` shows the new worktree at an unexpected nested path like `.claude/worktrees/<previous-worktree>/.claude/worktrees/<name>` instead of the intended top-level location, (3) a subagent dispatched to the intended path reports "work...Votes: 0GitHub stars: 3
- Merge Conflict Generated FilesThe conflicting files are derived output from a generator: resolve their source, re-run it and stage the fresh result rather than hand merging the output.Votes: 0GitHub stars: 3
- Merge Queue Thrash Stop Inflow And Open Prs As DraftsWhen main moves faster than the slowest CI leg, every open branch goes stale before it can merge and the whole queue jams with nothing red. Use when: (1) several PRs sit at mergeStateStatus BEHIND with auto-merge armed and none of them lands; (2) branches are being updated, re-running CI and going stale again before that run finishes; (3) you are landing work continuously and wondering why the queue is not draining — you are the cause, not a victim; (4) you are deciding how a fleet of agents ...Votes: 0GitHub stars: 3
- Merged Pr Not Deployed Gate Label MissingDiagnose "I merged my PR + CI is green but the live service still doesn't show my changes." Use when: (1) a code-bearing PR has been squash-merged into main with all required status checks passing, (2) the user reports the change is still missing from the deployed environment minutes-to-hours later, (3) the repo has a `pull_request: types: [closed]` workflow gated on a label (typically `auto-deploy`, `deploy`, `ship-it`) and/or a path filter, (4) the deploy workflow's run row in `gh run list`...Votes: 0GitHub stars: 3
- Multi Agent Skill Silent Phase CompressionDiagnose and fix silent compression of MANDATORY phases in multi-agent orchestrator skills (review panels, debate workflows, multi-reviewer pipelines). Use when: (1) a skill spec lists 10+ phases including parallel reviewer dispatch but the actual run "compresses Phase 4 (reflection) / Phase 5 (debate) / Phase 7 (blind finals) into the judge's integration", (2) a multi-reviewer panel produces a report that looks identical to a full run but actually skipped reflection/debate/blind-final rounds...Votes: 0GitHub stars: 3
- Multi Phase Skill Disk Reading StrategyFix silent subagent failures in late phases of multi-phase Claude Code skills. Use when: (1) a skill has 10+ phases and the last phase's subagent silently fails to launch, (2) Phase N produces output that Phase N+1 needs but the orchestrator's context is near capacity, (3) the orchestrator injects large data payloads (500+ lines) into subagent prompts and the subagent produces degraded or empty output, (4) a skill's final output step works in short reviews but fails in long ones. The fix: hav...Votes: 0GitHub stars: 3
- Multi Worktree File Url Stale ContentWhen a user opens a `file://` URL bookmark to a file in a repo with multiple git worktrees, the browser shows whatever the targeted worktree's branch contains — NOT main, NOT the latest merge. Use when: (1) user reports "I don't see my change" or "the fix isn't there" right after a PR was merged, (2) you've confirmed via `git show origin/main:<path>` that main has the fix but the user-visible file:// view doesn't, (3) the file path mentioned by the user contains `.claude/worktrees/<name>/`, `...Votes: 0GitHub stars: 3