feat: add finish-up skill to repo for version control

Stores the /finish-up Claude Code command in the repo.
The active copy lives at ~/.claude/commands/finish-up.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 12:44:09 -05:00
parent 35d797f8d8
commit cd4588be6b

View File

@@ -0,0 +1,92 @@
---
description: Scan projects for uncommitted/unpushed changes, then commit and push
---
You are running the **finish-up** workflow. Your job is to scan git projects for uncommitted changes and unpushed commits, present a report, then autonomously commit and push selected projects using parallel subagents.
## Phase 1: Scan
Run the scan script to check all projects:
```bash
bash "C:/Users/aisaacs/Desktop/Projects/project-scripts/git-status-check.sh" "C:/Users/aisaacs/Desktop/Projects"
```
This outputs TAB-separated lines: `project_name \t uncommitted_count \t unpushed_count \t branch`
If the current working directory is inside a specific git project (not the Projects root), scan only that project instead:
```bash
bash "C:/Users/aisaacs/Desktop/Projects/project-scripts/git-status-check.sh" "$(git rev-parse --show-toplevel)/.."
```
But filter the output to only show the current project.
## Phase 2: Report
Parse the scan output and present a summary table. Group projects by status:
**Projects with uncommitted changes** (show project name, file count, branch):
| Project | Uncommitted | Unpushed | Branch |
|---------|-------------|----------|--------|
**Projects with only unpushed commits** (committed but not pushed):
| Project | Unpushed | Branch |
|---------|----------|--------|
**Clean projects** (just list names, keep it brief).
If everything is clean, say "All projects are clean!" and stop.
## Phase 3: Confirm
Use AskUserQuestion to ask which projects to process. Options:
- "All projects that need attention" (default/recommended)
- "Let me pick specific projects"
- "Just show the report, don't commit/push"
If the user wants to pick specific projects, ask which ones with a multiSelect question listing only the projects that need attention.
## Phase 4: Parallel Commit/Push via Subagents
For each selected project, dispatch a **Bash subagent** using the Task tool (`subagent_type: "Bash"`). Launch all subagents in parallel in a single message with multiple Task tool calls.
Each subagent prompt should be:
```
You are committing and pushing changes for the project: [PROJECT_NAME]
Working directory: C:/Users/aisaacs/Desktop/Projects/[PROJECT_NAME]
Steps:
1. Run: git status
2. Run: git diff --stat
3. Run: git diff (to understand the changes)
4. Stage all changes: git add -A
5. Review what's staged: git diff --cached --stat
6. Based on the diff, write a conventional commit message (feat/fix/chore/refactor/docs/etc)
- Short summary line that explains WHY, not just WHAT
- End with: Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use a HEREDOC to pass the message
- NEVER commit files containing secrets (.env, credentials, API keys)
- If you find secrets, skip the commit and report the issue
7. Commit the changes
8. Push to remote: git push
- If the push fails on first try, wait 5 seconds and retry (Gitea cold-start)
- If it fails again, report the error
9. If there are unpushed commits (but no uncommitted changes), just push
10. Report what you did: what was committed (summary), push result
```
**IMPORTANT:** Launch ALL subagents in a SINGLE message to maximize parallelism. Do not wait for one to finish before starting the next.
## Phase 5: Summary
After all subagents complete, collect their results and present a final summary:
| Project | Action | Result |
|---------|--------|--------|
| ProjectA | Committed + Pushed | Success |
| ProjectB | Pushed (already committed) | Success |
| ProjectC | Committed + Pushed | Push failed: [error] |
If any pushes failed, suggest retrying those specific projects.