From smith
Automates end-of-session Git workflow: assesses repo state, commits changes with conventional messages, pushes, handles PRs, updates specs, merges to main, cleans workspace.
npx claudepluginhub attckdigital/smithThis skill uses the workspace's default tool permissions.
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.
Executes autonomous build pipeline: generates tasks, implements code, tests, commits, pushes to branch, creates/merges PRs, and generates release notes without user interaction.
Finishes Git development branches end-to-end: verifies working tree/tests/lint, reviews diffs, picks merge/PR/squash/stacked strategy, writes messages, pushes, cleans up. Use when ready to ship.
Automates post-merge tasks: moves approved specs from docs/changes/ to docs/specs/, updates retrospective with learnings and auto-summarizes it, cleans up feature branches, updates project boards via GitHub CLI.
Share bugs, ideas, or general feedback.
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.
/smith-finishRun 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).
Gather all of the following in parallel:
# What branch are we on?
git rev-parse --abbrev-ref HEAD
# Any uncommitted changes?
git status
# Any unpushed commits? (only if on a branch other than main)
git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline 2>/dev/null
# What files changed vs main?
git diff main --name-only 2>/dev/null
# Any open PRs for this branch?
gh pr list --head $(git rev-parse --abbrev-ref HEAD) --state open --json number,title,url 2>/dev/null
Present a brief status summary to the user:
Session Status:
- Branch: <branch-name>
- Uncommitted changes: <count> files
- Unpushed commits: <count>
- Open PRs: <count>
- Files changed vs main: <count>
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). |
# Show what will be committed
git diff --stat
git diff --cached --stat
git add -A or git add .).env, credentials, secrets, and large binary filesWrite a conventional commit message:
git commit -m "$(cat <<'EOF'
<type>: <concise description>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EOF
)"
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?"
git push -u origin <branch-name>
Before creating/merging the PR, update documentation:
Identify changed files relative to main:
git diff main --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 namesFor 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:
Update STATUS.md if system progress percentages changed.
Commit spec updates on the same branch:
git add <spec files> CHANGELOG.md STATUS.md
git commit -m "docs: update specs and changelog for <feature/fix description>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>"
git push
Skip conditions:
If no open PR exists, create one:
gh pr create --title "<type>: <short title>" --body "$(cat <<'EOF'
## Summary
<bullet points of changes>
## Test plan
<what was tested or needs testing>
Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Merge the PR:
gh pr merge <pr-number> --squash --delete-branch
Return to main:
git checkout main
git pull origin main
Run these checks and report results:
# On main?
git rev-parse --abbrev-ref HEAD
# Clean working tree?
git status --porcelain
# Any stale local branches?
git branch --merged main | grep -v main
# Up to date with remote?
git log origin/main..HEAD --oneline
If Docker services were affected (code changes to any service directory):
docker compose up -d --build <affected-services>
Wait for healthy status, then report.
Output a summary:
Session Complete:
- Committed: <commit hash> — <message>
- PR: #<number> (merged)
- Specs updated: <list of spec files>
- Services rebuilt: <list> (or "none needed")
- Branch: main (clean)
If there were any issues (failed merges, unhealthy services, skipped steps), flag them clearly:
Requires attention:
- <issue description>
If the user has been switching branches and has stashed changes:
git stash list
Alert the user if stashes exist — they may contain work from this session.
If gh pr merge fails due to conflicts:
If the workspace is already clean (on main, no changes, no open PRs):
Workspace is clean. Nothing to commit, push, or merge.