/development-workflow:development-handofffrom development-workflow
Manage development handoff between Codex agents: mandatory post-merge finalization with safe local merged-branch cleanup, same-PR fixes, monster review gates, decision-lock/product-drift checks, prod-ready checks, deploy checks, dirty worktree safety, recovery-aware handoff, and continuation from evidence. Use immediately, before an acknowledgment-only response, when the user unambiguously reports a completed merge with merged/смерджил/PR смержен or a contextually merge-specific залил; also use for post-merge/после мерджа/финализацию после мерджа/cleanup branches/почисти ветки, fix in PR/чини в PR, monster review/монстр ревью, prod ready/продак реди, update branches/обнови ветки, deploy/деплой, handoff/передай смену, decision drift/уехал от решения/свернул от решения, or when continuing an interrupted development task.
Ships in development-workflow. 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.
Read when SKILL.md points to them; scripts run unread.
Use this skill to keep a development task coherent across agents, PR reviews, merge, deploy and interruptions. A handoff is not a memory dump; it is the next agent's operating state.
Golden rule: inspect repository and PR evidence before acting from memory.
When the current task is in recovery after user criticism, carry forward the failed assumption, the active source of truth, and the exact next proof step. Do not hand off only a story about what happened.
When inside a git repository, run the bundled read-only helper first:
Resolve bundled script paths relative to this SKILL.md.
python scripts/handoff_snapshot.py --repo <repo-path>
Default helper output redacts absolute local paths and remote URLs. Use --show-paths only for local diagnostics and do not paste that output into chat, docs or PR comments.
If a PR number or URL is known:
python scripts/handoff_snapshot.py --repo <repo-path> --pr 123
If the helper is unavailable, gather the same facts manually:
git status --short --branch
git branch -vv
git log --oneline --decorate -5
gh pr view --json url,state,mergedAt,headRefName,baseRefName,statusCheckRollup,reviewDecision
Read references/handoff-contract.md when you need the full template, exact command recipes, prod-ready checklist, or skill/plugin installability checks.
Before composing the first response to a user message, classify an unambiguous merge-completion phrase (смерджил, merged, PR смержен, or залил only when the context clearly means merge) as an execution trigger. This guard has priority over treating the message as a status update and over the generic clarification-first rule when repository/PR identity is discoverable.
On a positive trigger:
ready after a verified result, or evidence-backed partial, blocked, or unknown.Do not trigger on a negation, hypothetical, or question such as ещё не смерджил, если смерджим, or как смержить?. A stop command still takes precedence. Read references/evaluation-scenarios.md when validating or changing this trigger.
Treat short user phrases as process triggers after applying the Hard Trigger Guard:
смерджил, merged, PR смержен, contextually merge-specific залил, после мерджа, финализация после мерджа -> run the complete post-merge protocol in the same turn, including safe local branch cleanup; never acknowledge and stop.чини в PR, чини там же, не вижу правки в PR -> reuse the existing PR branch.монстр ревью, monster review, сделай ревью -> run findings-first review and track fixes.продак реди?, prod ready? -> answer only after the prod-ready evidence gate.обнови ветки, origin? -> fetch/prune and compare local vs remote without losing dirty work.деплой -> follow deploy checks; do not drift into unrelated work.стоп, не туда, не меняй -> stop immediately.не то, wrong, off-spec, nothing changed, not from the design -> stop the old path, rebuild the evidence snapshot, and switch to feedback-recovery before more edits.Do not ask for clarification when the safe next protocol is obvious.
When the user says the PR was merged, treat that message as the trigger for this whole protocol. Do not acknowledge the merge and stop before finalization.
gh pr view <id> --json state,mergedAt,mergeCommit,url,headRefName,headRefOid,baseRefName. Continue only when state is MERGED and mergedAt is present.git fetch --all --prune.git pull --ff-only only when safe.git status --short --branch and latest commits.scripts/post_merge_cleanup.py relative to this SKILL.md. Run it without --apply using the verified baseRefName, headRefName, and headRefOid; inspect every proposed deletion and preservation, then retain the returned plan_sha256.--apply --expected-plan-sha256 <plan_sha256>. Stop and inspect a new preview if the plan changed. The user's current explicit merge statement authorizes this exact local cleanup only after steps 1–6 succeed. Do not infer authorization from stale chat, CI, or an observed merge alone.partial or unknown, stop, read back the named refs/config, report the exact state, and never retry deletion blindly.The cleanup helper removes only:
headRefOid; this also handles squash/rebase merges without deleting later local commits;It must preserve main, the base branch, blocking dirty worktrees, unmerged or advanced branches, branches checked out in another worktree, and all remote/remote-tracking branches. The helper may ignore only its explicit allowlist of untracked generated artifact directories; those ignored entries are included in the preview hash and any change before apply requires a fresh preview. Apply must match the exact preview hash and delete refs in one compare-and-swap transaction so plan drift or one stale branch cannot cause partial cleanup. Never replace a blocked helper result with broad git branch -D, git push --delete, a wildcard, or a cross-shell deletion command.
python <skill-dir>/scripts/post_merge_cleanup.py --repo <repo-path> --base <baseRefName> --merged-head <headRefName> --merged-head-oid <headRefOid>
python <skill-dir>/scripts/post_merge_cleanup.py --repo <repo-path> --base <baseRefName> --merged-head <headRefName> --merged-head-oid <headRefOid> --apply --expected-plan-sha256 <plan_sha256>
Queued or unavailable checks are not green.
When the user asks to fix a PR:
If the PR is already merged or closed, explain that state and only then decide whether a follow-up PR is needed.
For monster review or serious review:
Do not call a PR ready while a real P1/P2 remains open.
Before plan -> code, review -> fix, merge-ready, deploy-ready, or any recovery after user criticism, lock the accepted decisions from evidence. Use source docs, the active plan, PR body, PR comments, explicit user messages, compatibility tests, and named contracts.
Build a tiny internal map:
decision | source | must preserve | what would break it | approval status
Treat these as locked unless the user explicitly changes them:
If implementation would change a locked decision, stop before editing and ask for an explicit decision change:
DECISION CHANGE REQUEST
Current locked decision:
Proposed change:
Why it seems needed:
What breaks:
Options:
Recommended option:
Do not rewrite docs or tests to make an unapproved behavior look accepted. Do not call an unapproved change a "contract decision". If the user says the agent drifted from an accepted decision, switch to feedback-recovery, find the winning source of truth, and make the smallest correction that restores it.
Before answering "ready":
If any mandatory criterion is failed, blocked, unknown, incomplete, or unverified, answer not ready yet and name the missing evidence. ready with this explicit risk is allowed only for optional residual risks after every mandatory criterion has current passing evidence.
When there are local changes:
Broad dirty trees after a failed frontend or design transfer are a recovery smell. Do not hide that state; call it out and reduce scope before more implementation.
Explicit user decisions steer the workflow until changed:
Architectural cleanup, security hardening, or "better design" does not override a locked product decision. If preserving the decision is unsafe, pause and explain the concrete risk instead of silently changing the product behavior.
If a user constraint conflicts with security, money, production data, destructive git operations, or deploy safety, pause and explain the risk.
When changing reusable skills or plugins:
If the skill change came from a failure, encode the reusable guardrail, not the private drama of the thread.
End meaningful work with this compact block:
HANDOFF
Workspace: <repo name or redacted local path>
Branch:
PR:
State:
Last evidence:
Failed assumption:
Winning source of truth:
User constraints:
Decision lock:
Open blockers:
Next required action:
Do not:
Keep chat output short; put long audit trails in PR comments or PR body.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub artypoul/gigma_skills --plugin development-workflow17 skills in this plugin
/agent-session-executionUse for a multi-step task that needs explicit progress, safe action boundaries, waiting on real external work, or a clear completed/blocked state. Classify the action, track one active step, communicate material progress, and finish only with verified completion or a concrete blocker./capability-aware-executionUse when a request may need a specialist skill, real tool, connector, file, image, visualization, external integration, or durable artifact. Inspect what is actually available, route to the narrowest matching skill or tool, and report a gap honestly instead of inventing a capability or simulated result./