plan-archivelisted
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 `.copilot/plan-critique-config.json` and get `plansFolder` path from settings. If that file does not
exist, read `.claude/plan-critique-config.json` instead.
If neither file exists or `plansFolder` is not set:
Respond with "No plans folder configured. Run `/plan-create` first to set up."
2. Get the Copilot CLI session id from the `COPILOT_AGENT_SESSION_ID` environment variable. Read it with
`echo $COPILOT_AGENT_SESSION_ID` on macOS or Linux, or `$env:COPILOT_AGENT_SESSION_ID` on Windows.
If the variable is empty, use the literal value `default` instead. Store this as `sessionId`.
3. Clean up stale sessions: scan `[plansFolder]/.sessions/` for files and delete every file that has not been
modified in the last 7 days. This is non-blocking cleanup, never abort the run because of it.
4. Read the current session's plan from `[plansFolder]/.sessions/[sessionId]` 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