agentleFS
serbanghitaserbanghita/plan-critique-skills/skills/plan-archive/SKILL.md

plan-archive

Skill13 starsChanged 14 days agoMITView on GitHub

Archive a completed or abandoned plan for future reference. Use when the user runs /plan-archive or asks to archive a finished plan.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. ashe-li/agent-skills★ 2same name
    2. davidsimoes/claude-skills-shared★ 2same name
    3. arndvs/ctrlshft★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 5 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check the active agent's config file first (.codex/plan-critique-config.json for Codex, .claude/plan-critique-config.json for Claude Code, …

    line 21
  2. Very specific:

    Read the current session's plan from [plansFolder]/.sessions/[sessionId] if it exists.

    line 34
  3. Distinctive:

    If no plan folders exist: Respond with "No plans found.

    line 37
  4. Very specific:

    If sessionPlan exists and matches a plan folder, auto-select it.

    line 39
  5. Very specific:

    Check prerequisites. If [plansFolder]/[selected-plan]/plan.md does not exist or is empty: Respond with "Nothing to archive.

    line 52
  6. Very specific:

    Ensure [plansFolder]/archived/ exists, create it if not.

    line 54
  7. Very specific:

    Read plan.md to get the plan title (first H1 heading).

    line 56
  8. Very specific:

    Read critique.md to get keywords (if available)

    line 57
  9. Very specific:

    Read execution-log.md to get execution status (if available)

    line 58
  10. Very specific:

    Create the archive folder at [plansFolder]/archived/[folder-name]/

    line 61
  11. Very specific:

    Create archive-info.md in the archive folder using archive-info-format.md.

    line 65
  12. Very specific:

    Delete the original plan folder [plansFolder]/[selected-plan]/ entirely.

    line 66
  13. Very specific:

    Delete [plansFolder]/.sessions/[sessionId] if it contains the archived plan slug.

    line 68
  14. Distinctive:

    Never include critique.md in the archive (only keywords are preserved in archive-info.md)

    line 80
  15. Distinctive:

    Always include the full original plan and all supporting files

    line 81
  16. Distinctive:

    Use current timestamp for the archive folder name

    line 83
  17. Distinctive:

    Always delete the original plan folder after archiving

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

On Codex, invoke skills with $skill-name (for example, $plan-create). Use that form when giving Codex commands; other clients use /skill-name.

You are archiving the user's completed (or abandoned) plan for future reference.

To do this, follow these steps precisely:

  1. Resolve plansFolder from config: Check the active agent's config file first (.codex/plan-critique-config.json for Codex, .claude/plan-critique-config.json for Claude Code, .gemini/plan-critique-config.json for Agy/Gemini, or .copilot/plan-critique-config.json for Copilot CLI), falling back to reading the other agent configs. If no config exists or plansFolder is not set or is empty: Respond with "No plans folder configured. Run /plan-create first to set up."
  2. Get the active session id:
    • On Copilot CLI (or when COPILOT_AGENT_SESSION_ID is set): read COPILOT_AGENT_SESSION_ID via echo $COPILOT_AGENT_SESSION_ID (macOS/Linux) or $env:COPILOT_AGENT_SESSION_ID (Windows); if empty, use the literal value default. Store as sessionId.
    • Otherwise (Codex, Claude Code / Agy): run echo $PPID and store as sessionId.
  3. Clean up stale sessions in [plansFolder]/.sessions/ (non-blocking, never abort because of cleanup):
    • For numeric PID filenames, check kill -0 [PID] 2>/dev/null and delete if the process is no longer running.
    • For non-PID session files (e.g. default or UUIDs), delete files not modified in the last 7 days.
  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 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]
  7. Check prerequisites. If [plansFolder]/[selected-plan]/plan.md does not exist or is empty: Respond with "Nothing to archive. Plan file is missing or empty."
  8. Ensure [plansFolder]/archived/ exists, create it if not.
  9. Extract metadata:
    • Read plan.md to get the plan title (first H1 heading). If no title, use folder name.
    • Read critique.md to get keywords (if available)
    • Read execution-log.md to get execution status (if available)
  10. Generate archive folder name using format: YYYY-MM-DD_HH-MM-SS_[slug]/ Example: 2026-01-12_14-30-00_add-user-authentication/
  11. Create the archive folder at [plansFolder]/archived/[folder-name]/
  12. 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
  13. Create archive-info.md in the archive folder using archive-info-format.md.
  14. Delete the original plan folder [plansFolder]/[selected-plan]/ entirely.
  15. Clean up session references to the archived plan:
    • Delete [plansFolder]/.sessions/[sessionId] if it contains the archived plan slug.
    • Scan all other session files and delete any that reference the archived plan (handles stale references).
  16. 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.