miner

Solid

usage stats, costs, search, tools

AI & Automation 3 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
20
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

<!-- PROMPT:START — keep in sync with .claude/commands/miner.md --> When the user runs /miner, interpret their intent and query ~/.claude/miner.db accordingly. ## Step 0: Check database exists and is fresh Run this FIRST as a single Bash call: ```bash DB=~/.claude/miner.db if [ ! -f "$DB" ]; then echo "NO_DB" exit 0 fi LATEST=$(sqlite3 -noheader "$DB" "SELECT MAX(start_time) FROM sessions WHERE is_subagent = 0;" 2>/dev/null) TOTAL=$(sqlite3 -noheader "$DB" "SELECT COUNT(*) FROM sessions WHERE is_subagent = 0;" 2>/dev/null) FIRST=$(sqlite3 -noheader "$DB" "SELECT MIN(start_time) FROM sessions WHERE is_subagent = 0;" 2>/dev/null) NEWEST_JSONL=$(find ~/.claude/projects -name "*.jsonl" -newer "$DB" 2>/dev/null | head -1) if [ -n "$NEWEST_JSONL" ]; then echo "STALE|$FIRST|$LATEST|$TOTAL" # try to auto-backfill for p in ./scripts/mine.py ./plugins/miner/scripts/mine.py \ $(find ~/.claude/plugins -path "*/miner/scripts/mine.py" 2>/dev/null | head -1); do if [ -f "$p" ]; then python3 "$p" --incremental 2>&1; break; fi done # re-read after backfill LATEST=$(sqlite3 -noheader "$DB" "SELECT MAX(start_time) FROM sessions WHERE is_subagent = 0;" 2>/dev/null) TOTAL=$(sqlite3 -noheader "$DB" "SELECT COUNT(*) FROM sessions WHERE is_subagent = 0;" 2>/dev/null) FIRST=$(sqlite3 -noheader "$DB" "SELECT MIN(start_time) FROM sessions WHERE is_subagent = 0;" 2>/dev/null) echo "REFRESHED|$FIRST|$LATEST|$TOTAL" else echo "FRESH|$FIRST|$LATEST|$TOTAL" fi ``` - If NO...

Details

Author
habibbedawi
Repository
habibbedawi/claude-code-tips
Created
2 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category