session-cleanup

Automate scheduled cleanup of session files older than 7 days.

Updated May 23, 2026
One-click install
npx skills add https://github.com/zengbaocheng/hermes-tech-hub --skill session-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-cleanup
Source: https://github.com/zengbaocheng/hermes-tech-hub/tree/main/autonomous-ai-agents/session-cleanup
Command: npx skills add https://github.com/zengbaocheng/hermes-tech-hub --skill session-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

会话文件堆积、存量膨胀与管理复杂度增加,导致存储浪费和难以追溯。该 Skill 提供定期清理旧会话文件、保护最近7天的会话记录并向主系统汇报清理结果,降低人工运维成本并提升数据可控性。

Core Features & Use Cases

  • 定期自动清理:按照计划(每3天)清理超过7天的会话文件和大文件,以保持存储健康。
  • 安全保护:严格保护最近7天的会话、关键配置与数据,避免误删。
  • 汇报与审计:清理过程前后向主系统汇报结果,便于审计和追溯。

Quick Start

配置计划并让系统在每3天自动清理过期的会话文件,同时保留最近7天的数据。

Frequently Asked Questions about session-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate cleanup of old session files to prevent storage bloat?

Automate old session cleanup by scheduling a recurring task that deletes files exceeding a 7-day retention window. This approach prunes large files and prevents storage bloat while keeping the system responsive and preserving recent session logs.

What is the safest way to delete old chat logs without losing recent data?

The safest session cleanup method uses a retention window that strictly protects the most recent 7 days of chat logs. It also guards critical configurations and files, ensuring only expired ephemeral interactions are pruned.

Can I set up a cron job to automatically prune large session files every few days?

Yes, you can configure a scheduled cron job to run every 3 days for automatic session cleanup. This task prunes large files and old sessions exceeding the 7-day retention window while protecting critical data from deletion.

Does automated session cleanup offer reporting or auditing for deleted files?

Automated session cleanup provides reporting by sending results to the main system before and after the deletion process. This creates an audit trail for tracking which expired files and large data were pruned.

What happens to critical configurations during an automated session file cleanup?

During automated session cleanup, critical configurations and files are strictly protected from deletion. The process implements safety guards that only target old files and large data exceeding the 7-day retention window.