Finish Work
Archive completed tasks and record your coding session progress.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up β so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/trellis-finish-work-fy-agent/β the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description β no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the βWhat this skill doesβ section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Wrap up the current session: verify quality gate passed, remind user to commit, archive completed tasks, and record session progress to the developer journal. Use when done coding and ready to end the session.
What this skill does
Finish Work
Wrap up the current session: archive the active task (and any other completed-but-unarchived tasks the user wants to clean up) and record the session journal. Code commits are NOT done here β those happen in workflow Phase 3.4 before you invoke this command.
Step 1: Survey current state
python ./.trellis/scripts/get_context.py --mode record
This prints:
- My active tasks β review whether any besides the current one are actually done (code merged, AC met) and should be archived this round.
- Git status β quick visual on what's dirty.
- Recent commits β you'll need their hashes in Step 4 for
--commit.
If --mode record surfaces other completed tasks not tied to the current session, surface them to the user with a one-shot confirmation: "These N tasks look done β archive them too in this round? [y/N]". Default is no; the current active task is always archived in Step 3 regardless.
Step 2: Sanity check β classify dirty paths
Run:
git status --porcelain
Filter out paths under .trellis/workspace/ and .trellis/tasks/ β those are managed by add_session.py and task.py archive auto-commits and will appear dirty as part of this skill's own work.
For each remaining dirty path, decide whether it belongs to the current task or to other parallel work (e.g., another terminal window editing the same repo). Heuristics:
- Paths referenced in the current task's
prd.md/implement.jsonl/check.jsonlβ current task - Paths in code areas matching the task's stated scope, or that you remember editing this session β current task
- Paths in unrelated areas you have no recollection of touching this session β other parallel work
Then route:
-
Any remaining path looks like current-task work β bail out with:
"Working tree has uncommitted code changes from this task:
<list>. Return to workflow Phase 3.4 to commit them before running ``finish-work(Trellis command)."Do NOT run
git commithere. Do NOT prompt the user to commit. The user goes back to Phase 3.4 and the AI drives the batched commit there. -
All remaining paths look unrelated (other parallel-window work) β report them once and continue to Step 3:
"FYI, dirty files outside this task's scope β leaving them for the other window:
<list>." -
Genuinely unsure β ask the user once: "Are
<list>this task's work I forgot to commit, or another window's? (commit / ignore)" β then route per their answer.
Step 3: Archive task(s)
python ./.trellis/scripts/task.py archive <task-name>
At minimum: the current active task (if any). Plus any extra tasks the user confirmed in Step 1. Each archive produces a chore(task): archive ... commit via the script's auto-commit.
If there is no active task and the user did not confirm any cleanup archives, skip this step.
Step 4: Record session journal
python ./.trellis/scripts/add_session.py \
--title "Session Title" \
--commit "hash1,hash2" \
--summary "Brief summary"
Use the work-commit hashes produced in Phase 3.4 (visible in Step 1's Recent commits list, or via git log --oneline) for --commit. Do not include the archive commit hashes from Step 3. This produces a chore: record journal commit.
Final git log order: <work commits from 3.4> β chore(task): archive ... (one or more) β chore: record journal.
Related skills
Word Document Editor
anthropics
Create, edit, and format Word documents with tables, images, and tracked changes.
Ask Questions If Underspecified
trailofbits
Ask clarifying questions before starting work on ambiguous requests.
CLAUDE.md Optimizer
daymade
Optimize your CLAUDE.md file for clarity, efficiency, and maintainability.
Claude Skills Troubleshooter
daymade
Diagnose and fix plugin installation, enablement, and activation problems.