From operator-skills
Wraps up sessions by verifying tests/build/lint with pnpm, committing via /commit, updating .claude/project-diary.md and build-status.md, generating handoff messages.
npx claudepluginhub dazuck/operator-skills --plugin operator-skillsThis skill uses the workspace's default tool permissions.
Use this skill when wrapping up a work session to ensure continuity for the next session/agent.
Writes structured handoff to .claude/handoff.md capturing completed work, pending tasks, and learnings at session end. Auto-activates on wrap-up signals like 'end of session', 'handoff', or 'save progress'.
Generates structured session handoff Markdown documents summarizing accomplishments from git logs, file changes, research, plans, and issues. Captures pause points and key files for continuation. Use /handoff [topic].
Generates next-session.md or phase-handoff.md from cwf-state.yaml, plan.md, lessons.md, and logs to preserve context across agent sessions or phases. Triggers on 'cwf:handoff'.
Share bugs, ideas, or general feedback.
Use this skill when wrapping up a work session to ensure continuity for the next session/agent.
Execute these steps in order:
- Run tests: `pnpm test` (if tests exist)
- Run build: `pnpm build`
- Run lint: `pnpm lint` (if configured)
- Note any failures for handoff
If there are uncommitted changes and verification passed, use the /commit skill:
- Run `/commit` — this handles staging, conventional commit format, AND post-commit reflection
- The commit skill will also surface any learnings from the session
- Note the commit SHA for diary entries
- Do NOT push unless user explicitly requests
This ensures work is preserved and learnings are captured before handoff.
Update .claude/project-diary.md (create if missing). The diary captures what git cannot.
DO add:
Decisions - Add rows to the Decisions Log table:
| Timestamp | Decision | Choice | Rationale | Revisit If | Commit |
| 2024-12-25 14:30 | [title] | [choice] | [why] | [trigger] | abc1234 |
Learnings - Add entries for insights worth preserving:
### 2024-12-25 14:30 - [Title]
[What happened and the insight. 1-3 sentences.]
Optional: Suggested action, relevant commits, links.
---
Open Questions - Update the checklist with new/resolved items
DO NOT add:
Include timestamps (date + HH:MM) on all entries for correlation with git history.
Update .claude/build-status.md (if exists):
Create a message using prompting best practices that the user can copy to start a new conversation. The handoff message should treat the receiving agent as a capable leader, not just a task executor.
Prompting Best Practices to Apply:
Handoff Message Template (streamlined):
You are [ROLE] for [PROJECT] at [PATH].
CONTEXT:
- Current state: [phase, what's working, what's not]
- Recent work: [1-2 sentence summary]
- Key files: [list 2-3 files to read first]
NEXT ACTIONS:
1. [First thing to do]
2. [Second thing]
3. [Third thing]
WATCH OUT FOR:
- [Gotcha or risk from pre-mortem]
Start by reading [specific file].
Key Principles:
If you used /commit in Step 1.5, learnings were already captured during that skill's reflection phase. Review what was produced:
AGENT-LEARNINGS.md at the repo rootIf you did NOT use /commit (e.g., no code changes this session), briefly self-reflect:
If yes, append to AGENT-LEARNINGS.md using the format defined there. If no learnings, skip this step.
Ask yourself:
Report findings and suggest mitigations.
Consider if any of these should be updated:
CLAUDE.md~/.claude/CLAUDE.md~/.claude/guides/Propose specific changes if warranted.
If the session involved:
Suggest running /writeup before closing:
"This session had some learnings that might be worth documenting for your audience. Want to run
/writeupbefore closing?"
The /writeup skill will assess the work and recommend an appropriate format (tweet, thread, week notes, or full blog post).
Output should be terminal-friendly (minimal markdown, plain text where possible).
Present in this order:
Work done:
Handoff housekeeping:
/writeupKeep this section short. Skip entirely if nothing notable.
Put the handoff message in a code block at the very end. User should be able to scroll up slightly and copy it cleanly.