name: commit description: Commit files from session and archive/clean-up associated files. metadata: thinkingLevel: low
Assume SKILLS_ROOT is set per AGENTS.md before running helper commands.
Assume the work has already been reviewed and reflected. Quick final scan for debug artifacts, prompt residue, temporary tests/scripts, generated outputs, and stale agent-work/ scratch files before proceeding. Keep only agent-work/ artifacts that remain useful after commit: archived plans/history, requested decks, active plans, review/reproduction evidence, or intentionally sparse ticket artifacts.
Archive Planning Document
If a planning file exists, archive it:
- Run
$SKILLS_ROOT/commit/scripts/archive_plan.sh <plan-file> <short-desc>— moves the plan toagent-work/history/yyyymmdd_{feature-id}_{short_desc}.mdand removes the original. Use 2-4 word snake_case description (e.g.,user_signup). - Compact the archived markdown into a concise durable summary. Keep it faithful to implemented work; do not add new scope.
Update agent-work/features.yaml
If tracked feature: $SKILLS_ROOT/_lib/features_yaml.sh complete <feature-id> --plan-file <archive-path> — sets status to "done", completed_at to today, and plan_file to archive path. Verify discovered items are logged. Include agent-work/features.yaml in the commit.
Documentation
Assume /reflect handled durable documentation updates. Do not make broad documentation changes here. If obvious documentation drift remains and the user skipped /reflect, stop and ask whether to run /reflect before committing.
Commit
- Inspect
git status --short. If unrelated staged paths are present, ask the user whether to unstage them. Thengit addonly session files. git commit -mformat:- First line: sentence describing the high-level objective.
- 2-5 bullets grouping changes by topic (omit if single cohesive change).
- No signatures (by Claude Code, coauthored with..., etc.).
- Do not push unless specifically instructed.
Example: Refactor API endpoints for better error handling. with bullets like - Standardize error response format. / - Add request validation middleware.
Multi-Repo Sessions
If this session touched multiple repositories, ask the user whether to commit in each. If yes, commit independently per repo.
Output
After a successful commit, include a Summary: line with 1-2 sentences on what was committed, then end with WORKFLOW COMPLETE and include the commit hash.