跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
部署与云服务

wrap-up

Semi-automatic end-of-session ritual. Scans the session and machine for loose ends, presents ONE categorized report, and on approval executes cleanup + closing tasks so the user can `exit` with nothing undone, uncommitted, unmerged, or left as garbage. Invoke whenever the user signals they're finishing up — "/wrap-up", "wrap up", "wrap up the session", "close out", "let's wrap", "I'm done for today", "before I exit", "tidy up the session". Covers: uncommitted/unmerged work, stale dev servers, leftover git worktrees, booted/leaked simulators, scratchpad & temp files, issue-tracker status, docs that drifted, a code review of the session's diff, and a disk-residue check. Do NOT use for a one-off cleanup of a single thing the user named explicitly (just do that directly), nor as a substitute for a mid-session code review or deploy verification.

kirillgreen · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add kirillgreen/skills --skill wrap-up

技能说明


name: wrap-up description: >- Semi-automatic end-of-session ritual. Scans the session and machine for loose ends, presents ONE categorized report, and on approval executes cleanup + closing tasks so the user can exit with nothing undone, uncommitted, unmerged, or left as garbage. Invoke whenever the user signals they're finishing up — "/wrap-up", "wrap up", "wrap up the session", "close out", "let's wrap", "I'm done for today", "before I exit", "tidy up the session". Covers: uncommitted/unmerged work, stale dev servers, leftover git worktrees, booted/leaked simulators, scratchpad & temp files, issue-tracker status, docs that drifted, a code review of the session's diff, and a disk-residue check. Do NOT use for a one-off cleanup of a single thing the user named explicitly (just do that directly), nor as a substitute for a mid-session code review or deploy verification.

wrap-up

The closing ritual for a work session. One command, one report, one approval — then the machine is clean and every loose end is either resolved or explicitly flagged. The goal is a single feeling: after this runs, exit is safe. Nothing uncommitted, nothing unmerged, no orphaned server eating CPU, no leaked simulator eating disk, no scratchpad cruft, no ticket lying about its state.

But first, before tidying anything, wrap-up asks one blunt question: is the work actually finished? Firing it in a session where the job is half-done is the one way this skill can do harm — it would stop a server you're mid-debug on, remove a worktree holding your next step, mark a ticket "Done" that isn't. So a completion gate runs ahead of everything else and refuses to clean up on unfinished work without an explicit "yes, anyway."

You (the agent running this) did the session's work, so you already hold most of the context: which servers you started, which worktrees you created, which branch you're on, which issues you touched, which files you changed. The scan's job is to corroborate that memory against live system state and catch what you've forgotten or what drifted while you weren't looking.

Adapting this to your setup

Written against a macOS + git + Node/Swift workflow with an issue tracker. The structure is the portable part; some detectors are not:

  • macOS-specific: stat -f %B (birth time), ps -o lstart, xcrun simctl. On Linux use stat -c %W / ps -o lstart= / drop the simulator category.
  • Optional categories: simulators (iOS only), issue tracker, secret-manager wrappers. Skip any category your setup doesn't have — a missing category is not a finding.
  • Placeholders to replace throughout: <projects-root> (the directory your repos live under) and <scratchpad-parent> (where your harness keeps per-session temp dirs). Filled per-run rather than at setup: <session-scratchpad-dir> (this session's temp dir — the agent knows it from its env preamble), <repo>, <wt>, <PID>, <UDID>.
  • Issue tracker is referenced generically. Wire it to whatever you use (Linear/Jira/GitHub Issues) via CLI or MCP; if you have none, skip that category.
  • Code review is delegated to a code-reviewer agent. This repo doesn't ship one — use your own, or spawn a plain subagent with a review prompt over the session diff. Whatever you use, keep its power to halt Phase 3: a review that can't stop the commit is decoration.

Flags

  • (none) — session scope. Only residue attributable to this session. The safe default.
  • --deep — also sweep machine-wide orphans from past sessions: old scratchpad dirs, leaked ephemeral test simulators (~/Library/Developer/ XCTestDevices can reach hundreds of GB), long-dead dev servers, stale worktrees on other projects.
  • --dry-run — run the scan and print the report, then stop. Execute nothing. Use to preview without committing to action.
  • --yes — still prints the report, then runs the WILL-RUN (auto-safe) tier without waiting; the DECISIONS list still needs a "go"/strike — --yes never auto-runs a destructive or external action (worktree, sim, branch, tracker). For trusted, low-residue sessions. (The Phase 0.5 completion gate is never skipped.)

The three phases

Phase 0 — Establish what this session touched

Before scanning, reconstruct the session's footprint. Your memory of the conversation is the starting point — but it does not survive a context compaction, and "which server did I start" can't be answered from memory after one. So anchor on facts, not recall (commands in scan-commands.md §0):

  • T0 — the session-start clock. Take the birth time of the session <uuid> dir (its path is in your env preamble, re-sent every turn, so it survives compaction). Anything — server, worktree, sim, scratchpad file — born after T0 is this session's; born before is --deep-only. This is how you attribute residue deterministically instead of guessing.
  • Repos touched — discover, don't just recall. Two passes (§0): every git checkout under <projects-root> that is dirty, ahead, or committed-to since T0, plus every worktree git worktree list reports from each root found (a worktree's .git is a file, so a depth-bounded find alone misses them). Corroborate with memory, then confirm the set with the user. A session can span multiple repos.
  • Code actually changed? — the gate for the two heavy steps. Use the Unicode-safe diff check in §0 (a plain grep '\.md$' misfires on non-ASCII or spaced paths). Docs/config-only → heavy steps skip.

Then read references/scan-commands.md for the exact detection commands and run the scan. Read references/safety-rules.md before proposing any destructive action — it is the do-not-touch list and it overrides convenience every time.

Phase 0.5 — Is the work actually finished? (the fool-proofing gate)

Before scanning or cleaning anything, sanity-check that this session is at a

阅读完整来源 ↗