claude-skills/productivity/handoff/commands
Claude 1d066e0dec
feat(productivity/handoff): v1.1 — SessionEnd hook, self-check script, --refresh flag
Ships the three improvements judged most impactful in v1.1 design review:

1. SessionEnd hook (hooks/session_end.py)
   Pairs with SessionStart. When a session ends with no handoff in the
   last 30 minutes, prints a one-line reminder. Cannot prompt
   interactively or block session end — surfaces text via stdout.
   Disable per-session with HANDOFF_SESSIONEND=0. hooks.json updated to
   wire both SessionStart and SessionEnd.

2. handoff_self_check.py — fidelity script (~300 LOC, stdlib-only)
   Operationalizes handoff_prompt.md. Six checks:
   - All 5 sections present
   - Goal is non-empty and non-placeholder
   - State-of-play bullets reference at least one artifact (commit hash,
     PR/issue number, file path, URL)
   - Open decisions are present (or explicit "- None.") when git is dirty
     or has recent commits
   - Skills to use: 3-5 entries, hard cap enforced
   - Artifacts contain paths/URLs only, no inline content
   Severity: high/medium/low. Strict mode exits 1 only on HIGH findings.
   --sample fixture has 3 planted issues (2 high + 1 medium) and exits 1.
   Canonical example_handoff.md passes clean (exit 0).
   /cs:handoff command updated to run self-check between scaffold-fill
   and redaction linter.

3. --refresh flag on handoff_template_generator.py
   Reuses the most recent handoff in the configured save location
   instead of creating a new file. Falls through to create-if-missing
   when no existing handoff is found. Keeps the save location
   uncluttered when work continues past the original handoff time;
   ensures the SessionStart hook always loads the up-to-date version.

Version bump: 2.7.4 -> 2.7.5. Marketplace description and keywords
updated. README v1.1 section added. SKILL.md gains "Refreshing an
Existing Handoff" and "SessionEnd Reminder" subsections.

Verified:
- All 9 Python files compile clean
- self-check --sample correctly fails (3 findings, exit 1)
- self-check passes clean against assets/example_handoff.md (exit 0)
- --refresh finds the latest /tmp/handoff-*.md and prints its path
- SessionEnd hook prints the reminder when no recent handoff exists
- check_plugin_json.py + marketplace.json + hooks.json all parse
- Plugin audit re-run: structure 84.2 -> 86.0, quality 62.2 -> 63.0,
  security PASS (0 critical, 0 high)
- Codex + Gemini sync re-ran clean

https://claude.ai/code/session_01KLhHBAfEDXdQMeRe6G8sRa
2026-05-23 01:22:07 +00:00
..
cs-handoff-setup.md feat(productivity): add handoff skill (Matt Pocock-inspired) with first-run setup, redaction enforcement, SessionStart auto-load 2026-05-21 17:33:42 +00:00
cs-handoff.md feat(productivity/handoff): v1.1 — SessionEnd hook, self-check script, --refresh flag 2026-05-23 01:22:07 +00:00