attckdigital/smith/smith-finish
Claude Code and agent skill by attckdigital/smith
- community
Checking that the SKILL.md file is still in the repository.
End-of-session workflow that commits, pushes, merges to main, updates specs, and cleans up the workspace.
Install
npx vskill@latest install attckdigital/smith/smith-finishSKILL.md
Smith — Session Finish
Skill Purpose
End-of-session workflow that ensures all work is committed, pushed, merged to main, specs are updated, and the workspace is clean. Prevents losing work when closing a development session.
When to Use
- User is done working and wants to wrap up
- User wants to ensure nothing is lost before ending a session
- Triggered by
/smith-finish
How to Execute
Run all steps autonomously. Only stop to ask the user if a decision is genuinely ambiguous (e.g., unrelated uncommitted changes that may need separate branches).
Step 1: Inventory — Assess Current State
Gather all of the following in parallel:
Present a brief status summary to the user:
Decision tree based on state:
| State | Action | |
|---|---|---|
On main, no changes | Nothing to do. Report "workspace is clean" and exit. | |
On main, uncommitted changes | Create a feature branch (fix/<slug> or feat/<slug> based on changes), then continue to Step 2. Ask the user for a brief description to name the branch. | |
| On feature branch, uncommitted changes | Continue to Step 2. | |
| On feature branch, all committed + pushed + PR merged | Skip to Step 6 (verify clean state). | |
| On feature branch, all committed + pushed + PR open | Skip to Step 4 (spec updates, then merge). | |
| On feature branch, all committed + not pushed | Skip to Step 3 (push). |
Step 1.5: Activate Workflow Tracking
Before any file is written (spec updates in Step 4, CHANGELOG/STATUS updates), create an active-workflow marker so the workflow-gate hook (PreToolUse) allows subsequent writes. smith-finish is often invoked standalone outside another workflow, so it must create its own marker.
Skip this step if the State table mapped to "Nothing to do" or "Skip to Step 6 (verify clean state)" — no edits will happen.
The marker is cleared in Step 6.5 below, regardless of whether the run reached merge or stopped at any earlier step.
Step 2: Commit
- Stage changed files explicitly by name (never
git add -Aorgit add .) - Exclude
.env, credentials, secrets, and large binary files - If there are untracked files, check if they should be included (new source files: yes, temp files: no)
Write a conventional commit message:
If there are changes across unrelated areas that clearly belong to different features, ask the user:
"I see changes to both [area A] and [area B]. Should I bundle these into one commit, or split them?"
Step 3: Push
Step 4: Spec Updates
Before creating/merging the PR, update documentation:
- Identify changed files relative to the configured base branch:
``bash BASE_BRANCH=$(.specify/scripts/bash/get-base-branch.sh) git diff "$BASE_BRANCH" --name-only ``
- Map files to system specs using these rules:
services/command-center/->specs/system-15-command-center/spec.mdservices/email-pipeline/->specs/system-03-email-archive-contact-graph/spec.mdservices/sentiment-engine/->specs/sentiment-engine/spec.mdservices/communication-triage/->specs/system-05-communication-triage/spec.mdservices/content-strategy/->specs/system-12-content-social-engine/spec.mdservices/meeting-intelligence/->specs/system-09-meeting-intelligence/spec.mdservices/trend-intelligence/->specs/system-13-trend-intelligence/spec.mdservices/social-listening/->specs/system-10-social-listening/spec.mddocker-compose.yml->specs/system-01-core-infrastructure/spec.mddb/-> relevant system spec based on table names
- For each affected spec.md: Read it, then append a dated implementation history entry describing what changed and why. Keep it concise and factual.
- Update CHANGELOG.md with a dated entry including:
- The original prompt/intent
- Files created and modified
- Before/after details sufficient to revert
- Update STATUS.md if system progress percentages changed.
- Commit spec updates on the same branch:
``bash git add <spec files> CHANGELOG.md STATUS.md git commit -m "docs: update specs and changelog for <feature/fix description>" git push ``
Skip conditions:
- If only spec/doc files changed (no code), skip spec updates
- If changes are trivial (typo fixes, comment changes), skip spec updates
Step 5: PR & Merge
If no open PR exists, create one:
Merge the PR:
Return to the base branch:
Step 6: Verify Clean State
Run these checks and report results:
If Docker services were affected (code changes to any service directory):
Wait for healthy status, then report.
Step 6.5: Clear Workflow Tracking
If Step 1.5 created an active-workflow marker, remove it now via the shipped helper. Safe to run unconditionally — the helper is a no-op when the marker doesn't exist:
After this, the workflow-gate hook returns to denying ad-hoc edits — smith-finish no longer holds an active workflow.
Step 7: Final Report
Output a summary:
If there were any issues (failed merges, unhealthy services, skipped steps), flag them clearly:
Edge Cases
Multiple feature branches with uncommitted work
If the user has been switching branches and has stashed changes:
Alert the user if stashes exist — they may contain work from this session.
Merge conflicts
If gh pr merge fails due to conflicts:
- Report the conflict to the user
- Do NOT force merge or auto-resolve
- Suggest: "There are merge conflicts. Want me to resolve them, or would you prefer to handle it?"
Nothing to do
If the workspace is already clean (on main, no changes, no open PRs):
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/smith-finish/SKILL.md
Popularity
- Repository stars
- 41
- Repository forks
- 6
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/attckdigital/smith/smith-finish)