homedir/.claude/skills/prune-sessions/SKILL.md
List and delete old Claude Code sessions. Shows all sessions with dates and summaries, and lets the user pick which ones to remove.
npx skillsauth add joncol/dotfiles prune-sessionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Prune old Claude Code sessions for the current project.
Find the sessions index for the current project directory:
~/.claude/projects/<encoded-project-path>/sessions-index.json
where <encoded-project-path> is the project path with / replaced by - (e.g. /home/jco/work/scrive/kontrakcja becomes -home-jco-work-scrive-kontrakcja).
Read the file and parse the entries array.
Display a numbered table of all sessions, sorted by modified date (most recent last). For each session show:
modified, formatted as YYYY-MM-DD HH:MM)firstPrompt truncated to 60 chars if no summary)Format as a markdown table for readability.
Ask the user which sessions to delete. Accept:
1, 3, 51-101-5, 8, 12-15all to delete everythingolder than N days to delete sessions older than N daysUse free-text input (AskUserQuestion with an "Other" option) to let the user specify flexibly.
Show a confirmation listing the sessions that will be deleted (number, date, and first prompt) along with total count and size. Ask the user to explicitly confirm before proceeding. Do NOT delete anything until the user confirms.
Delete the selected sessions. For each session:
.jsonl file at fullPath (if it exists).jsonl) if it existssessions-index.jsonWrite the updated sessions-index.json back to disk.
Report how many sessions were deleted and how much disk space was freed.
tools
Copy the last code snippet or message to the system clipboard
data-ai
Review a PR by comparing the Jira ticket requirements against the actual implementation. Only use when working in a project whose path contains "kontrakcja".
documentation
Fetch and display GitHub PR review comments for the current branch or a given PR number. Only use when working in a project whose path contains "kontrakcja".
data-ai
Fetch Jira issue details for the current branch or a given issue key. Only use when working in a project whose path contains "kontrakcja".