원클릭으로
cmd-prune
Remove stale session files from the workspace sessions/ directory older than a given age.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Remove stale session files from the workspace sessions/ directory older than a given age.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | cmd_prune |
| description | Remove stale session files from the workspace sessions/ directory older than a given age. |
| user-invocable | true |
| origin | openclaw-mas |
| argument-hint | <project-path> [--max-age N] [--dry-run] |
The first argument is the project path. Before doing anything else:
Removes old session files from ~/.openclaw/workspace-main/sessions/ that are
older than the specified age threshold. Helps keep the workspace tidy.
/skill cmd_prune <project-path> # Delete sessions older than 30 days
/skill cmd_prune <project-path> --max-age 60 # Custom age threshold (days)
/skill cmd_prune <project-path> --dry-run # Preview without deleting
--max-age <N> — age threshold in days (default: 30)--dry-run — show what would be deleted without deletingDetermine the sessions directory: ~/.openclaw/workspace-main/sessions/
If it does not exist or is empty, report: "No sessions found." Stop.
Parse --max-age from arguments (default: 30 days).
List all *.md files in the sessions directory and check their modification time:
find ~/.openclaw/workspace-main/sessions/ -name "*.md" -mtime +<max-age>
If no files match, report: "No sessions older than days found." Stop.
Show the files that would be deleted:
Sessions to delete (<count>, older than <max-age> days):
- session-2026-01-01.md (modified: 2026-01-01)
- session-2026-01-15.md (modified: 2026-01-15)
If --dry-run is set, stop here.
Ask: "Delete session files? (yes/no)" If the user declines, stop.
Delete the files:
find ~/.openclaw/workspace-main/sessions/ -name "*.md" -mtime +<max-age> -delete
Report:
Pruned <count> session files older than <max-age> days.
Sessions directory: ~/.openclaw/workspace-main/sessions/
Scan installed skills to extract cross-cutting principles and distill them into rules — append, revise, or create new rule files.
Audit all installed OpenClaw skills for quality: content overlap, freshness, and uniqueness. Supports Quick Scan (changed only) and Full Stocktake modes.
Cluster MEMORY.md entries by theme and optionally generate SKILL.md drafts.
Export MEMORY.md to a timestamped markdown file for sharing or backup.
Import memory entries from a markdown export file, merging with MEMORY.md without duplicating.
Show current workspace memory: MEMORY.md contents, pending recalls, and index status.