← ClaudeAtlas

archivelisted

Archive a completed or abandoned plan for future reference
serbanghita/claude-code-plan-critique · ★ 13 · Code & Development · score 77
Install: claude install-skill serbanghita/claude-code-plan-critique
You are archiving the user's completed (or abandoned) plan for future reference. To do this, follow these steps precisely: 1. Read `.claude/plan-critique-config.json` and get `plansFolder` path from settings. If the file doesn't exist or `plansFolder` is not set: Respond with "No plans folder configured. Run `/plan:create` first to set up." 2. Get the Claude Code process ID by running: `echo $PPID`. Store this as `sessionPID`. 3. Clean up stale sessions: Scan `[plansFolder]/.sessions/` for files. For each file named with a PID, check if that process is still running via `kill -0 [PID] 2>/dev/null`. If the command fails (process not running), delete that session file. This is non-blocking cleanup. 4. Read the current session's plan from `[plansFolder]/.sessions/[sessionPID]` if it exists. Store as `sessionPlan`. 5. Scan `[plansFolder]/` for subdirectories (each subdirectory is a plan). Exclude `archived/` and `.sessions/` folders and any files, only list plan directories. If no plan folders exist: Respond with "No plans found. Nothing to archive." 6. Select the plan to archive: - If `sessionPlan` exists 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. imp