Skip to content

feat: add /bye skill — session-end safety check#636

Open
sensdiego wants to merge 1 commit intogarrytan:mainfrom
sensdiego:feat/bye-session-end-skill
Open

feat: add /bye skill — session-end safety check#636
sensdiego wants to merge 1 commit intogarrytan:mainfrom
sensdiego:feat/bye-session-end-skill

Conversation

@sensdiego
Copy link
Copy Markdown

Summary

  • New skill: /bye — session-end safety check that commits uncommitted work, updates PROGRESS/HANDOFF docs, runs lint, checks Linear issue status, and captures session learnings to memory
  • Auto-fixes routine items (commits, doc updates, lint), asks only for unusual or destructive actions
  • 6 sequential blocks with traffic light final report: ✅ ⚠️

Origin story

Running 180 Claude Code sessions/month across 9 repos, the #1 source of wasted time is context loss between sessions: uncommitted changes, stale PROGRESS.md, forgotten Linear updates. /ship handles "push to remote" and /review handles "is this mergeable?" but nothing handled "is it safe to close this session?"

/bye fills that gap. It's the /ship for session hygiene.

What it does

Block Action Behavior
Git Hygiene Commit uncommitted, clean worktrees Auto-fix
Documentation Update PROGRESS.md, rewrite HANDOFF.md Auto-fix (respects per-repo format)
Code Quality Run lint --fix, report test failures, scan new TODOs Auto-fix lint, report rest
Linear Sync Check SEN-XXX issue status vs commits Ask before changing
Memory Capture feedback and project learnings Auto-save explicit, ask ambiguous
Report Traffic light summary + safe-to-close verdict Display

Key design decisions

  • Respects per-repo doc patterns. Detects which files exist (PROGRESS.md, HANDOFF.md, CLAUDE.md) and only updates what's there. Never creates files without asking.
  • Format detection. Reads existing doc structure and replicates the pattern (headers, date format, section names) instead of imposing a template.
  • Skip gracefully. No Linear CLI? Skip silently. No test runner? Skip. No linter? Skip. No errors for missing optional tooling.
  • Never pushes to remote. Local commits only. Pushing is a separate decision.
  • Marked sensitive: true. Factory Droids won't auto-invoke it.

Files

  • bye/SKILL.md.tmpl — 378 lines (source template)
  • bye/SKILL.md — 684 lines, ~7.5k tokens (generated)

Test plan

  • Run /bye in a repo with uncommitted changes — verify auto-commit
  • Run /bye in a repo with PROGRESS.md — verify append with correct format
  • Run /bye in a repo with HANDOFF.md — verify rewrite preserves locked decisions
  • Run /bye in a repo with no docs — verify it asks before creating
  • Run /bye outside a git repo — verify graceful skip to memory-only
  • Run /bye in a clean repo (nothing to do) — verify all-green report

🤖 Generated with Claude Code

Commits uncommitted work, updates PROGRESS/HANDOFF docs, runs lint,
checks Linear issue status, and captures session learnings to memory.
Auto-fixes routine items, asks only for unusual or destructive actions.

6 sequential blocks: Git Hygiene → Documentation Update → Code Quality
→ Linear Sync → Memory Check → Final Report with traffic light verdict.

Born from a real workflow gap: /ship handles "push to remote" and
/review handles "is this mergeable?" but nothing handled "is it safe
to close this session?" Context loss between sessions is the garrytan#1
productivity killer for builders running long AI coding sessions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant