본문으로 건너뛰기
cccskills
무료GitHub에 공개

72-close-session-150

[72] CLOSE. Save and restore session context between conversations. Use when ending a session to preserve progress, or starting a new session to restore context. Triggers on "save session", "end session", "preserve context", "handoff", "continue from last time", or when context window is running low.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md9.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Close-Session 150 Protocol

Core Principle: Never lose progress. Save context before ending, restore context when starting.

What This Skill Does

This skill handles two modes:

💾 SAVE MODE (End of Session)

  • Capture current state and progress
  • Document key decisions and why
  • Define next steps clearly
  • Create handoff for next session

🔄 RESTORE MODE (Start of Session)

  • Read saved context
  • Restore working state
  • Verify what's still valid
  • Continue seamlessly

When to Use This Skill

SAVE triggers:

  • Context window running low
  • Ending work session
  • Before major context switch
  • Handoff to another person/session
  • "Save progress", "end session", "preserve context"

RESTORE triggers:

  • Starting new session
  • Continuing previous work
  • "Resume", "continue from last time", "restore context"

The 150% Continuity Rule

  • 100% Core: Current state + next steps
  • 50% Enhancement: Decision rationale + blockers + risks

Save Protocol

Step 0: GATHER SOURCES (Read First!)

Before saving, collect data from all sources:

SourceWhat to ReadPurpose
.sessions/SESSION_[date]-[name].mdProgress Log / Findings / DecisionsRaw data for lessons
Chat historyCurrent conversation contextWhat was discussed, tried, decided
MEMORY.mdLessons InboxExisting lessons
Files touchedRecent changesWhat was modified

Critical: Don't start saving until you've read all sources!

Step 1: EXTRACT LESSONS FROM PROGRESS LOG

