context-savelisted
Install: claude install-skill manastalukdar/ai-devstudio
# Context Save
I'll snapshot your current work-in-progress into a named git WIP commit so you can switch tasks safely and pick up exactly where you left off. Inspired by gstack's context-save skill.
## Token Optimization
**Expected range**: 100–250 tokens
**Patterns used**: Bash git commands, early exit (clean working tree)
**Early exit**: If the working tree is already clean, report it and stop.
## Usage
```bash
/context-save # auto-name from branch and timestamp
/context-save "halfway through auth" # descriptive label
```
## Step 1 — Check Working Tree
```bash
# Verify there is something to save
if git diff --quiet && git diff --cached --quiet; then
echo "✓ Working tree is clean — nothing to save"
exit 0
fi
# Show what will be saved
echo "Changes to save:"
git status --short
git stash list | head -3
```
## Step 2 — Stage Everything
```bash
# Stage all changes (tracked and untracked) for the WIP commit
git add -A
# Verify staging
git diff --cached --stat
```
## Step 3 — Create WIP Commit
```bash
BRANCH=$(git rev-parse --abbrev-ref HEAD)
TIMESTAMP=$(date '+%Y-%m-%d %H:%M')
LABEL="${1:-WIP}"
git commit -m "wip: ${LABEL} [${BRANCH}] ${TIMESTAMP}"
```
The commit message format: `wip: <label> [<branch>] <timestamp>`
Example: `wip: halfway through auth [feature/oauth] 2026-04-27 14:32`
## Step 4 — Confirm Save
```
Context saved — wip: halfway through auth [feature/oauth] 2026-04-27 14:32
3 files staged, 127 additions, 34 delet