skills/dojocodinglabs/context-persistence/SKILL.md
Waypoint plans methodology and session survival patterns for Claude Code. Use when working on long-running features, need to resume after context reset, want to document task progress, or need to survive session interruptions. Covers three-file structure (plan/context/tasks), SESSION PROGRESS tracking, quick resume instructions, update frequency, and context handoff patterns.
npx skillsauth add aiskillstore/marketplace context-persistenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ensure Claude Code can resume work seamlessly after context resets, session interruptions, or long breaks by maintaining structured documentation of current work, decisions, and progress.
Automatically activates when you mention:
What happens during a context reset:
With context persistence:
The core pattern uses three complementary files in plans/active/{task-name}/:
{task-name}-plan.md - The Strategic PlanPurpose: High-level strategy and approach
Contains:
Update frequency: Rarely (only when approach changes)
Example:
# Authentication Implementation Plan
## Overview
Add JWT-based authentication to replace session cookies for mobile app support.
## Requirements
- JWT tokens with refresh mechanism
- Supabase Auth integration
- Protected API routes
- Mobile-friendly (stateless)
## Architecture
- Auth middleware in Edge Functions
- Token storage in httpOnly cookies (web) + AsyncStorage (mobile)
- Row-Level Security policies for data access
## Implementation Phases
1. Supabase Auth setup
2. Edge Function auth middleware
3. Frontend auth hooks
4. RLS policies
5. Migration from existing auth
## Dependencies
- Supabase setup complete
- Database schema finalized
{task-name}-context.md - Current State & ProgressPurpose: Living document of current state, decisions, and progress
Contains:
Update frequency: After each significant change or decision
Example:
# Authentication Implementation Context
## SESSION PROGRESS (2025-01-15 14:30)
### ✅ COMPLETED
- [x] Supabase Auth configured
- [x] Created auth middleware for Edge Functions
- [x] Implemented login/signup pages
- [x] Added auth context provider
### 🟡 IN PROGRESS
- [ ] Implementing token refresh logic (CURRENT)
- Working on: lib/supabase/auth.ts
- Next: Handle token expiration gracefully
### ⏳ PENDING
- [ ] Add RLS policies
- [ ] Migrate existing users
- [ ] Add mobile auth flow
- [ ] Write auth tests
### 🎯 NEXT ACTION
Continue implementing refreshToken() function in lib/supabase/auth.ts
- Handle expired tokens
- Refresh transparently
- Redirect to login if refresh fails
## KEY DECISIONS
### Decision: JWT vs. Session Cookies (2025-01-12)
**Chose**: JWT tokens
**Rationale**: Need stateless auth for mobile apps
**Impact**: Requires token refresh mechanism
### Decision: Supabase Auth vs. Custom (2025-01-13)
**Chose**: Supabase Auth
**Rationale**: Built-in RLS integration, handles token refresh
**Impact**: Less custom code, tighter Supabase integration
## IMPORTANT DISCOVERIES
### Token Refresh Timing
Discovered tokens expire after 1 hour by default. Need to:
- Refresh proactively at 50 minutes
- Handle edge case of offline user
- Store refresh token securely
### RLS Row vs. Column Level
Supabase RLS is row-level only, not column-level.
For sensitive columns, need separate tables.
## CURRENT BLOCKERS
None currently. Auth flow is straightforward with Supabase.
## FILES MODIFIED
### Created
- lib/supabase/auth.ts (auth utilities)
- app/(auth)/login/page.tsx
- app/(auth)/signup/page.tsx
- components/auth/auth-provider.tsx
### Modified
- lib/supabase/client.ts (added auth hooks)
- middleware.ts (added auth middleware)
## QUICK RESUME
To continue this work:
1. Read this file (context.md) for current state
2. Check tasks.md for checklist
3. Refer to plan.md for overall strategy
4. Current file: lib/supabase/auth.ts
5. Next: Implement refreshToken() function
6. After that: Test token refresh flow
{task-name}-tasks.md - Actionable ChecklistPurpose: Granular, actionable tasks with acceptance criteria
Contains:
Update frequency: Daily or after completing tasks
Example:
# Authentication Implementation Tasks
## Phase 1: Supabase Setup ✅
- [x] Create Supabase project (Acceptance: Project created, credentials stored)
- [x] Enable Email auth provider (Acceptance: Can sign up via email)
- [x] Configure redirect URLs (Acceptance: Auth callbacks work locally + prod)
- [x] Add auth schema to database (Acceptance: Users table exists)
## Phase 2: Backend Auth 🟡
- [x] Create auth utilities (Acceptance: getUser(), signIn(), signUp() functions work)
- [ ] Implement token refresh **(IN PROGRESS)**
- Acceptance: Tokens refresh automatically before expiry
- Dependencies: Auth utilities complete
- Notes: Need to handle offline case
- [ ] Add auth middleware to Edge Functions
- Acceptance: Protected routes return 401 if not authenticated
- Dependencies: Token refresh working
- [ ] Create auth helper for server components
- Acceptance: Can check auth in Server Components
## Phase 3: Frontend Auth ⏳
- [x] Create auth context provider (Acceptance: Auth state available app-wide)
- [x] Build login page (Acceptance: Can log in with email/password)
- [x] Build signup page (Acceptance: Can create account)
- [ ] Add protected route wrapper
- Acceptance: Redirects to login if not authenticated
- Dependencies: Auth context complete
- [ ] Add loading states
- Acceptance: Shows loading spinner during auth checks
## Phase 4: Security 🔒
- [ ] Add RLS policies
- Acceptance: Users can only access their own data
- Files: supabase/migrations/xxx_rls_policies.sql
- [ ] Test auth edge cases
- Expired tokens
- Invalid tokens
- Network failures
- Concurrent sessions
## Phase 5: Migration 📦
- [ ] Create migration script for existing users
- [ ] Test migration locally
- [ ] Schedule maintenance window
- [ ] Execute migration in production
- [ ] Verify all users migrated successfully
The SESSION PROGRESS section is the most important part of context.md:
## SESSION PROGRESS (2025-01-15 14:30)
### ✅ COMPLETED
[What's done - be specific]
### 🟡 IN PROGRESS
[What you're working on RIGHT NOW]
### ⏳ PENDING
[What's coming next]
### 🚫 BLOCKED
[What's preventing progress - if any]
### 🎯 NEXT ACTION
[Specific next step with file + function]
DO ✅:
DON'T ❌:
| Event | Update SESSION PROGRESS? | |-------|-------------------------| | Completed a full task | ✅ Yes | | Significant decision made | ✅ Yes | | Discovered blocker | ✅ Yes | | Changed approach | ✅ Yes | | Switching to different task | ✅ Yes | | Minor code change | ❌ No | | Formatting/cleanup | ❌ No | | Reading code | ❌ No |
Always include this section in context.md:
## QUICK RESUME
To continue this work:
1. **Read**: This file (context.md) for current state
2. **Check**: tasks.md for detailed checklist
3. **Reference**: plan.md for overall strategy
4. **Current file**: [exact file path]
5. **Current function**: [exact function/component name]
6. **Next step**: [specific action to take]
7. **After that**: [following step]
8. **Expected time**: [estimate for next step]
### If Context is Stale (> 3 days old)
1. Verify current code state matches context
2. Check for changes by others (git log)
3. Update context.md before proceeding
✅ Features taking > 2 hours ✅ Multi-session work ✅ Complex implementations ✅ Work likely to be interrupted ✅ Team handoffs ✅ Refactorings affecting multiple files
⚠️ Simple bug fixes (< 30 min) ⚠️ Documentation updates ⚠️ Minor UI tweaks ⚠️ Configuration changes
❌ Trivial changes ❌ Automated tasks ❌ One-liner fixes
Rule of Thumb: If you might forget context after lunch, create a waypoint plan.
plans/
├── active/ # Current work
│ ├── auth-implementation/
│ │ ├── auth-implementation-plan.md
│ │ ├── auth-implementation-context.md
│ │ └── auth-implementation-tasks.md
│ ├── payments-integration/
│ │ ├── payments-integration-plan.md
│ │ ├── payments-integration-context.md
│ │ └── payments-integration-tasks.md
│ └── README.md # Active work index
├── archived/ # Completed work
│ └── [moved completed tasks]
└── templates/ # Templates for new tasks
├── template-plan.md
├── template-context.md
└── template-tasks.md
Pattern: {task-slug}-{type}.md
Examples:
auth-implementation-plan.mdauth-implementation-context.mdauth-implementation-tasks.mdtask-slug:
Good slugs:
auth-implementationstripe-paymentsuser-dashboardBad slugs:
feature (too generic)task-123 (meaningless)implement_new_authentication_system_with_jwt (too long)Provide these commands:
# Create new waypoint plan
/create-plan [task-name] # Creates 3-file structure
# Update existing waypoint
/update-context # Updates SESSION PROGRESS
# Resume work
/resume # Shows latest context + next action
/resume [task-name] # Resume specific task
# Archive completed work
/archive [task-name] # Moves to archived/
/create-plan CommandCreates the three-file structure automatically:
/create-plan auth-implementation
Creates:
- plans/active/auth-implementation/auth-implementation-plan.md
- plans/active/auth-implementation/auth-implementation-context.md
- plans/active/auth-implementation/auth-implementation-tasks.md
See the /create-plan command documentation for details.
/update-context CommandUpdates SESSION PROGRESS section with prompts:
/update-context
Prompts:
- What did you complete?
- What are you currently working on?
- What's the specific file/function?
- What's the next action?
- Any blockers?
/resume CommandDisplays context for quick resume:
/resume
Output:
📂 Resuming: auth-implementation
📋 CONTEXT SUMMARY:
- Last updated: 2 hours ago
- In progress: Implementing token refresh
✅ COMPLETED (3/8): ...
🟡 IN PROGRESS (1/8): ...
➡️ NEXT ACTION: Implement refreshToken() in lib/supabase/auth.ts
Context is stale if:
## Context Refresh Checklist
Before resuming stale context:
- [ ] Read current code in "current file"
- [ ] Check git log for changes since last update
- [ ] Verify IN PROGRESS task is actually in progress
- [ ] Update completed tasks
- [ ] Remove resolved blockers
- [ ] Update NEXT ACTION if changed
- [ ] Add note: "Context refreshed on [date]"
User: "Let's implement JWT authentication"
Claude: "I'll create a waypoint plan for this task"
/create-plan auth-implementation
Creates 3 files with:
- Plan: Overall strategy
- Context: Empty SESSION PROGRESS
- Tasks: Broken down checklist
After 2 hours of work:
## SESSION PROGRESS (2025-01-15 14:30)
### ✅ COMPLETED
- [x] Supabase Auth configured
- [x] Created auth utilities
### 🟡 IN PROGRESS
- [ ] Implementing login page
### 🎯 NEXT ACTION
Complete LoginForm component in app/(auth)/login/page.tsx
User: "Continue with authentication"
Claude: /resume
→ Shows SESSION PROGRESS
→ "You were implementing LoginForm component"
→ Continues seamlessly
Context reset happens (100K tokens)
User: "Continue with authentication"
Claude: /resume
→ Reads context.md
→ "I see you're implementing JWT auth"
→ "Last worked on: LoginForm component"
→ "Next action: Add form validation"
→ Continues without missing a beat
User: "Authentication is done"
Claude: Updates all tasks to completed
/archive auth-implementation
Moves files to:
plans/archived/auth-implementation/
Claude Code Waypoint Plugin enables:
Three-file structure:
Key section: SESSION PROGRESS in context.md
Commands: /create-plan, /update-context, /resume
Rule: If work takes > 2 hours or spans multiple sessions, create a waypoint plan!
Use this skill to make Claude Code resilient to context resets and interruptions.
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.