src/skills/dig/SKILL.md
Mine Claude Code sessions — timeline, gaps, repo attribution, session history. Use when user says "dig", "sessions", "past sessions", "timeline", "what did I work on", or wants to see session history. Do NOT trigger for finding code/projects (use /trace), exploring repos (use /learn), or current session status (use /recap).
npx skillsauth add Soul-Brews-Studio/oracle-skills-cli digInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Mine Claude Code session data for timelines, gaps, and repo attribution. No query needed.
/dig # Current repo, 10 most recent
/dig [N] # Current repo, N most recent
/dig --all # All repos, ALL sessions (auto-detect count)
/dig --all [N] # All repos, N most recent
/dig --deep # Deep scan — ALL .jsonl files (not just most-recent per project)
/dig --deep [N] # Deep scan, N most recent
/dig --all --deep # All repos, deep scan — full coverage
/dig --timeline # Day-by-day grouped (current repo)
/dig --all --timeline # Day-by-day grouped (all repos, ALL sessions)
Standard /dig deduplicates by session basename — only showing the most recent file per session. This misses historical sessions, subagent sessions, and worktree sessions.
--deep scans ALL .jsonl files across all project directories. Output includes extra fields:
toolCalls — number of tool invocations in the sessionfileSizeKB — session file size in KB"X of Y sessions" showing how many were returned vs founddig.py v2 auto-detects timezone instead of hardcoding GMT+7:
MAW_DISPLAY_TZ env var (e.g., Asia/Bangkok, 7, America/New_York)TZ env varOutput metadata includes detected timezone name and offset.
date "+🕐 %H:%M %Z (%A %d %B %Y)"
ENCODED_PWD=$(pwd | sed 's|^/|-|; s|[/.]|-|g')
PROJECT_BASE=$(ls -d "$HOME/.claude/projects/${ENCODED_PWD}" 2>/dev/null | head -1)
export PROJECT_DIRS="$PROJECT_BASE"
# Strip -wt* suffix to find parent project dir
PARENT_ENCODED=$(echo "$ENCODED_PWD" | sed 's/-wt-[^/]*$//')
if [ "$PARENT_ENCODED" != "$ENCODED_PWD" ]; then
PARENT_BASE=$(ls -d "$HOME/.claude/projects/${PARENT_ENCODED}" 2>/dev/null | head -1)
[ -n "$PARENT_BASE" ] && export PROJECT_DIRS="$PROJECT_DIRS:$PARENT_BASE"
fi
# nullglob-safe worktree scan (both parent and self)
for base in "$PROJECT_BASE" "$PARENT_BASE"; do
[ -z "$base" ] && continue
for wt in "$base"-wt-*(N); do # (N) = zsh nullglob qualifier
[ -d "$wt" ] && export PROJECT_DIRS="$PROJECT_DIRS:$wt"
done
done
Encodes pwd the same way Claude does (replace / and . with -, prepend -) to match the .claude/projects/ directory naming (e.g. github.com → github-com). Detects parent project from worktree dirs (strips -wt-* suffix) and includes both parent and self worktrees. The (N) qualifier prevents zsh crashes when no worktrees exist.
With --all (all repos):
export PROJECT_DIRS=$(ls -d "$HOME/.claude/projects/"*/ | tr '\n' ':')
Run the dig script. Pass 0 for --all (no limit), or N if user specified a count, default 10:
python3 ~/.claude/skills/dig/scripts/dig.py [N] [--deep]
# N=10 (default), N=0 (scan all sessions), N=50 (50 most recent)
# --deep: scan ALL .jsonl files (not just most-recent per basename)
When --deep is used, add extra columns to the table:
| # | Date | Session | Min | Repo | Msgs | Tools | Size | Focus |
And show coverage in the footer:
**Coverage**: [returned]/[found] sessions | **Timezone**: [tz_name] (GMT+[offset])
Read the JSON output and display as a table. Sessions are chronological (oldest first). Gap rows (type: "gap") span the session column with · · · prefix:
## Session Timeline
| # | Date | Session | Min | Repo | Msgs | Focus |
|---|------|---------|-----|------|------|-------|
| | | · · · sleeping / offline | | | | |
| 1 | 02-21 | 08:40–09:08 | 28m | oracle-skills-cli | 5 | Wire /rrr to read pulse data |
| | | · · · 45m gap | | | | |
| 2 | 02-21 | 09:55–10:23 | 28m | homelab | 3 | oracle-pulse birth + CLI flag |
| | | · · · no session yet | | | | |
**Dirs scanned**: [list PROJECT_DIRS]
**Total sessions found**: [count]
Column rendering rules:
| | | · · · [label] | | | | | — number + date empty, label in Session colMM-DD short format (strip year)HH:MM–HH:MM using startGMT7 and endGMT7 (strip date, keep time only)[durationMin]mrepoName field from dig.py output (resolved via ghq)realHumanMessages count"Msgs" = real typed human messages (not tool approvals).
When --timeline flag is present, group sessions by date instead of a flat table. Use --all to see all repos (recommended for timeline).
Step 1: Run dig.py with 0 for --all (scans all sessions), or user-specified count
Step 2: Group sessions by date from startGMT7. Render each day as:
## Feb 22 (Sun) — [vibe label]
· · · sleeping / offline
08:48–09:11 23m homelab Update Fleet Runbook + Explore black.local
09:11–11:30 139m homelab Set Up KVM OpenClaw Node on black.local
09:37–12:51 194m Nat-s-Agents /recap → supergateway → CF ZT → arra-oracle-v3 dig
· · · 45m gap
12:51–13:03 12m Nat-s-Agents Dig All + Design arra-oracle-v3 ← current
· · · no session yet
## Feb 21 (Sat) — Long day: Fleet + Brewing + Skills
06:19–08:38 139m homelab Moltworker Gateway + MBP Node
08:40 (bg) openclaw ClawHub Build Script (idle long)
09:23–16:08 405m homelab Debug MBP Node 401 — Gateway Token Auth
Rendering rules:
## MMM DD (Day) — [vibe label] — infer vibe from session summaries (e.g. "Infrastructure Day", "Brewing + Skills")HH:MM–HH:MM [N]m REPO Summary — use repoName for repo, summary for focus· · · [label] between sessions when gap > 30 min(bg) for sessions with isSidechain: true← current marker on the last session of the current day (today only)startGMT7 time portion only (HH:MM), endGMT7 time portion (HH:MM)Step 3: Show summary footer:
**Days**: [count] | **Sessions**: [count] | **Total time**: [sum of durationMin]m
After displaying the timeline, log the discovery to Oracle so it's searchable later:
arra_trace({
query: "dig session [N]",
project: "[repo-name]",
foundFiles: [],
foundCommits: [list of commit hashes from timeline],
foundIssues: []
})
This connects /dig discoveries to /trace — "When did we first work on X?" becomes answerable.
ARGUMENTS: $ARGUMENTS
testing
Cut a beta pre-release — bump CalVer with --beta, PR to beta branch, CI auto-tags + publishes to npm @beta. Use when user says 'release beta', 'cut beta', '/release-beta', or wants to publish a beta version for pre-release testing.
testing
Cut an alpha pre-release — bump CalVer, PR to alpha branch, CI auto-tags + publishes to npm @alpha. Use when user says 'release alpha', 'cut alpha', '/release-alpha', or wants to publish an alpha version.
tools
Talk to another oracle via maw federation. Uses fleet machine names (white, mba, clinic-nat, oracle-world, phaith). Auto-signs with current oracle's [host:handle] from CLAUDE.md. Global — works from any oracle repo.
development
Log information for future reference. Use when user says "fyi", "remember this", "note that", "for your info".