wan-huiyan

99 mods across 5 repositories, 41 stars between them.

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Claude 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…

3 15d ago A 216 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Before 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.

3 15d ago A 77 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Diagnose 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…

3 15d ago A 217 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Use when gh pr merge --squash prints an alarming diffstat — far more files than your PR touched, with create mode 100644 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…

3 15d ago A 243 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Diagnose 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"…

3 15d ago A 417 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Diagnose 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 15d ago A 497 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

GitHub 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…

3 15d ago A 307 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Diagnose "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 pullrequest events. Use when: (1) CI fails on a…

3 15d ago A 306 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Prevent (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…

3 15d ago A 398 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Use 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…

3 15d ago A 184 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Fix a RECURRING fatal: Unable to create '.../worktrees/ /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…

3 15d ago A 323 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Fix "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…

3 15d ago A 222 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Fix git rebase origin/main (or any multi-commit rebase) silently stalling mid-replay with hint: pick ... It has been rescheduled; To edit the command before continuing, please edit the todo list first output, leaving a stuck .git/worktrees/ /rebase-merge/ directory that git rebase --abort does NOT clear. Use when: (1)…

3 15d ago C 569 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Diagnose 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…

3 15d ago A 221 tokens original MIT

git-worktree

41

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Create, 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.

3 15d ago B 74 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Gate 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/sessionNNN.md" or "run this plan" or "implement…

3 15d ago A 340 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

In a git-worktree session, your OWN Read/Write/Edit tool calls that use a BASE-repo absolute path (one MISSING the .claude/worktrees/ / 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…

3 15d ago A 308 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

A 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.

3 15d ago A 72 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

A 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…

3 15d ago A 342 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Before a large redesign, restructure or migration that will rewrite shared files — templates, the base layout, central views, shared CSS — audit every unmerged branch for commits on those same files. Use when the repo keeps long lived parallel branches (client variant, release, staging, whitelabel) and the plan…

3 15d ago A 135 tokens original MIT

wan-huiyan/agent-traffic-control

Skill Claude CodeCodex

Prevent 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/ ... from the main agent's Bash tool, (2) git worktree list shows the new worktree at an unexpected nested path like…

3 15d ago A 486 tokens original MIT