← スキル一覧に戻る

save-session-context
by maslennikov-ig
MegaCampus 2.0 - AI-powered course generation platform
⭐ 1🍴 0📅 2026年1月23日
SKILL.md
name: save-session-context description: Save current session state for later resumption. Use after completing workflow phases or before ending a session. trigger: After completing a workflow phase, before session end, or when switching to different task
Save Session Context
Saves the current workflow state to enable seamless session resumption.
When to Use
- After completing each phase in health orchestrator workflows
- Before ending a long-running session
- When switching context to a different task
- After significant progress that should be preserved
When NOT to Use
- For simple, quick tasks that don't need resumption
- When workflow is fully complete (clean up instead)
Algorithm
Step 1: Gather Current State
Collect the following information:
- Current workflow name and phase
- Priority level and completion counts
- Last completed action
- List of modified files (from git status)
Step 2: Get Git State
Run git status and git log -1 to capture:
- Current branch
- Uncommitted files count
- Last commit hash and message
Step 3: Determine Next Steps
Based on current phase and workflow, identify:
- Immediate next action
- Following 2-3 actions
Step 4: Write Context File
Write to .tmp/current/session/context.md:
# Session Context
> Auto-generated by save-session-context skill. Updated: [ISO timestamp]
## Current State
- **Workflow:** [workflow-name]
- **Phase:** [current]/[total] ([phase-name])
- **Priority:** [priority-level] ([completed] of [total] fixed)
- **Last Action:** [description]
## Active Files
[List from git status]
## Next Steps
1. [Next action]
2. [Following action]
3. [Third action]
## Git State
- **Branch:** [branch-name]
- **Uncommitted:** [count] files
- **Last Commit:** [hash] "[message]"
## Quality Gate Status
- **Type-check:** [status]
- **Build:** [status]
- **Tests:** [status]
## Resume Instructions
To continue this session:
1. Read this file to understand current state
2. Read `session-log.md` for recent decisions
3. Continue from "Next Steps" section
Step 5: Confirm Save
Output confirmation message with file path.
Implementation Notes
# Get git state
git status --porcelain | wc -l # Uncommitted count
git log -1 --format="%h %s" # Last commit
git branch --show-current # Current branch
Output
Confirmation message:
Session context saved to .tmp/current/session/context.md
- Workflow: health-bugs
- Phase: 3/7 (Staged Fixing)
- Uncommitted: 2 files
Token Cost
- Execution: ~50 tokens for git commands
- Output: 0 (write-only operation)
Related Skills
resume-session— Read saved context to continuerun-quality-gate— Update quality gate status in context
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です