Agent skill
aget-check-sessions
Monitor sessions/ directory health. Detects date subdirectories (anomaly), counts files, validates naming conventions, and tracks disk usage. Returns health status.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/aget-check-sessions-aget-framework-template-worker-aget
SKILL.md
/aget-check-sessions
Monitor the health of the sessions/ directory by checking file organization, naming conventions, and disk usage.
Purpose
Provide self-diagnostic capability for AGET agents to assess their sessions directory health. Detects organizational anomalies like date-based subdirectories which indicate non-standard structure.
Execution
When invoked, perform these checks:
1. Structure Check
# Check for date subdirectories (anomaly indicator)
find sessions -type d -name "20[0-9][0-9]-*" 2>/dev/null | wc -l
# Check for checkpoints subdirectory (expected)
test -d sessions/checkpoints && echo "yes" || echo "no"
2. File Inventory
# Count session files (excluding checkpoints)
find sessions -maxdepth 1 -type f -name "*.md" | wc -l
# Count checkpoint files
find sessions/checkpoints -type f -name "*.yaml" 2>/dev/null | wc -l
3. Naming Convention Check
Valid session pattern: session_YYYY-MM-DD_*.md
# Count valid session names
find sessions -maxdepth 1 -type f -name "session_20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]_*.md" | wc -l
# Find non-conforming files
find sessions -maxdepth 1 -type f -name "*.md" ! -name "session_20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]_*.md"
4. Disk Usage
du -sh sessions
Thresholds
| Metric | OK | WARN | CRITICAL |
|---|---|---|---|
| Total files | <200 | 200-500 | >500 |
| Date subdirectories | 0 | 1+ (anomaly) | - |
| Disk size | <50MB | 50-100MB | >100MB |
Note: Thresholds inherited from supervisor defaults. Research AGET baseline (2026-02-08): 77 files, 544K.
Output Format
=== /aget-check-sessions ===
Directory: sessions/
Structure:
Date subdirectories: [count] (0 = OK, >0 = anomaly)
Checkpoints dir: [yes/no]
File Counts:
Session files: [count]
Checkpoints: [count]
Non-conforming: [count]
Disk Usage: [size]
Non-Conforming Files:
[list any files not matching expected patterns]
Health Status: [OK | WARN | CRITICAL]
Alerts:
[list any threshold violations or anomalies]
Health Status Logic
IF total_files > 500 OR disk > 100MB:
CRITICAL
ELIF total_files > 200 OR disk > 50MB OR date_subdirs > 0:
WARN
ELSE:
OK
Constraints
- C1: Read-only operation. Never modify files.
- C2: Date subdirectories are anomaly indicators, not errors.
- C3: Checkpoints subdirectory is expected and excluded from anomaly detection.
Related Skills
/aget-check-evolution- Evolution directory health/aget-check-kb- Knowledge base health/aget-save-state- Create checkpoints
Traceability
| Link | Reference |
|---|---|
| POC | POC-017 |
| Project | PROJECT_PLAN_AGET_UNIVERSAL_SKILLS.md |
| Source | Fleet Skill Deployment Report (supervisor) |
| Baseline | 77 files, 544K (2026-02-08) |
aget-check-sessions v1.0.0 Category: Monitoring POC-017 Phase 1
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?