luohy15/y-agent/dev
Claude Code and agent skill by luohy15/y-agent
- community
Checking that the SKILL.md file is still in the repository.
Dev coordinator - worktree lifecycle and dispatch to plan/impl/review skills. Use when user wants to create/remove worktrees, kick off dev tasks, commit worktree changes, or hand off reviewed changes.
Install
npx vskill@latest install luohy15/y-agent/devSKILL.md
Dev Skill (Coordinator)
Thin shell coordinator for development work. Manages worktree lifecycle and dispatches to the plan / impl / review leaf skills via y chat --skill <name>. Dispatched by manager via y chat --topic leader --skill dev.
Does not read code, audit, implement, or review directly. Those are leaf-skill responsibilities. This keeps the coordinator's own context lean. It is a hard rule with no size exception: see "Never implement directly" below.
⛔ Trace isolation: never cross-trace dispatch
This is the single most important rule for the dev coordinator, and the most repeatedly violated. Read it before every dispatch.
This coordinator runs under exactly one trace: its own todo_id. That trace is a private sub-tree.
The chat itself is bound to that trace for its whole lifetime. The trace in the first dispatch prefix defines the only todo this coordinator may coordinate. If any later user message or child callback mentions a different trace, stop immediately and route it to a fresh chat instead of continuing locally.
Hard rules:
- Every
y chat --skill plan/impl/reviewdispatch you make must carry
--trace-id <your_own_todo_id>. No exceptions.
- Never pass another todo's id as
--trace-id. - Never resume, reuse, or attach to a plan / impl / review session (chat id) that was
created under a different trace.
- A plan note, worktree, or impl result produced under a different trace is **external
context only. You may read it, but you must not** continue or dispatch into those sessions.
- If a task genuinely needs another todo's work, that is a separate trace with its own dev
coordinator. See "New requirement inside an active coordinator chat" in Notes.
- If a callback arrives with
[trace:B]while this coordinator owns traceA, do not
commit, push, update todo B, or report completion. Reply with a trace mismatch and tell the dispatcher to resume or create the correct dev chat for trace B.
Anti-example (do NOT do this):
Correct: every dispatch from a trace-2071 coordinator uses --trace-id 2071 and spawns fresh --skill sessions. If trace 2072's work is needed, do not touch it; it has its own coordinator.
Anti-example (a real failure: chat `d5584d`, traces 2380 / 2384):
Correct: stop on the mismatched callback, report that d5584d owns trace 2380 and cannot coordinate trace 2384, then ask the dispatcher to use the proper trace 2384 dev chat or start a fresh one with --new --trace-id 2384.
⛔ Branch and push policy: determine the target branch first
This is the second hard rule. Read it before the first `y dev wt add` of every task.
y dev wt add branches off whatever the project repo's current HEAD is, and y dev commit rebases and fast-forward-merges into the project repo's current branch. Neither command knows or cares which branch is the right target. That is the coordinator's job to set up first.
Step 0 of every dev task: establish the project's target branch before creating a worktree.
Then:
- If the project's convention is to develop on an integration branch (
test,develop,
staging), check it out and pull before creating the worktree, so the worktree branches off the right base: ``bash git -C <project_path> checkout <integration_branch> && git -C <project_path> pull ``
- If the project ships from
main, pullmainand proceed. - Never push to a protected or production branch without explicit user instruction.
- If the worktree was accidentally created off the wrong base, abort:
y dev wt rm <name>,
switch the repo to the right branch, re-create the worktree.
- If you cannot determine the convention from the repo, **ask the user before creating a
worktree or choosing a target branch.** Do not guess.
Record each repository's confirmed branch policy somewhere durable (a reference file next to this skill) so it is settled once rather than re-litigated per task.
Shipping to the mainline: rebase, do not merge
When landing work on the mainline, including a cross-branch ship like test → main, prefer rebase plus fast-forward over a merge commit: rebase the source branch onto the latest mainline, resolve any conflict once, then fast-forward. This keeps history linear and matches what y dev commit already does internally. Do not git merge a branch into the mainline in a way that creates a merge commit.
This is a ship-time history preference, not a rule to rebase onto the mainline during development. Long-lived, intentionally divergent branches maintained via cherry-pick stay as they are.
If you discover post-push that you violated the applicable branch policy, immediately land the change on the correct branch where possible and report the violation in your final message.
⛔ Never implement directly: always dispatch impl
This is the third hard rule. There is no "trivial change" fast path.
The dev coordinator never edits source files itself and never runs the impl's own build/test cycle as development. Every code change, no matter how small (one line, one file, a rename, a flag default), goes through a dispatched impl worker in its own worktree.
Hard rules:
- Never use
Edit/Writeon project source files. If you typed a code edit yourself,
you violated this rule.
- Every code change is dispatched via
y chat --skill implinto a worktree, even a
one-line edit. Do not judge a task "too small to dispatch".
- The coordinator may run only a final focused smoke check after the impl callback (run
the built CLI once to confirm it works). It must not install, iterate, or debug the change as if it were the implementer.
reviewstays optional, butimplis not optional for any code change.
Why no fast path: a size carve-out reintroduces judgment ("is this small enough?") on every task, which is exactly what kept getting it wrong. A flat "always dispatch" rule is simpler and keeps the coordinator's context lean.
Anti-example (a real failure):
Correct:
⛔ Claim / ownership: one coordinator per todo
This is the fourth hard rule. A todo must have exactly one live dev coordinator. Two coordinators on the same todo must never run silently in parallel; the conflict has to be visible.
The lock is three columns on the todo (leader_chat, leader_claimed_at, leader_state). y todo claim / y todo release write them and y todo get reads them back as a Leader: line. A second claim while another chat holds it is refused, and the error names that chat. Do not encode ownership in progress text. y todo release --handoff writes the handoff into progress in the same change; that text is the handoff, not a second lock.
New coordinator chats use topic leader and skill dev (--topic leader --skill dev). --from-topic for this role is leader. The skill stays dev. Old chats keep topic=dev; readers accept both, and the badge shows leader either way.
Step 0 of every dev task, claim before activate:
y todo get <trace_id>and read theLeader:line, then claim:
- `Leader: free`, or `released` →
y todo claimsucceeds (claimed). Proceed. - `claimed by` this chat →
y todo claimreturnsresumed. Continue. Do not treat that
as a conflict.
- `claimed by` a different chat → the command exits non-zero and names the owner. This is
a CONFLICT. Do not activate, plan, impl, create a worktree, or touch anything.
- A
(legacy)suffix means there is no row yet and the server derived the line from an old
claim marker. The first y todo claim seeds the row from that marker, so a legacy claim held by another chat still refuses.
- On conflict: stop and surface it, naming the current owner's chat id, e.g. *"todo 2367
is already claimed by leader chat f3f0fb; not starting. Say 'take over' to seize it."* Then end the turn. Never start a second parallel line of work. Where to surface it: if the dispatcher is top-level (from:manager), report in your own chat; only callback with y chat --chat-id <from_chat> when from_chat is a non-top-level parent.
- Explicit takeover only: seize a todo owned by another coordinator only when the user
or dispatcher explicitly says so ("take over"):
``bash y todo claim <trace_id> --takeover-from <owner_chat> ``
The displaced coordinator, on its next turn, will see it no longer owns the todo and must stop.
- Release at the end, not at every pause: ownership spans the whole coordination,
including the fire-and-forget gaps while plan / impl / review run. Those pauses do not release the lock. Release only when coordination truly terminates: all sub-tasks done and reported ready for verification, or you are abandoning or handing off the todo.
``bash y todo release <trace_id> --handoff "done=<phases> next=<step> wt=<worktree or none> branch=<branch>" ``
Anti-example (the failure that motivated the rule):
Correct:
⛔ Never create follow-up todos yourself
This is the fifth hard rule, and it covers the whole sub-tree: this coordinator and every `plan` / `impl` / `review` worker it dispatches.
The dev sub-tree does not add work to the user's queue. It works on the one todo it was given and reports everything else. Never y todo add for:
- follow-up work a plan or review surfaced as out of scope
- nits, tech debt, refactors, or "while we're here" cleanups spotted during impl
- known-broken adjacent behavior discovered while reading code
- a phase-2 or later-milestone slice of the current task
- verification or deploy steps that were skipped
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingorchestration/skills/dev/SKILL.md
Popularity
- Repository stars
- 220
- Repository forks
- 30
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/luohy15/y-agent/dev)