π¦ ClawHub
Session Context Bridge
by @aptratcn
Automatically save, restore, and switch project session contexts to retain tasks, decisions, file states, blockers, and environment details across work sessi...
TERMINAL
clawhub install session-context-bridgeπ About This Skill
Session Context Bridge
> Never start from zero. Carry context across sessions automatically.
The Problem
Every new session starts blind. You lose:
Claude-mem (65K stars) proved this is a massive need. This is the lightweight, framework-agnostic version.
When to Use
How It Works
End of Session: Save
## Session Context β 2026-04-22 03:00Active Task
Building API endpoint for user onboarding
Status: 70% complete, auth middleware done, tests pending Key Decisions
1. Chose JWT over session cookies (reason: mobile-first, stateless)
2. Rate limiting: 100 req/min per user
3. Database: PostgreSQL with UUID primary keysFile Map
src/auth/middleware.ts β JWT validation (DONE)
src/routes/onboarding.ts β Main endpoint (IN PROGRESS, line 47)
tests/onboarding.test.ts β Not started
prisma/schema.prisma β User model updatedBlockers
Waiting on design team for email template
Need staging database credentials from DevOps Environment
Node v22.22.2, pnpm 10.28
DATABASE_URL in .env (not committed)
Redis running on localhost:6379
Start of Session: Restore
## Restoring Context from 2026-04-22 03:00Resume Point
β Continue src/routes/onboarding.ts at line 47
β Next: implement email verification flow
β Then: write testsContext Loaded
3 key decisions loaded
File map: 4 files
2 blockers noted
Environment confirmed Ready to continue.
Context File Structure
project/
βββ .context/
β βββ current.md β Active session context (always up-to-date)
β βββ archive/
β β βββ 2026-04-20.md β Previous sessions
β β βββ 2026-04-21.md
β βββ decisions.md β Long-running decision log
current.md Template
# Session Context> Last updated: [TIMESTAMP]
π― Active Task
[What you're working on right now]β
Completed This Session
[x] Task 1
[x] Task 2 π In Progress
[ ] Task 3 (status: ___) π Todo (Next Session)
[ ] Task 4
[ ] Task 5 π§ Key Decisions
1. [Decision] β [Reason]π File Map
| File | Status | Notes |
|------|--------|-------|
| path/to/file | DONE/WIP/TODO | Description |π§ Blockers
[What's blocking you] π§ Environment
Runtime versions
Active services
Config state
decisions.md Template
# Decision Log> Architectural and design decisions with reasoning.
[DATE] β [Decision Title]
Decision: [What was decided]
Context: [What was the situation]
Reason: [Why this option was chosen]
Alternatives: [What else was considered]
Revisit if: [Conditions that might change this decision]
Bridge Protocol
Save (End of Session)
1. Writecurrent.md with all sections filled
2. Copy to archive/YYYY-MM-DD.md
3. Update decisions.md with any new decisions
4. Verify file written: cat .context/current.md | head -5Restore (Start of Session)
1. Read.context/current.md
2. Read .context/decisions.md
3. Verify environment matches (runtime versions, services)
4. Check file map: git status vs expected state
5. Resume from "In Progress" sectionContext Switch (Between Projects)
1. Save current project context 2. Load target project context 3. Note: different.context/ directories per projectAnti-Patterns
current.md becomes useless without historyIntegration with Existing Tools
.cursor/rules/context.mdcLicense
MIT