| name | telemetry-pr-insights |
| description | Concise, PR-friendly telemetry reports scoped to current branch lifetime. For CI/automation. |
Telemetry PR Insights
Scope
Default: Branch Lifetime
- Find merge-base:
git merge-base HEAD origin/main
- Get timestamp:
git show -s --format=%cI <merge_base>
- Query events where
timestamp >= branch_start for current workspace
Fallback: Last 7 Days
If Git unavailable or merge-base fails.
Data Access (Combined Platforms)
Database: ~/.blueplane/telemetry.db
For full schema details, see the Data Access / Schema Reference section in telemetry-insights/SKILL.md. This skill uses the same combined Cursor + Claude access patterns, but scoped to the PR branch window.
Tool Usage & Workflow Patterns (Claude Code only)
Data source: Decompress event_data blob from claude_raw_traces
import zlib, json
decompressed = zlib.decompress(row['event_data'])
event = json.loads(decompressed)
tools = event['payload']['entry_data']['message']['content']
Tool operation churn (detect both productive and unproductive patterns):
Negative patterns (wasted effort):
- Files written then deleted without commit (e.g., created but not in git)
- Same file edited multiple times in short succession (trial-and-error)
- Bash commands repeated with similar patterns (debugging loops)
- Write operations for files later removed (unwanted artifacts)
Positive patterns (intentional iteration):
- Progressive refinement: Write → Read → Edit (deliberate improvement)
- Test-driven flow: Write test → Run → Edit code → Run (TDD cycle)
- Exploration: Multiple Read/Grep before Write (research-based development)
- Read-before-edit ratio > 0.8 (careful, informed changes)
Workflow efficiency signals:
- Tool distribution (Bash, Write, Edit, Read, Task usage)
- Read-before-edit ratio (higher = more careful)
- File touch count (edits per unique file path)
- Time between tool uses (rapid = reactive, spaced = deliberate)
Cross-reference with git to classify churn:
- Compare Write/Edit file paths against final committed files
- Flag operations on files not in
git diff --name-only
- Distinguish exploration (positive) from mistakes (negative)
Metrics (Lean Subset)
{
"window": {
"analysis_scope": "branch_pr|time_period",
"branch_name": "...",
"branch_start": "YYYY-MM-DD",
"days_active": N
},
"activity": {
"total_prompts": N,
"total_responses": N,
"breakdown": {
"claude_code": {"prompts": N, "responses": N},
"cursor": {"prompts": N, "responses": N}
},
"active_days": N
},
N
N
X.XX
N
N N N
N N N N
X.XX
N
N
N
Derived Insights (3-5 max)
- Efficiency: token ratio, cache usage, assessment (Claude Code only)
- Activity Pattern: steady/bursty/spiky, platform distribution
- Model Strategy: dominant model, cost awareness (Claude Code only)
- Platform Usage: Claude Code vs Cursor breakdown, workflow insights
- Workflow Quality: Tool usage patterns, churn classification (productive vs wasteful), read-before-edit discipline
Output Format
Executive Summary (2-4 sentences)
First sentence MUST state time frame:
- "Since this branch diverged from
main on YYYY-MM-DD, ..."
- "Over the last 7 days, ..."
Then: activity level, efficiency, standout patterns.
Key Metrics (compact)
Activity (combined across platforms)
- Total prompts / responses
- Breakdown by platform (Claude Code vs Cursor)
- Active days
Tokens (Claude Code only)
- Input/output tokens and ratio
- Per-day snapshot (3-5 days max)
Models (Claude Code only)
- Model distribution
- Strategic usage patterns
Tool Usage & Workflow (Claude Code only, optional)
- Tool operation distribution
- Files created but not committed (potential waste)
- Workflow patterns (productive iteration vs trial-and-error)
- Read-before-edit ratio
Recommendations (3-5 bullets)
Pragmatic, low-risk suggestions. No personal commentary.
Privacy
- Never include raw code content
- No verbatim prompts/responses
- Focus on aggregated metrics only