From cc-aid
Create clean task checkpoint and persist to local memory for session continuity
How this skill is triggered — by the user, by Claude, or both
Slash command
/cc-aid:session-checkpointThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a coding task memory manager.
You are a coding task memory manager.
Goal: Create a clean checkpoint of the current task and persist it locally WITHOUT polluting the git repository.
This skill enables clean session handoffs by distilling complex conversations into high-signal state that can be resumed instantly.
Invoke this skill when:
/session-checkpointAnalyze the full session context and extract ONLY high-signal information.
Critical: Read recent conversation history, files changed, commands executed, errors encountered, and decisions made.
Output in this exact format:
# TASK
[One sentence describing the final objective]
# DONE
- [Completed work item 1 - verified]
- [Completed work item 2 - verified]
- [Completed work item 3 - verified]
# DECISIONS
- [Technical decision 1 and reasoning]
- [Technical decision 2 and reasoning]
- [Architecture choice made]
# FAILED
- [Approach 1 that didn't work - why it failed]
- [Approach 2 that was abandoned - root cause]
- [Dead end 3 - what was learned]
# CURRENT BLOCKER
[Current issue blocking progress - be specific]
OR
[No blocker - ready for next action]
# NEXT ACTION
[Single, concrete next step to execute]
# FILES / CONTEXT
## Changed Files
- path/to/file1.go
- path/to/file2.yaml
## Relevant Context
- PR: owner/repo#123
- Branch: feature/xyz
- Issue: JIRA-456
- Logs: /path/to/relevant.log
- Command: `specific command used`
## Key Variables/IDs
- cluster: <cluster-name>
- namespace: <namespace>
- pod: <pod-name>
Quality Criteria:
✓ Concise: Remove duplicated reasoning and verbose explanations ✓ High-signal: Include only information needed to resume work ✓ Actionable: NEXT ACTION must be immediately executable ✓ Complete: Capture all failed attempts to prevent repetition ✓ Specific: Use concrete file paths, commands, error messages
❌ Avoid:
CRITICAL: Save the checkpoint to the local ephemeral AI memory directory.
Location:
.ai-session/STATE.md
Rules:
Create directory .ai-session/ if it doesn't exist:
mkdir -p .ai-session
Write checkpoint to .ai-session/STATE.md using the Write tool
DO NOT modify any existing project source files
DO NOT place files outside .ai-session/
Add to .gitignore if not already present:
grep -q ".ai-session" .gitignore || echo ".ai-session/" >> .gitignore
Why .ai-session/?
rm -rf .ai-session)After successfully saving, print exactly:
=== CHECKPOINT SAVED ===
Location: .ai-session/STATE.md
To continue in a clean session, run:
claude "Read .ai-session/STATE.md and continue from NEXT ACTION only. Ignore anything not in the file."
Or use:
/session-init
To view checkpoint:
cat .ai-session/STATE.md
Optionally add a timestamp header to STATE.md:
---
checkpoint_time: 2026-04-01T12:34:56Z
session_duration: 45m
---
If .ai-session/STATE.md already exists, backup the old version:
if [ -f .ai-session/STATE.md ]; then
cp .ai-session/STATE.md .ai-session/STATE.backup.md
fi
After saving, suggest to the user:
Tip: Consider creating a hook to auto-checkpoint before long operations:
{ "hooks": { "before_git_push": "claude /session-checkpoint" } }
When the user wants to resume from a checkpoint, they can use:
/session-init
Which should:
.ai-session/STATE.mdCheckpoint saved to .ai-session/STATE.md:
# TASK
Debug pod crash loop in namespace openshift-ovn-kubernetes
# DONE
- Identified crashlooping pod: ovnkube-node-abc123
- Extracted logs showing "certificate has expired"
- Verified service account exists and RBAC is correct
- Confirmed issue is token expiration, not permissions
# DECISIONS
- Use projected token volumes (K8s 1.20+) instead of legacy service account token
- Update DaemonSet to mount token with 1h expiration and auto-rotation
- No manual pod deletion needed - DaemonSet will handle rollout
# FAILED
- Tried deleting pod manually - didn't fix root cause, pod recreated with same issue
- Attempted RBAC fix - not the problem, token expiration is the issue
- Checked API server connectivity - not a network issue
# CURRENT BLOCKER
No blocker - ready to implement fix
# NEXT ACTION
Edit DaemonSet manifest to add projected service account token volume with 1h TTL
# FILES / CONTEXT
## Changed Files
- None yet
## Relevant Context
- Namespace: openshift-ovn-kubernetes
- Pod: ovnkube-node-abc123
- DaemonSet: ovnkube-node
- Error: "Unable to authenticate the request" (401)
- Logs: /tmp/ovnkube-node.log
## Key Variables/IDs
- cluster: <cluster-name>
- sa: ovnkube-node
Resume command:
claude "Read .ai-session/STATE.md and continue from NEXT ACTION only."
Checkpoint saved to .ai-session/STATE.md:
# TASK
Remove unused Go dependency github.com/unused/package from vendor
# DONE
- Verified package appears unused via `go mod why` (returns "main module does not need package")
- Ran `make build` - build SUCCEEDS despite go mod why claim
- Grepped vendor/ - package IS present in vendor/github.com/transitive/dep/
# DECISIONS
- Never trust `go mod why` alone for vendored dependencies
- Always verify removal with actual build
- Use `go mod graph | grep package` for transitive dependency check
# FAILED
- Removed from go.mod and ran `go mod tidy` - build FAILED
- `go mod why` gave false negative - package IS needed transitively
# CURRENT BLOCKER
Cannot safely remove dependency - it's a transitive dependency required by vendor/github.com/transitive/dep/
# NEXT ACTION
Document this false positive pattern and close the issue - dependency is actually required
# FILES / CONTEXT
## Changed Files
- None (reverted changes)
## Relevant Context
- Package: github.com/unused/package
- False positive: `go mod why` returned "(main module does not need package)"
- Actual usage: vendor/github.com/transitive/dep/ imports it
- Build command: `make build`
Before saving, verify:
Relationship to /session-postmortem:
/session-checkpoint = mid-task state preservation/session-postmortem = completed task knowledge extractionWorkflow:
/session-checkpoint to save state/session-postmortem to extract patterns/session-init to continueWhen to use which:
/session-checkpoint when pausing work (lunch, end of day, context switch)/session-postmortem when task is complete and you want to capture learningsThis is NOT:
This IS:
Keep it concise, concrete, and continuation-ready.
npx claudepluginhub wangke19/my-claude-skills --plugin cc-aidCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.