Skip to content
Back to skills

Resume

ASecurity

Restore previous session state

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
developmentbashgit

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add jhlee0409/all-for-claudecode --skill resume --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Resume?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Resume
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jhlee0409-resume/badge)](https://www.skillsdirectory.com/skills/jhlee0409-resume)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: afc:resume
description: "Restore previous session state"
argument-hint: "[no arguments]"
model: sonnet
allowed-tools:
  - Read
  - Glob
  - Bash
---

# /afc:resume — Restore Session

> Restores the previous session state from .claude/afc/memory/checkpoint.md and resumes work.

## Arguments

- `$ARGUMENTS` — (optional) none

## Checkpoint State (auto-loaded)

!`cat .claude/afc/memory/checkpoint.md 2>/dev/null || echo "[NO_CHECKPOINT]"`

## Execution Steps

### 1. Load Checkpoint

Use the pre-fetched checkpoint above. If it shows `[NO_CHECKPOINT]`:
- Check auto-memory fallback: read `~/.claude/projects/{ENCODED_PATH}/memory/checkpoint.md`
- If fallback also not found: output "No saved checkpoint found." then **stop**

If checkpoint data was pre-fetched successfully:
parse the full contents (extract branch, commit hash, pipeline feature, task progress, modified files).

### 2. Validate Environment

Compare the checkpoint state against the current environment:

1. **Branch check**: Does the checkpoint branch match the current branch?
   - If different: warn + suggest switching
2. **File state**: Have any files changed since the checkpoint?
   - First verify HEAD exists: `git rev-parse --verify HEAD 2>/dev/null`
     - If HEAD does not exist (empty repo / no commits): report "No commits yet — cannot check changes since checkpoint." and skip this check
   - If checkpoint hash is present and non-empty: `git log {checkpoint hash}..HEAD --oneline`
   - If checkpoint hash is empty or missing: report "Checkpoint has no git reference — cannot diff." and skip this check
3. **Feature directory**: Does .claude/afc/specs/{feature}/ still exist?

### 3. Report State

```markdown
## Session Restore

### Previous Checkpoint
- **Saved at**: {time}
- **Message**: {checkpoint message}
- **Branch**: {branch} {(matches current ✓ / differs ⚠)}

### Active Features
| Feature | Status | Progress |
|---------|--------|----------|
| {name} | {status} | {progress} |

### Changes Since Checkpoint
{list of new commits if any, or "No changes"}

### Incomplete Work
{incomplete work list from checkpoint.md}

### Recommended Next Steps
{recommended commands based on state}
- Tasks in progress → resume `/afc:implement`
- Plan complete → `/afc:implement` (tasks generated automatically at start)
- Spec only → `/afc:plan`
```

### 4. Final Output

```
Session restored
├─ Checkpoint: {time}
├─ Feature: {name} ({status})
├─ Progress: {completed}/{total}
└─ Recommended: {next command}
```

## Notes

- **Read-only**: Does not modify the environment (branch switching is suggested only; user must confirm).
- **Mismatch warning**: Clearly warn if checkpoint and current environment differ.
- **Context restore**: Always display the "Context Notes" from the checkpoint to aid memory.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.