agent-insightslisted
Install: claude install-skill kevinlin/skills
# agent-insights
Cross-tool version of Claude Code's builtin `/insights`. Everything runs locally;
no session data leaves the machine.
`SKILL_DIR` below means this skill's directory; `SCRIPT` means
`python3 <SKILL_DIR>/scripts/agent_insights.py`. All intermediate files live in
`~/.agent-insights/` (override with `--data-dir` on every subcommand, e.g. for tests).
## Arguments
One optional argument: number of days to analyze. Default 30, clamp to 1..365.
Non-numeric input: tell the user, then proceed with 30.
## Pipeline
### Step 0 — Detect runtime
```bash
SCRIPT detect
```
Detects whether this skill is running on the host machine (where the user's agent logs
live) or inside a **sandboxed runtime** such as Claude Cowork, whose Bubblewrap container
does not mount the host filesystem. Reads the JSON result:
- If `sandboxed` is `false`, continue to Step 1.
- If `sandboxed` is `true`, the host machine's agent log directories are **not reachable**
from this runtime. Do **not** run a full report from here: it would be empty or cover
only the sandbox's own session. Instead, tell the user:
- the detected `runtime` and `confidence`, and the `signals` that fired;
- the `recommendation` verbatim (run `/agent-insights` from a non-sandboxed agent with
direct host access, e.g. Claude Code in the terminal);
- `reachable_sources` (what little, if anything, is visible from inside the sandbox).
Then stop, unless the user explicitly asks to analyze only what is reachable