finish

finish is a skill for Claude Code, Codex from keefar/ticket-flow. It costs 68 tokens per session (7,490 once invoked), scanned C, original, MIT.

A Ticket-Flow completion step that checks an implemented ticket, optionally deploys it, merges it into the main branch, updates its status, and cleans up its worktree. A worktree is a separate Git working directory for a branch.

In plain words
What is it for?
Use it after implementation to run tests and review acceptance criteria, deploy when needed, merge behind the workflow’s safety check, and mark the ticket Testing or Done.
Why use it?
It turns completed code into a verified and integrated ticket while recording what was proven and what remains unresolved.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the ticket-flow plugin — 13 skills, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/keefar/ticket-flow/finish
Any agent
npx skills add keefar/ticket-flow --skill finish
Clone the repo
git clone --depth 1 https://github.com/keefar/ticket-flow

Made for: Claude Code, Codex.

Or install ticket-flow, the plugin that ships this one along with the rest of its 13 skills, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for finish

README.md
[![agentmods](https://agentmods.dev/badge/skills/keefar/ticket-flow/finish.svg)](https://agentmods.dev/skills/keefar/ticket-flow/finish)
Your own site
<a href="https://agentmods.dev/skills/keefar/ticket-flow/finish"><img src="https://agentmods.dev/badge/skills/keefar/ticket-flow/finish.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,490 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.07490
Opus 5 $0.00034 $0.03745
Sonnet 5 $0.00014 $0.01498
Haiku 4.5 $0.00007 $0.00749

Measured 4d ago against content hash d1b35c10cdd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

finish scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Path still listed** → real error. **Stop and hand it to the user — never delete the directory yourself.** Forcing the removal (`shutil.rmtree`, `rm -rf`) is precisely the fallback Claude Code removed in 2.1.143, to p
skills/finish/SKILL.md · 326 lines

How it starts

The opening of the file, as written. The whole thing — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/ticket-flow:finish — Phase 3 of Ticket-Flow

Args: none — operates in the current worktree, derives the item via the branch: marker in the bd notes field.

Prerequisites

  • /ticket-flow:implement is complete (all ACs met, commits made)
  • Current directory = worktree
  • Typecheck/tests green

Steps

1. Identify the item

Read the current branch (git branch --show-current), then find the bd issue whose notes field carries branch: <branch>. Do not read KANBAN.md.

source "${CLAUDE_PLUGIN_ROOT}/skills/kanban/bd-helper.sh"
BRANCH="$(git branch --show-current)"
BD_ID="$(bd list --json 2>/dev/null | jq -r --arg b "$BRANCH" \
  '.[] | select((.notes // "") | test("(^|\\n)branch: " + $b + "$")) | .id' | head -1)"
ID="$(bd_kanban_for "$BD_ID")"

Extract ID, title, tag, spec/plan links from the resolved issue. Also read a worktree: external <path> line in the bd notes — it means the worktree was adopted via /ticket-flow:pickup --here (orca, Conductor, worktrunk, bead-workflow-skills): set ADOPTED=1, WORKTREE=<path>; 5a and Step 7 branch on it.

Commit-cwd caveat (full form in /ticket-flow:implement Step 1) — the rule differs by session type:

  • Worktree-isolated session (a dispatched isolation: "worktree" agent, or this session after EnterWorktree): git against the main repo is refused outright, cd <main-repo> && git … and git -C <main-repo> alike ("Refusing to run it"). So the main-repo half of Steps 5–6 does not happen here: either after ExitWorktree from the main-repo session (5a), or — in --parallel/--serial — in the controller, which is the only writer of ticket state.
  • Non-isolated session in an adopted worktree (ADOPTED=1, from /ticket-flow:pickup --here): main-repo git works as a single statement cd <main-repo> && git … with dangerouslyDisableSandbox: true; git -C alone hits .git/index.lock: Operation not permitted.

In both cases, commits to the worktree branch run from the worktree root, not a subdirectory.

Read the full file on GitHub · 326 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 326 lines · 68 tokens per session scan C d1b35c10cdd7

Subscribe to this mod's changes

finish is a skill published in the GitHub repository keefar/ticket-flow (4 stars, last pushed 8d ago), licensed MIT. It adds 68 tokens to every session and 7,490 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.