How this skill is triggered — by the user, by Claude, or both
Slash command
/session-wrap:session-wrapThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
---
Comprehensive session wrap-up workflow with multi-agent analysis.
┌─────────────────────────────────────────────────────┐
│ 1. Check Git Status │
├─────────────────────────────────────────────────────┤
│ 2. Phase 1: 4 Analysis Agents (Parallel) │
│ ┌─────────────────┬─────────────────┐ │
│ │ doc-updater │ automation- │ │
│ │ (docs update) │ scout │ │
│ ├─────────────────┼─────────────────┤ │
│ │ learning- │ followup- │ │
│ │ extractor │ suggester │ │
│ └─────────────────┴─────────────────┘ │
├─────────────────────────────────────────────────────┤
│ 3. Phase 2: Validation Agent (Sequential) │
│ ┌───────────────────────────────────┐ │
│ │ duplicate-checker │ │
│ │ (Validate Phase 1 proposals) │ │
│ └───────────────────────────────────┘ │
├─────────────────────────────────────────────────────┤
│ 4. Integrate Results & AskUserQuestion │
├─────────────────────────────────────────────────────┤
│ 5. Execute Selected Actions │
├─────────────────────────────────────────────────────┤
│ 7. Update Documentation Files (Auto, MANDATORY) │
│ ├─ claude.md (project guidelines) │
│ └─ wrapup.md (session progress) │
├─────────────────────────────────────────────────────┤
│ 8. Update Obsidian Daily Note (Auto, MANDATORY) │
│ └─ Claude Session Log section │
├─────────────────────────────────────────────────────┤
│ 9. Recommend Azure DevOps Board Sync (Optional) │
│ └─ Conditional: devops-board-sync skill + │
│ repo is mapped → AskUserQuestion │
└─────────────────────────────────────────────────────┘
git status --short
git diff --stat HEAD~3 2>/dev/null || git diff --stat
Execute 4 agents in parallel (single message with 4 Task calls).
Session Summary:
- Work: [Main tasks performed in session]
- Files: [Created/modified files]
- Decisions: [Key decisions made]
Task(
subagent_type="doc-updater",
description="Document update analysis",
prompt="[Session Summary]\n\nAnalyze if CLAUDE.md, context.md need updates."
)
Task(
subagent_type="automation-scout",
description="Automation pattern analysis",
prompt="[Session Summary]\n\nAnalyze repetitive patterns or automation opportunities."
)
Task(
subagent_type="learning-extractor",
description="Learning points extraction",
prompt="[Session Summary]\n\nExtract learnings, mistakes, and new discoveries."
)
Task(
subagent_type="followup-suggester",
description="Follow-up task suggestions",
prompt="[Session Summary]\n\nSuggest incomplete tasks and next session priorities."
)
| Agent | Role | Output |
|---|---|---|
| doc-updater | Analyze CLAUDE.md/context.md updates | Specific content to add |
| automation-scout | Detect automation patterns | skill/command/agent suggestions |
| learning-extractor | Extract learning points | TIL format summary |
| followup-suggester | Suggest follow-up tasks | Prioritized task list |
Run after Phase 1 completes (dependency on Phase 1 results).
Task(
subagent_type="duplicate-checker",
description="Phase 1 proposal validation",
prompt="""
Validate Phase 1 analysis results.
## doc-updater proposals:
[doc-updater results]
## automation-scout proposals:
[automation-scout results]
Check if proposals duplicate existing docs/automation:
1. Complete duplicate: Recommend skip
2. Partial duplicate: Suggest merge approach
3. No duplicate: Approve for addition
"""
)
## Wrap Analysis Results
### Documentation Updates
[doc-updater summary]
- Duplicate check: [duplicate-checker feedback]
### Automation Suggestions
[automation-scout summary]
- Duplicate check: [duplicate-checker feedback]
### Learning Points
[learning-extractor summary]
### Follow-up Tasks
[followup-suggester summary]
AskUserQuestion(
questions=[{
"question": "Which actions would you like to perform?",
"header": "Wrap Options",
"multiSelect": true,
"options": [
{"label": "Create commit (Recommended)", "description": "Commit staged changes"},
{"label": "Create automation", "description": "Generate skill/command/agent"},
{"label": "Skip", "description": "End without action"}
]
}]
)
Note: wrapup.md and claude.md are ALWAYS updated automatically in Step 7 (not optional).
Execute only the actions selected by user.
ALWAYS execute this step after completing the session wrap. This is NOT optional.
Both files are MANDATORY updates — do NOT skip either one.
This step uses outputs from:
Check for claude.md in order:
.claude/claude.md (preferred)CLAUDE.md (project root).claude/claude.md if neither existsProject-wide guidelines and instructions that persist across all sessions:
1. Read existing claude.md (or initialize template if not exists)
2. Apply doc-updater claude.md proposals (add/update sections)
3. Add any new project-wide knowledge discovered this session
4. Write updated content using Write or Edit tool
5. Log: "Updated .claude/claude.md"
Check for wrapup.md in order:
.claude/wrapup.md (preferred)wrapup.md (project root).claude/wrapup.md if not existsSession progress tracking file containing:
NOT for: Project-wide guidelines (those go to CLAUDE.md)
# Session Progress Summary
> Last Updated: [Current Date/Time]
## Branch Info
- **Current Branch**: [branch name]
- **Remote Tracking**: [origin/branch]
---
## Completed Work
### [Commit Hash] [Commit Message]
- [Brief description]
- Files: [changed files]
---
## Troubleshooting Log
### [Issue Title]
**Error:**
[Error message]
**Cause:**
[Root cause]
**Solution:**
[How resolved]
---
## Learnings (TIL)
[learning-extractor output]
---
## Pending Work
| File | Status | Notes |
|------|--------|-------|
| [file] | [modified/untracked] | [description] |
---
## Next Tasks
[followup-suggester output - prioritized list]
---
## Remote Server Status (if applicable)
- Server: [name]
- Last Run: [timestamp]
- Status: [success/failure]
- Data Location: [path]
1. Read existing .claude/wrapup.md (or create if not exists)
2. Collect data from:
- git log (recent commits)
- git status (pending work)
- Session conversation (troubleshooting)
- doc-updater output (wrapup.md proposals)
- learning-extractor output (TIL)
- followup-suggester output (next tasks)
3. Merge into existing structure
4. Write updated content
5. Notify user: "Updated .claude/wrapup.md"
ALWAYS execute this step after Step 7. This is NOT optional.
Update the ## 🤖 Claude Session Log section in today's Obsidian daily note with a concise summary of what was accomplished in this session.
The daily note path follows this pattern:
/mnt/c/Users/yyoo029/Documents/Obsidian/유용상/Daily/YYYY-MM-DD.md
Use today's date (from the system) to construct the file path.
Find the ## 🤖 Claude Session Log section and append the session log between the heading and the --- separator that follows it.
### [Project Name] — YYYY-MM-DD HH:MM
**Branch:** `branch-name`
**작업 내역:**
- [Completed task 1 — brief description]
- [Completed task 2 — brief description]
- ...
**주요 결정/발견:**
- [Key decision or discovery, if any]
**다음 작업:**
- [Top 2-3 next tasks from followup-suggester]
1. Construct today's daily note path: /mnt/c/Users/yyoo029/Documents/Obsidian/유용상/Daily/YYYY-MM-DD.md
2. Check if file exists — if not, skip with log message
3. Read the file and locate "## 🤖 Claude Session Log" section
4. Build session summary from:
- Completed work (from wrapup.md or session context)
- Key decisions/discoveries (from learning-extractor)
- Next tasks (from followup-suggester, top 2-3 only)
5. Append summary after the "## 🤖 Claude Session Log" heading
6. Write updated content
7. Notify user: "Updated Obsidian daily note"
Run only if BOTH conditions are true:
devops-board-sync skill is installed (~/.claude/skills/devops-board-sync/SKILL.md exists), AND~/.claude/skills/devops-board-sync/repo-teams.json (i.e., _config.py would not raise on enforce_repo_mapping).If either is false → skip silently. Do not show this prompt for projects where the integration is not configured.
# 1. Skill installed?
test -f ~/.claude/skills/devops-board-sync/SKILL.md || skip
# 2. Repo mapped? Check repo from git remote against repo-teams.json keys.
python3 -c "
import json, sys, subprocess
from pathlib import Path
url = subprocess.run(['git','config','--get','remote.origin.url'],
capture_output=True, text=True).stdout.strip()
if 'dev.azure.com' not in url: sys.exit(2)
repo = url.rstrip('/').rsplit('/',1)[-1]
mapping_file = Path.home() / '.claude/skills/devops-board-sync/repo-teams.json'
mapping = json.loads(mapping_file.read_text()) if mapping_file.exists() else {}
sys.exit(0 if repo in mapping else 1)
"
If exit code is 0 → proceed. Non-zero → skip.
This step is purely a recommendation. Do not push to the board without explicit user opt-in.
AskUserQuestion(
questions=[{
"question": "Sync this session's work to the Azure DevOps board for {team_name}?",
"header": "Board Sync (optional)",
"multiSelect": true,
"options": [
{"label": "Create work items for next tasks",
"description": "Turn followup-suggester output into new Tasks on the board"},
{"label": "Update existing work items",
"description": "Apply state/comment changes to items mentioned this session"},
{"label": "Skip",
"description": "Do not touch the board"}
]
}]
)
python3 ~/.claude/skills/devops-board-sync/scripts/create_item.py --type Task --title "..." [...]python3 ~/.claude/skills/devops-board-sync/scripts/update_item.py --id N --state "..." [...]#AB1234 patterns in commit messages or user requests). Do not invent IDs.enforce_repo_mapping raises despite the precheck (race or stale mapping), surface the error verbatim and stop — do not retry without explicit instruction.Whether the user accepted or skipped, conclude the wrap normally. Step 9 does not affect Steps 7/8 (those have already run).
See references/multi-agent-patterns.md for detailed orchestration patterns.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub 4n3mone/session-wrap-plugin --plugin session-wrap