| name | viewer |
| description | Generate a static HTML viewer for cards and session timeline |
| args | [output-path] |
| user_invocable | true |
/session-memory:viewer — Generate Web Viewer
Generate a self-contained HTML file that visualizes all knowledge cards and session summaries.
Steps
-
Run the viewer generator script:
bash ${CLAUDE_PLUGIN_ROOT}/lib/viewer.sh "<project-cwd>" [output-path]
Default output: .claude/memory/viewer.html
-
The generated HTML includes:
- Stats dashboard (total cards, active, draft, sessions)
- Card list with type badges, importance dots, TL;DR
- Type filter buttons (decision, constraint, gotcha, runbook, onboarding)
- Search box (filters by title, tags, files)
- Session timeline tab (from summaries/)
- Dark theme (GitHub-style)
-
Tell the user:
- Where the file was saved
- How to open it:
open .claude/memory/viewer.html (macOS) or browser
- The file is self-contained (no external dependencies)
- Add to
.gitignore if you don't want to commit it
Notes
- The viewer is a snapshot — regenerate after card changes
- All data is embedded in the HTML (no external API calls)
- Safe rendering: uses textContent/DOM methods, not raw HTML injection
- The viewer.html is gitignored by default (in events/ parent gitignore scope)