tao12345666333/ankaloop/session-cleanup
Claude Code and agent skill by tao12345666333/ankaloop
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Backup old AnkaLoop sessions by renaming with execution date, then clean and compact sessions and memory.
Install
npx vskill@latest install tao12345666333/ankaloop/session-cleanupSKILL.md
Session Cleanup
Backup old AnkaLoop sessions by renaming with execution date, then clean and compact sessions and memory to keep the system efficient.
What to Clean
- Session files backup: Rename session JSON files in
~/.config/ankaloop/sessions/that haven't been modified in 30+ days toYYYY-MM-DD_<original_name>.json.bak - Active sessions keep: Keep the most recent 10 session files (by modification time) as active
- Memory compaction: Compact
~/.config/ankaloop/memory/HISTORY.mdto keep only the last 50 entries
Procedure
Step 1: Backup Old Sessions
- List all
.jsonfiles in~/.config/ankaloop/sessions/directory - Get modification time of each file
- Sort by modification time (oldest first)
- Keep the 10 most recent files as active
- For files older than 30 days (or beyond the 10 most recent):
- Rename to
YYYY-MM-DD_<original_name>.json.bakwhere YYYY-MM-DD is the current execution date - Move to a
backups/subdirectory within sessions folder
Step 2: Clean Backup Files
- Remove
.bakbackup files older than 90 days to free space - Report: "Backed up N session files, cleaned M old backups, freed X MB"
Step 3: Compact Memory
- Read
~/.config/ankaloop/memory/HISTORY.md - Count the number of entries (each
-bullet is an entry) - If more than 50 entries, keep only the last 50 entries
- Add a summary entry at the top: "Compacted from X entries to 50 entries on YYYY-MM-DD"
Safety
- Never delete the currently active session (most recent)
- Only delete
.jsonand.bakfiles (not directories or other file types) - Always create backups before any cleanup operation
- Log each operation for audit trail
Example Output
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/ankaloop/builtin_skills/session-cleanup/SKILL.md
Popularity
- 7-day trend score
- 5
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
[](https://verified-skill.com/skills/tao12345666333/ankaloop/session-cleanup)