memory-inspectlisted
Install: claude install-skill fjpulidop/specrails-core
Inspect agent memory directories under `.claude/agent-memory/sr-*/` for **this project** (read name from CLAUDE.md or package.json). Show per-agent stats, recent entries, and actionable recommendations.
**Input:** `$ARGUMENTS` — optional:
- `<agent-name>` — inspect a specific agent's memory (e.g. `sr-developer`, `sr-reviewer`)
- `--stale <days>` — flag files not modified in more than N days as stale (default: 30)
- `--prune` — delete stale files after confirmation (prints the list first, then asks)
---
## Phase 0: Argument Parsing
Parse `$ARGUMENTS` to set runtime variables.
**Variables to set:**
- `AGENT_FILTER` — string or empty string. Default: `""` (inspect all agents).
- `STALE_DAYS` — integer. Default: `30`.
- `PRUNE_MODE` — boolean. Default: `false`.
**Parsing rules:**
1. Scan `$ARGUMENTS` for `--stale <N>`. If found, set `STALE_DAYS=<N>`. Validate that `<N>` is a positive integer; if not, print `Error: --stale requires a positive integer (e.g. --stale 14)` and stop. Strip from arguments.
2. Scan for `--prune`. If found, set `PRUNE_MODE=true`. Strip from arguments.
3. Remaining non-flag text (if any) is treated as `AGENT_FILTER`. Strip leading/trailing whitespace.
**Print active configuration:**
```
Scanning: <all agents | agent: AGENT_FILTER> | Stale threshold: STALE_DAYS days | Prune: yes/no
```
---
## Phase 1: Discover Memory Directories
Glob all directories matching `.claude/agent-memory/sr-*/`.
If no directories are found:
```
No agent memory directo