/oh-my-daily-skills:tooyoung:cc-session-cleanerfrom oh-my-daily-skills
Inspects and deletes Claude Code session artifacts for the current project. Use to clean up session history shown by cc resume, selecting by index, sessionId, or title.
Ships in oh-my-daily-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Safely preview and delete project-scoped Claude Code session artifacts under ~/.claude/projects/<project-slug>/.
scripts/preview_sessions.py: parses .jsonl files and renders the selection table.scripts/delete_sessions.py: validates session IDs, removes the selected .jsonl and same-name attachment directory, then checks for residue.Use the scripts instead of reimplementing JSONL parsing or deletion.
--limit all only when requested.sessionId..jsonl and attachment directory paths.The only accepted confirmation phrases are 确认删除, 确认清理, confirm delete, or yes delete. A request containing “直接删” is still the initial request, not the second confirmation.
Claude Code project slugs have changed over time. Probe these exact transforms of the current absolute cwd and accept only existing directories:
/ with -. with --If none exists, list candidate directories under ~/.claude/projects/ and ask the user to identify the project. Do not fuzzy-match and delete.
python3 "${SKILL_DIR}/scripts/preview_sessions.py" \
"$PROJECT_DIR" \
--limit 30 \
--current-session-id "${CLAUDE_SESSION_ID:-}"
Optional exact-title filter:
python3 "${SKILL_DIR}/scripts/preview_sessions.py" "$PROJECT_DIR" --limit all --mark "待删除"
Present the script output as a rendered Markdown table with these columns: #, current, sessionId, title, mtime, size, first user prompt, recent user prompt.
Only IDs from the most recent preview are eligible. Normalize mixed indices and IDs back to sessionId values before confirmation.
Before deletion, show:
| sessionId | jsonl path | attachment dir | status |
|---|
If the current session is identifiable and selected, keep it in the table as 不可删除:当前会话, but exclude it from the command. Never infer the current session from title, mtime, or prompts.
After explicit second confirmation only:
python3 "${SKILL_DIR}/scripts/delete_sessions.py" \
"$PROJECT_DIR" sid1 sid2 \
--current-session-id "${CLAUDE_SESSION_ID:-}"
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (shiqkuangsan/oh-my-daily-skills) — no native marketplace selected
npx claudepluginhub p/shiqkuangsan-oh-my-daily-skills9 skills in this plugin
/tooyoung:blobity-cursorUse when adding or repairing Blobity cursor effects in HTML, React, Vue, or Astro, especially for theme-aware colors, tooltip mode, touch-device behavior, and SPA lifecycle cleanup./tooyoung:cc-featuresUse when the user asks what changed in Claude Code, requests release highlights for one or more versions, or wants updates since the running session. Triggers: Claude Code updates, cc features, Claude Code 新功能, Claude Code 更新./tooyoung:codex-featuresUse when the user asks what changed in OpenAI Codex, requests release highlights for versions or ranges, or wants updates since the installed Codex version. Triggers: Codex updates, Codex features, Codex 新功能, Codex 更新.Other plugins' skills for the same job