Agent skill
archive-cleanup
Automatically archive old documents from active/daily/ to archive/ based on file age. Archives files older than specified days into archive/YYYY-MM/ directories.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/archive-cleanup
SKILL.md
Archive Cleanup Skill
Archive old documents to keep active workspace clean.
Usage
# Basic usage (current directory)
bash scripts/archive-cleanup.sh
# With custom workspace
WORKSPACE_DIR=/path/to/workspace bash scripts/archive-cleanup.sh
# With custom age threshold (days)
ARCHIVE_AGE_DAYS=14 bash scripts/archive-cleanup.sh
# Full customization
WORKSPACE_DIR=/data ARCHIVE_AGE_DAYS=30 DAILY_DIR=notes ARCHIVE_DIR=backup bash scripts/archive-cleanup.sh
Environment Variables
| Variable | Default | Description |
|---|---|---|
WORKSPACE_DIR |
. (current directory) |
Base workspace directory |
DAILY_DIR |
active/daily |
Source directory to scan |
ARCHIVE_DIR |
archive |
Target archive directory |
ARCHIVE_AGE_DAYS |
7 |
Days before archiving |
Archive Logic
- Scans
$DAILY_DIRfor*.mdfiles - Archives files modified more than
$ARCHIVE_AGE_DAYSdays ago - Organizes archives into
$ARCHIVE_DIR/YYYY-MM/based on filename date
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?