| name | session-save |
| description | Save current session context and work summary to the Obsidian vault when the user asks to record or save their work. Automatically generates a structured markdown document capturing what was discussed, decisions made, and next steps. Triggers: ๊ธฐ๋กํด, ์ ์ฅํด, save session, ์ธ์
์ ์ฅ, ์์
๊ธฐ๋ก, ์ด ์์
๊ธฐ๋ก, save this, record this, ๊ธฐ๋ก, ์ ์ฅ, ๋ก๊ทธ, log, document this, ํ์๋ก ์์ฑ, ์ ๋ฆฌํด์ค
|
| version | 0.1.0 |
| allowed-tools | ["Bash","Read","Write"] |
Session Save Skill โ ์ธ์
๊ธฐ๋ก ์ ์ฅ
When to Activate
Activate when the user explicitly asks to save, record, or document the current session's work.
Also activate when the stop hook prompts and the user agrees to save.
Steps
-
Check Environment
Verify $OBSIDIAN_VAULT is set. If not, inform user and suggest /oh-my-obsidian:setup.
-
Analyze Session
Review the conversation and extract:
- Main topics discussed
- Decisions made
- Code/files modified
- Problems solved
- Action items or next steps
-
Auto-Categorize
Determine the best category and derive the type field:
- ์์
๊ธฐ๋ก/์ธ์
๊ธฐ๋ก โ
type: session-log: General work logs, coding sessions
- ์์
๊ธฐ๋ก/์์ฌ๊ฒฐ์ โ
type: decision: Architectural choices, design decisions
- ์์
๊ธฐ๋ก/ํธ๋ฌ๋ธ์ํ
โ
type: troubleshooting: Bug fixes, error resolution
- ์์
๊ธฐ๋ก/ํ์๋ก โ
type: meeting-notes: Meeting summaries (if multiple participants mentioned)
- ์๋น์ค ๋ ์ด์ด: Technical knowledge docs (API specs, schemas, etc.)
-
Discover Related Documents
Before writing the note, search the vault for related documents using grep/glob.
Add any found documents as wikilinks in the ๊ด๋ จ ๋ฌธ์ section.
grep -ril "keyword1\|keyword2" "$OBSIDIAN_VAULT" --include="*.md"
-
Generate Document
Create at: $OBSIDIAN_VAULT/์์
๊ธฐ๋ก/{์ธ์
๊ธฐ๋ก|์์ฌ๊ฒฐ์ |ํธ๋ฌ๋ธ์ํ
}/YYYY-MM-DD_{slug}.md
Template:
---
date: YYYY-MM-DDTHH:mm
topic: {inferred topic}
category: {auto-detected category}
type: {session-log|decision|troubleshooting|meeting-notes}
services: [{affected services}]
related_docs: [{auto-discovered wikilinks}]
status: done
tags: [auto-generated tags]
---
# {topic}
## ์์ฝ
{1-2 sentence summary}
## ์์ธ ๋ด์ฉ
{detailed notes from session}
## ์ฃผ์ ๊ฒฐ์
- {decision 1}
- {decision 2}
## ๋ณ๊ฒฝ๋ ํ์ผ
- `{file path}` โ {what changed}
## ๋ค์ ๋จ๊ณ
- [ ] {action item}
## ๊ด๋ จ ๋ฌธ์
- [[{discovered-doc}]] -- (auto-discovered)
-
Git Commit
cd "$OBSIDIAN_VAULT"
git add "{category}/YYYY-MM-DD_{slug}.md"
git commit -m "docs: {category} โ {topic}"
-
Confirm
Print: "โ
์ ์ฅ ์๋ฃ: {category}/{filename}"
If the user said "session-save skip", exit silently without saving.
Helper command with structural relationship flags:
node scripts/vault-ops.mjs session-save \
--topic "<topic>" \
--detail "<summary>" \
--category "์ธ์
๊ธฐ๋ก" \
--type "session-log" \
--service "<service>" \
--related-doc "<vault-relative-path>"