Help us improve
Share bugs, ideas, or general feedback.
From drupal-lab
Close out a Drupal issue worktree with a deliberate decision -- submit as MR, submit as patch, park as WIP, or discard. Use when done with an issue -- e.g. "finish the issue", "close out the worktree", "submit the patch", "done with this issue", "discard the worktree". Checks state, presents options, handles DDEV shutdown and cleanup. Do NOT use mid-implementation -- this is the final step after work is complete or abandoned.
npx claudepluginhub cosmicdreams/claude-plugins --plugin drupal-labHow this skill is triggered — by the user, by Claude, or both
Slash command
/drupal-lab:finish-issueThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Closes out a Drupal issue worktree with a deliberate decision. No worktree drifts open
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Share bugs, ideas, or general feedback.
Closes out a Drupal issue worktree with a deliberate decision. No worktree drifts open indefinitely — every session ends with an explicit choice.
Run from the project root (the directory containing worktrees/).
ISSUE=<issue-number>
# Verify worktree exists
ls worktrees/$ISSUE/ 2>/dev/null || echo "Worktree not found"
# Check for uncommitted changes
git -C worktrees/$ISSUE status --short
# Check commits ahead of main
git -C worktrees/$ISSUE log main..HEAD --oneline
# Check DDEV status
ddev describe 2>/dev/null | grep -E "status|name" | head -5
Report:
Present these four options and wait for the user's choice:
How do you want to finish this issue?
A) Submit as MR — push branch to drupal.org GitLab and create a merge request
B) Submit as patch — generate a .patch file for manual upload to the issue
C) Keep as WIP — park the worktree for a future session; optionally stop DDEV
D) Discard — work is not going forward; remove the worktree entirely
If review has passed, suggest A or B. If review failed or work is early, surface C or D.
git -C worktrees/$ISSUE status --short
If uncommitted changes exist: stop. Ask the user to commit or stash before proceeding.
Invoke drupal-lab:issue-summary to produce the drupal.org-ready comment before pushing.
The comment documents the problem, approach, changed files, and test instructions.
The git guard prevents agents from pushing. Provide this command for the user to run in a separate terminal:
cd worktrees/<issue-number>
git push origin issue-<issue-number>
After pushing, the MR URL follows this pattern:
https://git.drupalcode.org/project/drupal/-/merge_requests/new?merge_request[source_branch]=issue-<issue-number>
For contributed modules, the remote URL will differ — check with:
git -C worktrees/$ISSUE remote get-url origin
cd worktrees/$ISSUE && ddev stop
issue-<issue-number>git -C worktrees/$ISSUE status --short
Uncommitted changes will be included in the patch. Flag any unintentional files.
git -C worktrees/$ISSUE diff main > /tmp/issue-$ISSUE.patch
wc -l /tmp/issue-$ISSUE.patch
Move to project root for easy access:
mv /tmp/issue-$ISSUE.patch ./issue-$ISSUE.patch
Invoke drupal-lab:issue-summary to produce the drupal.org-ready comment.
cd worktrees/$ISSUE && ddev stop
./issue-$ISSUE.patch (line count, ready to attach to issue)Work continues in a future session. The worktree stays active.
Note in the kanban card or analysis report:
Ask: "Do you want to stop DDEV to free resources? You'll restart it next session."
If yes:
cd worktrees/$ISSUE && ddev stop
worktrees/$ISSUE/drupal-lab:process-lifecycle INIT to resumeWork is not going forward. Confirm before removing anything.
State explicitly what will be deleted:
About to discard worktrees/<issue-number>/.
This removes all uncommitted changes and the isolated branch.
Committed changes on issue-<issue-number> are preserved in git history.
Type 'discard' to confirm.
Wait for the user to confirm before proceeding.
cd worktrees/$ISSUE && ddev stop && ddev delete --omit-snapshot -y 2>/dev/null || true
# From project root
git worktree remove worktrees/$ISSUE --force
# From worktrees/main
git -C worktrees/main branch -d issue-$ISSUE 2>/dev/null || \
git -C worktrees/main branch -D issue-$ISSUE
Ask before deleting the branch — the user may want to keep it for reference.
worktrees/$ISSUE/All relative paths assume execution from the project root — the directory containing
worktrees/. If you are inside a worktree, cd ../.. first.
The git guard blocks git push from agents. Paths A and B provide the push/upload command
for the user to run manually in a separate terminal.