用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/andrem-sec/psc-comet --skill wrap-up命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | wrap-up |
| description | Session-end protocol — collect learnings, update context, commit session state |
| version | 0.2.0 |
| level | 1 |
| triggers | ["end session","wrap up","wrap-up","session end","close out","/wrap-up"] |
| context_files | ["context/user.md","context/learnings.md","context/learnings-index.md"] |
| steps | [{"name":"Write Handoff","description":"Overwrite context/handoff.md using handoff-template.md as structure — Part 1 completed work, Part 2 open risks and next steps"},{"name":"Collect Learnings","description":"Review this session's work — what patterns, mistakes, or decisions are worth keeping?"},{"name":"Quality Gate","description":"Apply the 3-point test to each candidate learning before writing it"},{"name":"Route Learnings","description":"Read learnings-index.md for existing tags, present tag options to user, write to context/learnings/[tag].md or main learnings.md if universal"},{"name":"Update user.md","description":"Only if genuinely new information — diff against existing content before writing"},{"name":"Commit State","description":"Check current branch. If on main, present the branch choice prompt before committing. Stage and commit to the chosen destination. Then write the current ISO timestamp to `.claude/context/.wrapup-done` (signals stop-wrap-guard that wrap-up completed)."},{"name":"Reflect Check","description":"Ask user if new patterns or instincts emerged — if yes, invoke /reflect"},{"name":"Session Summary","description":"Three lines — done, learned, next"}] |
Run at the end of every session. Preserve knowledge before the context window closes.
Without wrap-up, session learnings evaporate. The next session starts cold. Patterns that were discovered at cost get rediscovered. Decisions that were made get revisited without their rationale. The system does not improve.
Before writing any learning to learnings.md, it must pass all three:
Reject generic programming patterns, library usage examples, refactoring techniques, and anything a junior dev could find in the docs.
[YYYY-MM-DD] [category] — [concise, specific statement]
Categories: pattern | mistake | approach | tool | decision
Good entry: [2026-03-25] mistake — Wrote settings.json hooks as escaped Python one-liners; they silently fail on edge cases. Move hooks to .claude/hooks/ shell scripts.
Bad entry: [2026-03-25] pattern — Always write tests before implementation. (too generic, fails gate)
Done: [what was completed]
Learned: [the one most valuable insight]
Next: [specific next action]
After collecting learnings and updating context files, write a session memory snapshot to context/session-memory.md. This file is the primary input for /resume at the next session start.
Overwrite the file each session (it tracks current state, not history).
## Current State
[What is true right now — not what was done, but what IS.
Current branch, file states, whether tests pass, open PRs, blockers.]
## Task
[The task that was active at session end and its acceptance criteria.
If multiple tasks, list all with their status.]
## Files
[Files touched this session, their roles, and their current state.
Format: path — role — state (clean/modified/broken)]
## Workflow
[The sequence of steps taken and their outcomes.
Ordered list. Mark completed steps. Note last completed step explicitly.]
[Errors encountered this session and how they were resolved.
Unresolved errors: document what was tried and what failed.]
[Non-obvious things discovered this session that would affect future work.
Only include things that pass the 3-point quality gate.]
[Concrete outputs: files created, tests passing count, PRs opened, decisions made.]
[Timestamp-ordered list of major actions taken. Use approximate times if exact times unknown.
Format: ~HH:MM — [action]]
Write this file before committing. The resume skill reads it to reconstruct the session without re-reading the conversation.
Before committing, run git branch --show-current to identify the current branch.
If on any branch other than main: commit normally — no prompt needed.
If on main: pause and present this choice to the user:
You are on main. Where should I commit this session's state?
1. Commit to main anyway (solo project / I know what I'm doing)
2. Commit to an existing branch (I'll pick from the list)
3. Create a new branch (I'll name it now)
4. Skip the commit (I'll handle it myself)
If they choose 2: run git branch to list local branches, let the user pick, then git checkout <branch> and commit there.
If they choose 3: ask for a branch name, run git checkout -b <name>, and commit there.
If they choose 4: skip the commit step entirely. Note it in the session summary under Next.
Never commit without completing this check when on main.
chore: wrap-up [date] — [1-line session description]
Do not manufacture learnings to fill the section. If nothing new was learned, write: [date] pattern — [existing approach confirmed, no new findings]
Do not append learnings that fail the quality gate. Quantity is not the goal.