task-finishlisted
Install: claude install-skill loncadev/baron
# Finish a task (open the PR)
Idempotent finish: push the branch, check for an existing PR first, and only then run the
**task-finish** recipe as ONE deterministic call. Local git is YOUR job; provider truth is Baron's.
## Steps
1. **Identify the work item + branch**: parse the current branch (`git rev-parse --abbrev-ref HEAD`)
as `<prefix>/<id>-<slug>` and extract `<id>`. If the branch doesn't match, ask — never open a PR
from a non-work-item branch without confirming.
2. **Preflight local git**: `git status --porcelain` — dirty tree → stop (commit/stash first). Then
**push**: `git push -u origin HEAD` (never `--force`; on a non-fast-forward reject, explain the
rebase path and stop).
3. **Idempotency check** — call `baron_scm_read op=pr_for_branch` with the branch:
- **PR exists** (non-null): do NOT create another. Report its URL, and add a
`baron_scm_write op=pr_thread` note only if there is genuinely new context (new commits since).
- **null**: continue.
4. **Compose the PR description — never open an empty PR.** A reviewer should not have to
reconstruct the change from the diff. Write it from what you actually have: the work item
(`baron_issue_read op=get`) plus the real commits/diff on the branch (`git log <base>..HEAD --oneline`,
`git diff --stat`). Cover, briefly:
- **What changed** — the substance, not a file list.
- **Why** — the problem from the item; call out any decision you made along the way.
- **How it was verified**