Archive
Claude Code skills for iterative plan review and execution.
npx -y skills add serbanghita/claude-code-plan-critique --skill archiveAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 11 stars11 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Archive a completed or abandoned plan for future reference
SKILL.md
3.9 KB, as published. Nobody here has run it
You are archiving the user's completed (or abandoned) plan for future reference.
To do this, follow these steps precisely:
- Read
.claude/plan-critique-config.jsonand getplansFolderpath from settings. If the file doesn't exist orplansFolderis not set: Respond with "No plans folder configured. Run/plan:createfirst to set up." - Get the Claude Code process ID by running:
echo $PPID. Store this assessionPID. - Clean up stale sessions: Scan
[plansFolder]/.sessions/for files. For each file named with a PID, check if that process is still running viakill -0 [PID] 2>/dev/null. If the command fails (process not running), delete that session file. This is non-blocking cleanup. - Read the current session's plan from
[plansFolder]/.sessions/[sessionPID]if it exists. Store assessionPlan. - Scan
[plansFolder]/for subdirectories (each subdirectory is a plan). Excludearchived/and.sessions/folders and any files, only list plan directories. If no plan folders exist: Respond with "No plans found. Nothing to archive." - Select the plan to archive:
- If
sessionPlanexists and matches a plan folder, auto-select it. Inform the user: "Using current session plan: [sessionPlan]" - Else if only one plan exists, auto-select it and inform user.
- Otherwise, ask the user to select a plan from the list.
Example:
Available plans: 1. add-user-authentication 2. refactor-database-layer 3. implement-caching Which plan would you like to archive? [1-3]
- If
- Check prerequisites. If
[plansFolder]/[selected-plan]/plan.mddoes not exist or is empty: Respond with "Nothing to archive. Plan file is missing or empty." - Ensure
[plansFolder]/archived/exists, create it if not. - Extract metadata:
- Read
plan.mdto get the plan title (first H1 heading). If no title, use folder name. - Read
critique.mdto get keywords (if available) - Read
execution-log.mdto get execution status (if available)
- Read
- Generate archive folder name using format:
YYYY-MM-DD_HH-MM-SS_[slug]/Example:2026-01-12_14-30-00_add-user-authentication/ - Create the archive folder at
[plansFolder]/archived/[folder-name]/ - Copy contents from
[plansFolder]/[selected-plan]/to the archive:- Include:
plan.md,execution-log.md(if exists), all other files (SQL, images, etc.) - Exclude:
critique.md,execution-state.json
- Include:
- Create
archive-info.mdin the archive folder using the format in archive-info-format.md. - Delete the original plan folder
[plansFolder]/[selected-plan]/entirely. - Clean up session references to the archived plan:
- Delete
[plansFolder]/.sessions/[sessionPID]if it contains the archived plan slug. - Scan all other session files and delete any that reference the archived plan (handles stale references).
- Delete
- Respond with confirmation:
Plan archived to: [plansFolder]/archived/[folder-name]/ The original plan folder has been removed. Create a new plan with `/plan:create`.
Notes:
- Never include critique.md in the archive (only keywords are preserved in archive-info.md)
- Always include the full original plan and all supporting files
- Include execution log only if the plan was executed
- Use current timestamp for the archive folder name
- Preserve the original file structure within the archived folder
- Always delete the original plan folder after archiving
- It is valid to archive a plan that was never executed (abandoned, reference, or superseded plans).
In this case, the execution status will be
NOT_EXECUTED.