agentleFS
Tjm-1116Tjm-1116/claude-code-memory/skills/clean-memory/SKILL.md

clean-memory

Skill1 starsChanged 7 months agoMITView on GitHub

Delete old Claude Code conversation transcripts. Use this skill when the user says "clean-memory", "清理记忆", "删除旧会话", "clean memory", or "清除对话记录". This skill lists all saved sessions for the current project and lets the user choose which ones to delete. Do NOT use for anything other than deleting transcripts.

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. nklisch/skills★ 8same name
    2. letsloose501/sqs-agent-memory★ 2same name
    3. psw7205/skills★ 1same 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 repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Delete old conversation transcripts from the current project.

    line 13
  2. Distinctive:

    Ask the user which to delete:

    line 28
  3. Distinctive:

    Delete and report how much space was freed

    line 33
  4. Distinctive:

    Always confirm before deleting

    line 50
  5. Distinctive:

    Never delete the CURRENT session's transcript

    line 51
  6. Distinctive:

    Never delete transcripts from OTHER projects unless user explicitly asks

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Clean Memory

Delete old conversation transcripts from the current project.

Storage location

Transcripts are .jsonl files stored in:

~/.claude/projects/<project-slug>/

Find the current project slug by converting the working directory path: replace /, \, : with -.

Procedure

  1. List all .jsonl files in the project directory, sorted by modification time (newest first)
  2. Show each with: date, size, session ID (first 8 chars)
  3. Ask the user which to delete:
    • Specific numbers (e.g., "1 3 5")
    • "all" to delete everything
    • "old" to delete sessions older than 30 days
  4. Confirm before deleting
  5. Delete and report how much space was freed

Example output

📁 当前项目: Dog (24 个会话, 13MB)

  1. 29dc3c15...  2026-04-30 13:07  1.2M  ← 今天
  2. 5f41e9ba...  2026-04-29 15:40  1.1M
  3. be7b6309...  2026-04-24 00:43  1.2M
  ...

删除哪些?(输入编号 / "old" 删除30天前的 / "all" 全部 / "0" 取消)

Safety rules

  • Always confirm before deleting
  • Never delete the CURRENT session's transcript
  • Never delete transcripts from OTHER projects unless user explicitly asks
  • Show freed space after deletion

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.