Review the session log Progress Log and extract lessons:

  • Look for patterns in ❌ (what didn't work)
  • Identify root causes from 🔄 (what was tried)
  • Confirm solutions from ✅ (what worked)
  • Write lessons to MEMORY.md Lessons (Inbox)
Progress Log Analysis:
❌ Failed attempts → Why did they fail? → Principle for future
✅ Successful fixes → What made it work? → Confirm understanding
🔄 Experiments → What was learned? → Document insight

Step 2: SUMMARIZE PROGRESS

What was accomplished:

  • Tasks completed
  • Current state
  • Files changed

Step 3: CAPTURE DECISIONS

Key choices made and why:

  • What was decided
  • Why this approach
  • Alternatives considered

Step 4: DEFINE NEXT STEPS

Clear continuation path:

  • Immediate priorities
  • What's blocked
  • What's ready

Step 5: NOTE CONTEXT

Important state to remember:

  • Active files/components
  • Dependencies
  • Risks/concerns

Output Format: Session Save

💾 **SESSION-SAVE 150**

**Date:** [YYYY-MM-DD HH:MM]
**Project:** [Project name/path]

## Progress Made
- ✅ [Completed item 1]
- ✅ [Completed item 2]
- 🔄 [In progress item]

## Current State
- Working on: [Current focus]
- Files touched: [Key files]
- Status: [Overall status]

## Key Decisions
| Decision | Reasoning |
|----------|-----------|
| [Choice 1] | [Why] |
| [Choice 2] | [Why] |

## Next Steps (Priority Order)
1. **Immediate:** [Next action]
2. **Then:** [Following action]
3. **Later:** [Future action]

## Blockers & Risks
- ⚠️ [Blocker/Risk 1]
- ⚠️ [Blocker/Risk 2]

## Context to Remember
- [Important detail 1]
- [Important detail 2]

---
**Handoff Status:** ✅ Ready for next session

Output Format: Session Restore

🔄 **SESSION-RESTORE 150**

**Restoring from:** [Date of saved session]

## Previous Progress
[Summary of what was done]

## Continuing From
- Last state: [Where we left off]
- Next step: [What to do now]

## Context Restored
- ✅ [Verified context 1]
- ✅ [Verified context 2]
- ⚠️ [Needs verification]

## Ready to Continue
Starting with: [First action]

Quick Save Template

For fast saves when time is short:

💾 **QUICK SAVE**

**Done:** [What was accomplished]
**Current:** [Where we are]
**Next:** [What to do next]
**Remember:** [Key context]

Integration with Mid-Session Checkpoints

If 74-mid-session-save-150 was used during the session:

Session Flow:
┌─────────────────────────────────────────────────────────┐
│  mid-session-save → mid-session-save → close-session   │
│       ↓                    ↓                 ↓         │
│  Progress Log #1    Progress Log #2    READ ALL LOGS   │
│  (raw data)         (more data)        EXTRACT LESSONS │
│                                        FINAL HANDOFF   │
└─────────────────────────────────────────────────────────┘

Close-session responsibility:

  1. Read accumulated Progress Logs from .sessions/SESSION_[date]-[name].md
  2. Extract patterns → formulate lessons
  3. Write lessons to MEMORY.md Lessons (Inbox)
  4. Create final handoff with full context

Where to Save Context

📁 SAVE LOCATIONS
├── MEMORY.md              # Project memory file + extracted lessons
├── .sessions/SESSION_[date]-[name].md    # Session-specific log (read & update)
├── Project README         # For major milestones
└── Git commit message     # For code changes

What to Read vs Write

LocationREADWRITE
.sessions/SESSION_[date]-[name].mdProgress Log, checkpoints, findingsFinal handoff state
MEMORY.mdLessons InboxNew lessons
Chat historyFull conversation context—
Files touchedWhat was modified—

Operational Rules

  1. READ SOURCES FIRST: Gather from the session log, chat, MEMORY.md before saving
  2. EXTRACT LESSONS: Don't close without reviewing Progress Log for lessons
  3. SAVE BEFORE ENDING: Always save context before session ends
  4. RESTORE BEFORE STARTING: Check for saved context when starting
  5. BE SPECIFIC: Vague notes are useless later
  6. INCLUDE WHY: Decisions without rationale cause confusion
  7. PRIORITIZE NEXT STEPS: Make continuation obvious
  8. FLAG RISKS: Don't hide problems

Examples

Example: Extracting Lessons from Progress Log

Input: Progress Log from .sessions/SESSION_[date]-[name].md

### Checkpoint #1
❌ Didn't Work: Direct state update in useEffect — infinite loop
   Reason: dependency array included computed object

### Checkpoint #2  
🔄 Tried: useMemo for computed dependency
✅ Worked: useMemo solved the loop — stable reference now

### Checkpoint #3
❌ Didn't Work: Hardcoded colors in component
   Reason: Violates project convention (use themeColors)
✅ Worked: Imported from @/utils/themeColors

Output: Lessons extracted to MEMORY.md

### 2026-01-10 useEffect dependency stability
**Problem:** Infinite loop from computed object in useEffect deps
**Attempts:** Direct state update failed
**Solution:** Use useMemo to create stable reference
**Why it worked:** useMemo memoizes the computed value, preventing new reference on each render
**Principle:** Never use computed objects in useEffect deps — wrap with useMemo or extract primitive IDs

### 2026-01-10 Color convention adherence
**Problem:** Hardcoded colors violated project standards
**Solution:** Import from @/utils/themeColors
**Principle:** All colors must come from central theme utilities, never hardcoded

❌ Bad Session Save

"Was working on stuff. Continue later."
Result: Next session spends 30 min figuring out what "stuff" was

✅ Good Session Save

💾 SESSION-SAVE 150

Progress Made:
- ✅ Created 7 skills from protocols
- ✅ Refactored chain-flow to include action-plan
- 🔄 Working through remaining protocols

Current State:
- Converting PROTOCOLS_GENERALIZED.md to skills
- 7/13 protocols converted

Key Decisions:
| Decision | Reasoning |
|----------|-----------|
| Renamed "Plan-First" → "chain-flow" | It's an orchestrator, not just a plan |
| Separated action-plan as own skill | Needed as component in chains |

Next Steps:
1. **Immediate:** Create a mid-session checkpoint (`74-mid-session-save-150`) if context is low
2. **Then:** Continue with remaining protocols
3. **Later:** Test skills integration

Context to Remember:
- Skills go in ./.codex/skills/ folder
- Each skill needs SKILL.md with yaml frontmatter
- chain-flow orchestrates other skills

Handoff Status: ✅ Ready

Failure Modes & Recovery

FailureDetectionRecovery
No saveSession ended without handoffReconstruct from memory, files, git
Vague saveCan't understand notesAsk questions, check artifacts
Outdated contextThings changed since saveVerify current state, update
Missing decisionsDon't know why choices madeReview code/docs, make new decision
Skipped Progress LogLessons not extractedRe-read session log, extract
Didn't read sourcesIncomplete handoffGather from all sources, redo save

Remember: Future you (or next session) will thank present you for good notes. Context loss is expensive — prevention is cheap.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Master backend architectures, REST API design, microservices, and server-side development across multiple languages. Use this as a central index to access specialized sub-skills.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

MikeCheng1208/BattleTree22026년 7월 22일 업데이트

在每次回复中使用固定前缀并列出本次实际参考的指令/文件,便于校验是否遵循上下文与规则。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

MikeCheng1208/BattleTree22026년 7월 22일 업데이트

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

MikeCheng1208/BattleTree22026년 7월 22일 업데이트

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

MikeCheng1208/BattleTree22026년 7월 22일 업데이트

Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

MikeCheng1208/BattleTree22026년 7월 22일 업데이트

[00] META. Orchestrate skills into dynamic chains for complex tasks. Analyzes the task, discovers available skills, builds an optimal chain, explains why each skill is needed, and executes step-by-step with user confirmation. Use for any complex task requiring multiple thinking/research/analysis steps. Triggers on "plan this", "how to approach", "what's the strategy", "build a plan", or any multi-step problem requiring skill orchestration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

MikeCheng1208/BattleTree22026년 7월 22일 업데이트

MikeCheng1208의 스킬 모두 보기

이 스킬의 문제 신고