/bh:session [topic-slug] | --organizefrom bh
Create session summary before compact, or organize existing sessions into a year/month/day hierarchy.
Ships in bh. Installing the plugin adds it to Claude Code.
Two modes of operation:
Check $ARGUMENTS:
--organize → Execute Organize ModeCreate a session summary file to preserve development context before compact.
date +%Y-%m-%dls -1t .claude/sessions/*.md 2>/dev/null | head -5 || echo "none"git status --short 2>/dev/null | head -10 || echo "not a git repo"git log --oneline -5 2>/dev/null || echo "no commits"Determine sequence number: Based on existing sessions today, calculate the next sequence (01, 02, 03...)
Generate filename:
YYYY-MM-DD-NN-topic.md$ARGUMENTS if provided, otherwise ask or infer from conversation.claude/sessions/Create session file with this structure:
---
title: [Descriptive title based on work done]
date: [today's date]
sequence: [number]
type: Feature | Bugfix | Refactor | Infrastructure
---
## Summary
[1-2 sentences about what was accomplished - from conversation context]
## Completed Tasks
[Checkbox list of completed work - from conversation context]
- [x] Task 1
- [x] Task 2
## Key Files
### New Files
[List files created in this session]
### Modified Files
[List files modified in this session]
## Key Decisions
[Important technical/architectural decisions made]
## Next Steps
[What should be done next - incomplete tasks, follow-ups]
- [ ] Next task 1
- [ ] Next task 2
## Notes
[Any additional context, blockers, or important information]
Fill in content based on the conversation context - this is the valuable part that would be lost after compact
Confirm the file was created and show its path
--organize)Organize session files into a hierarchical year/month/day directory structure.
Today's sessions remain in the .claude/sessions/ root for easy access.
.claude/sessions/
├── README.md
├── 2026-02-05-01-today-session.md ← today's files stay in root
├── 2026/ ← past months get hierarchy
│ ├── 2026-01/
│ │ ├── 2026-01-01/
│ │ │ ├── 2026-01-01-01-session.md
│ │ │ └── 2026-01-01-02-session.md
│ │ ├── 2026-01-02/
│ │ │ └── ...
│ │ └── ...
│ └── 2026-02/ ← current month: day-level only
│ ├── 2026-02-01/
│ │ └── 2026-02-01-01-session.md
│ └── ...
└── 2025/
└── 2025-12/
├── 2025-12-27/
│ └── ...
└── ...
| Scope | Structure | Example |
|---|---|---|
| Today | Root (flat) | .claude/sessions/2026-02-05-01-topic.md |
| Current month (not today) | YYYY/YYYY-MM/YYYY-MM-DD/ | .claude/sessions/2026/2026-02/2026-02-01/ |
| Past months | YYYY/YYYY-MM/YYYY-MM-DD/ | .claude/sessions/2025/2025-12/2025-12-27/ |
date +%Y-%m-%ddate +%Y-%mls -la .claude/sessions/ 2>/dev/null | head -25 || echo "directory not found"find .claude/sessions -maxdepth 1 -name "*.md" -type f ! -name "README.md" 2>/dev/null | wc -l || echo "0"Find items to organize:
*.md files directly in .claude/sessions/ (not in subdirectories, not README.md)YYYY-MM-DD/ directories directly in .claude/sessions/ (legacy structure)$(date +%Y-%m-%d)-*.md in root)Migrate legacy flat directories:
If there are YYYY-MM-DD/ directories directly under .claude/sessions/:
YYYY) and month (YYYY-MM) from each directory name.claude/sessions/YYYY/YYYY-MM/YYYY-MM-DD/ into .claude/sessions/YYYY/YYYY-MM/YYYY-MM-DD/Organize loose files:
For any *.md files (except README.md and today's) directly in .claude/sessions/:
YYYY-MM-DD) from filename.claude/sessions/YYYY/YYYY-MM/YYYY-MM-DD/Create or update README.md in .claude/sessions/ with this structure:
# Session Archive
Development session summaries organized by year/month/day.
## Directory Structure
### YYYY
| Month | Days | Sessions | Topics |
|-------|------|----------|--------|
| [YYYY-MM](./YYYY/YYYY-MM/) | N days | N sessions | topic1, topic2, ... |
## Today's Sessions (in root)
- [YYYY-MM-DD-NN-topic.md](./YYYY-MM-DD-NN-topic.md) - Description
## Recent Archived Sessions
### YYYY-MM
- [YYYY-MM-DD-NN-topic.md](./YYYY/YYYY-MM/YYYY-MM-DD/YYYY-MM-DD-NN-topic.md) - Description
## Statistics
- Total sessions: N
- Date range: YYYY-MM-DD to YYYY-MM-DD
- Most active day: YYYY-MM-DD (N sessions)
What the command file sets; muted values are Claude Code's defaults
haiku7-day visitors to each command page
npx claudepluginhub brighthills/brighthills-cc-plugins --plugin bhOther plugins' commands for the same job