← ClaudeAtlas

session-time-budgetlisted

Manage session end-time as a hard budget and run the ADR-0014 end-of-day cleanup checklist. Invoke this skill at the start of any multi-step task: it asks the user for the planned end-time (HH:MM / Nm / unknown), records it in `~/.cowork/session-time-budget-state.json`, sends 30 / 15 / 5-minute proactive alerts as the deadline approaches, and finally executes the 6-step cleanup (MEMORY save, WIP commit, branch push, handoff note in `docs/sessions/YYYY-MM-DD.md`, child-session check, parent report). Companion to `scheduled-tasks/session-cleanup-watch/SKILL.md` (external 15-min polling that catches the case where this skill itself stops running). Triggers naturally on phrases like "今日の終了は", "end of day cleanup", "session を畳む", "/skill session-time-budget", or any multi-step task kickoff that this user's USER_PREFERENCES asks for. See ADR-0014.
ttamakijp/dev-templates · ★ 0 · Data & Documents · score 76
Install: claude install-skill ttamakijp/dev-templates
# session-time-budget ## Overview Phase 4 (Operations) の session 側 hygiene skill。multi-step task が 時刻を意識せず暴走するのを防ぎ、終了時の context loss を消す。 **Keywords**: session, end-of-day, cleanup, time budget, hygiene, handoff, operations, ADR-0014 ## Trigger Invoke when ANY of: - USER_PREFERENCES に従い multi-step task を開始するとき (暗黙起動) - User が `/skill session-time-budget` と明示 - User が "今日は X 時まで" / "あと N 分で終わる" 等の発話をしたとき - 別 skill (apply-dev-templates 等) が長時間 task を始めるとき ## 5 Phase 進行 ### Phase 1: ヒアリング ``` AskUserQuestion: question: "今日のセッション終了予定時刻は?" options: - label: "18:00 (HH:MM 形式)" description: "絶対時刻を分単位で指定" - label: "60m (N 分後)" description: "現在からの相対分数を指定" - label: "unknown" description: "決まっていない (cleanup タイマーを起動しない)" multiSelect: false ``` Parse rules: - `HH:MM` (例 `18:00`) → 今日の該当時刻。既に過ぎていれば翌日と解釈 - `Nm` (例 `60m` / `90m`) → 現在 + N 分 - `unknown` → skill を suspend (state には `end_time: null` を記録) - それ以外 → 再質問 ### Phase 2: 予算登録 ```bash bash scripts/session-state.sh set "$SESSION_ID" "<ISO8601 end_time>" ``` `SESSION_ID` は Cowork が払い出す local id。state は `~/.cowork/session-time-budget-state.json` に書込。 ### Phase 3: Milestone Alert (30 / 15 / 5 分前) Skill 自身は session 内で稼働中なので、定期的に現在時刻を確認: - 主モデルが次の tool 呼び出しに入る前にチェック - 残時間 30 分 / 15 分 / 5 分 を初めて切ったタイミングで `SendUserMessage(status=proactive)`: ``` ⏰ 終了 15 分前です。 - 進行中タスク: <list> - cleanup 残: <list> あと 15 分で cleanup checklist に移行します。 ``` 各 alert 送信後は state に記録 (`alerts_sent: ["30m", "15m"]`) し