Agent skill
finish
Finish a Linear issue — check off requirements, add completion comment, commit/push, mark Ready For Release, suggest next issue. Use when the user says 'finish issue', 'done with this issue', 'complete PL-XX', or invokes /finish.
Install this agent skill to your Project
npx add-skill https://github.com/alienfast/claude/tree/main/skills/finish
SKILL.md
Finish Issue
Automates the post-completion workflow for a Linear issue using the linear CLI.
Arguments
- Issue identifier (e.g.,
PL-12) — optional, auto-detected from branch/commit no push/don't push/skip push— optional, skips the git push step (commit still happens)
Examples: /finish, /finish PL-12, /finish no push, /finish PL-12 no push
Invariant
pnpm check must pass before committing or pushing code. Check failures are always CRITICAL — never "pre-existing", never "out of scope", never deferred. Fix them before proceeding. Turborepo caching makes repeated runs cheap.
Workflow
Step 1: Identify the Issue
Determine the issue identifier from (in priority order):
- User input — e.g.,
/finish PL-12 - Git branch name — extract from branch (e.g.,
pl-12-scaffold-nextjs-16-app-in-monorepo→PL-12) - Latest commit message — extract issue key from the most recent commit (only reliable if there are no unstaged changes; if the working tree is dirty, the latest commit may not relate to the current work)
# Get current branch name
git branch --show-current
# Get latest commit message
git log --oneline -1
If the identifier can't be determined from any of the above, ask the user.
Step 2: Get Issue Details
linear issues get PL-12 --format full
Read the description carefully. Note:
- Requirement checkboxes (
- [ ]items) - Success criteria checkboxes
- Any "Nice to Have" vs "Must Have" distinctions
Step 3: Check Off Completed Checkboxes
Get the issue description and update checkboxes based on what was actually completed during this session.
# Get current description as JSON
linear issues get PL-12 --output json
For each - [ ] checkbox in the description:
- If completed: replace with
- [x] - If not completed: leave as
- [ ]and note it in the completion comment
Update the description:
- Use the
Writetool to save the full updated description totmp/linear-description-<issue-id>.md(e.g.,tmp/linear-description-pl-12.md) - Run:
~/.claude/scripts/linear-stdin.sh tmp/linear-description-pl-12.md issues update PL-12 --description -
Important: Preserve the entire description — only change - [ ] to - [x] for completed items. Do not rewrite or reformat the description.
Step 4: Generate Completion Comment
Write a markdown comment summarizing the work. Structure:
## Implementation Complete
Branch: `<branch>` | Commit: `<short-sha>`
### What was done
- Bullet points of key changes (files created/modified, features implemented)
### Design decisions
- Key technical choices and why they were made
### Verification
- What was verified (type checks, tests, dev server, etc.)
### Notes
- Any unchecked items with explanation of why
- Any follow-up work identified
Omit sections that have no content (e.g., skip "Notes" if everything was completed).
Step 5: Add Comment to Issue
- Use the
Writetool to save the comment totmp/linear-comment-<issue-id>.md(e.g.,tmp/linear-comment-pl-12.md) - Run:
~/.claude/scripts/linear-stdin.sh tmp/linear-comment-pl-12.md issues comment PL-12 --body -
Step 6: Verify Check Passes
Run pnpm check as a hard gate before committing:
pnpm check
If it fails: this is CRITICAL. Do not commit or push. Fix the failures first, then re-run until it passes.
If it passes: proceed to commit.
Step 7: Git Commit & Push
Check the current git state and act accordingly:
git status
git log --oneline -1
- Uncommitted changes: Stage relevant files, commit with a descriptive message
- Committed but not pushed: Push to remote (unless
no pushwas requested) - Already pushed: Skip — confirm to user that code is already on remote
If the user requested no push (e.g., /finish no push, /finish don't push), skip pushing after commit. Inform the user: "Skipping push as requested. Push manually when ready: git push"
Otherwise, always push to the current branch. Do not create PRs (that's a separate workflow).
Step 8: Mark Issue as Ready For Release
linear issues update PL-12 --state "Ready For Release"
Step 9: Suggest Next Issue
Use the /next skill to suggest the best next issue, passing the just-completed issue ID as context. The /next skill will check the current cycle, dependency graph, and newly unblocked work to find the highest-signal candidate.
Error Handling
- If the issue is already Ready For Release or Done, warn the user and ask if they want to proceed (add comment only)
- If there are no uncommitted changes and code is already pushed, skip the git steps
- If
linearCLI is not authenticated, prompt:linear auth login - If the issue identifier can't be found, ask the user explicitly
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
triage
Triage and prioritize Linear backlog. Analyzes issues for staleness, blockers, and suggests priorities based on dependencies and capacity.
link-deps
Discover and link related issues as dependencies. Searches for issues that should be connected and recommends dependency relationships to establish proper work order.
Deprecation Handler
Handles deprecated APIs, types, and modules by applying safe migration patterns. Use when encountering deprecation warnings, migrating from deprecated code, updating dependencies with breaking changes, or modernizing legacy code to use current APIs.
cycle-plan
Plan Linear cycles using velocity analytics. Suggests scope based on historical capacity, identifies dependency risks, balances workload.
Dependency Updater
Orchestrates comprehensive dependency updates by delegating research, impact analysis, code changes, and validation to specialized agents. Invoked when users request package updates, dependency updates, version bumps, or mention 'ncu' or npm-check-updates.
linear
Linear issue tracking - MUST READ before using Linear commands
Didn't find tool you were looking for?