Wrap Session banner
secondsky secondsky

Wrap Session

Git community intermediate

Description

Automate end-of-session workflow: update SESSION.md, create git checkpoint, and prepare for context clear. ---

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

Repository README

This is the README for secondsky/claude-skills, shared by 6 entries in this directory. It describes the repository, not this entry specifically.

Wrap Session

Automate end-of-session workflow: update SESSION.md, create git checkpoint, and prepare for context clear.


Your Task

Follow these steps to wrap up the current session and prepare for a clean handoff.

1. Analyze Current State (Use Task Agent)

Use the Task tool with description "Analyze session state for wrap-up" to gather:

  • Read SESSION.md completely
  • Run git status to see uncommitted changes
  • Run git log -1 --oneline to see last commit
  • Run git diff --stat to see what changed
  • Extract current phase number, name, and status
  • Extract current stage (Implementation/Verification/Debugging)
  • Extract "Next Action"
  • Extract "Known Issues"

If SESSION.md doesn't exist:

  • Stop and output: "❌ No SESSION.md found. Run project-planning skill first to set up session management."
  • Do not proceed further

2. Update SESSION.md

**Update the following sections:**

**a) Current Stage**

  • If tasks completed and ready for verification: Change to "Verification"
  • If verification done and ready for next phase: Keep as current
  • If debugging: Keep as "Debugging"

**b) Progress Section**

  • Mark any completed tasks with [x]
  • Add new tasks discovered during session
  • Reorder if priorities changed

**c) Known Issues**

  • Add any new issues discovered this session
  • Remove resolved issues
  • Update issue descriptions if changed

**d) Next Action**

  • Update to be concrete and specific:
    • Must include: file path + line number (if applicable) + specific action
    • Example: "Implement PATCH /api/tasks/:id in src/routes/tasks.ts:47, handle validation and ownership check"
    • NOT vague like: "Continue working on API..."

**e) Last Checkpoint**

  • Update date to today (YYYY-MM-DD format)
  • Checkpoint hash will be updated after git commit (step 4)

**f) If Phase Complete**

  • Change phase status from 🔄 to ✅
  • Add "Completed" date
  • Add "Summary" with 2-3 line accomplishment description
  • Collapse phase section to 2-3 lines
  • Move to next phase:
    • Change next phase from ⏸️ to 🔄
    • Expand next phase with initial task list
    • Set new "Next Action"

3. Check for Doc Updates

**Analyze what changed** this session using git diff output.

**Ask user about updating these docs** (only if relevant changes detected):

**If phase completed:**

  • "Phase [N] complete! Should I add entry to CHANGELOG.md? (y/n)"

**If architecture changed** (new patterns, major refactoring):

  • "Architecture changes detected. Update ARCHITECTURE.md? (y/n)"

**If API endpoints added/modified:**

  • "API changes detected. Update API_ENDPOINTS.md? (y/n)"

**If database schema changed:**

  • "Schema changes detected. Update DATABASE_SCHEMA.md? (y/n)"

**If README needs updates** (new features, changed usage):

  • "User-facing changes detected. Update README.md? (y/n)"

**For each "yes":**

  • Read the relevant doc
  • Update with session changes
  • Confirm update was made

**Note:** Don't ask about docs that don't exist or aren't relevant to changes.

4. Create Git C