indigoai-us/hq-pack-archive-stale-chats/archive-stale-chats

Claude Code and agent skill by indigoai-us/hq-pack-archive-stale-chats

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Archive Claude Code chat sessions that haven't been used in the last N days (default 2). Lists sessions, surfaces decisions (open PRs, directory scope), re-pulls fresh IDs, then archives in batches with confirmation. Use when asked to "archive old chats", "clean up unused chats/sessions", or "archive chats not used in X days".

Install

npx vskill@latest install indigoai-us/hq-pack-archive-stale-chats/archive-stale-chats

SKILL.md

/archive-stale-chats — Archive inactive Claude Code chats

Archive Claude Code (CCD) chat sessions that have gone quiet, so the sidebar only shows recent work. Archived chats are not deleted — they move to the Archived list and can be reopened anytime.

When to use

  • "Archive any chats not used in the last 2 days"
  • "Clean up my old / unused chats"
  • "Archive everything except <these>"

Inputs

  • Window — default 2 days. Honor any threshold the user gives ("a week", "3 days").
  • Scope (optional) — only chats whose cwd is under a given directory.
  • Exceptions (optional) — chats to keep regardless, named by the user.

Tools

  • mcp__ccd_session_mgmt__list_sessions — list sessions. The **current session is

always excluded** from results, so it can never be archived by accident.

  • mcp__ccd_session_mgmt__archive_session — archive one session by sessionId.

Procedure

  1. List. Call list_sessions with a high limit (e.g. 200) and

include_archived: false. Each row has sessionId, title, cwd, isRunning, lastActivityAt, and sometimes prNumber / prState.

  1. Compute the cutoff. cutoff = now − window. A session is stale if its

lastActivityAt is older than the cutoff. Treat the boundary day inclusively unless the user is precise about hours.

  1. Split keep vs archive. Keep:
  • anything newer than the cutoff,
  • isRunning: true sessions,
  • any explicit user exceptions.

If a scope was given, only consider sessions whose cwd is under that path, and explicitly flag the ones you're skipping because they live elsewhere.

  1. Surface decisions before archiving (one clear prompt, plain language):
  • Sessions with an open PR (prState: "OPEN"): archiving stops the session

and cleans up its git worktree. Default to keeping these unless told otherwise.

  • State the total count, and warn that **each archive needs its own confirmation

click — there is no bulk archive, and `archive_session` is unavailable in unsupervised / auto-accept (bypass-permissions) mode** (it will error with "requires user approval"). If that happens, ask the user to switch to a supervised mode and resume.

  1. Re-list immediately before archiving. Pull a fresh list_sessions and copy

each sessionId directly from that output. Do not retype IDs from an older message — sessionIds are long UUIDs and a single wrong character fails with "Session not found." A fresh list also drops anything already archived.

  1. Archive in batches of ~15–20 per message. For each, call archive_session

with the sessionId and a short reason (e.g. "Inactive 2+ days — <title>"). Never pass the current session's id (it won't be in the list anyway).

  1. Verify. After the batches, call list_sessions once more and confirm only

the intended keepers remain. Report how many were archived and what was kept.

Notes

  • Archiving is reversible — reopen from the Archived list. It stops the

session process and, by default, removes that session's git worktree.

  • For recurring cleanup tied to PRs, point the user at the **"Auto-archive on PR

close"** preference in Settings instead of running this repeatedly.

  • Sidebar groups are a separate, UI-only feature — this skill does not touch

them.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/indigoai-us/hq-pack-archive-stale-chats/archive-stale-chats/badge)](https://verified-skill.com/skills/indigoai-us/hq-pack-archive-stale-chats/archive-stale-chats)

Something wrong with this skill or its page? Tell us.