Show session analytics, learning patterns, correction trends, heatmaps, and productivity metrics. Computes stats from project memory and session history. Use when asking for stats, statistics, progress, how am I doing, coding history, or dashboard.
git clone https://github.com/rohitg00/pro-workflow.git--- name: insights description: Show session analytics, learning patterns, correction trends, heatmaps, and productivity metrics. Computes stats from project memory and session history. Use when asking for stats, statistics, progress, how am I doing, coding history, or dashboard. user-invocable: true --- # Session Insights Surface patterns from learnings and session history. ## Trigger Use when asking "show stats", "how am I doing", "analytics", "insights", "heatmap", or "correction rate". ## Data Sources Gather data from these locations before computing metrics: ```bash # Session history and learnings cat .claude/LEARNED.md 2>/dev/null || cat CLAUDE.md | grep -A999 "LEARNED" cat .claude/learning-log.md 2>/dev/null # Session activity git log --oneline --since="today" --author="$(git config user.name)" git diff --stat ``` A **correction** is any instance where the user redirected, fixed, or overrode agent output during a session. Count `[LEARN]` entries and explicit correction markers in session history. ## What It Shows ### Session Summary ``` Session Insights Duration: 47 min Edits: 23 files modified Corrections: 2 self-corrections applied Learnings: 3 new patterns captured Context: 62% used (safe) ``` ### Learning Analytics ``` Learning Insights (42 total) Top categories: Testing 12 learnings (29%) Navigation 8 learnings (19%) Git 7 learnings (17%) Quality 6 learnings (14%) Most applied: #12 [Testing] Run tests before commit — 15 times #8 [Navigation] Confirm path for common names — 11 times Stale learnings (never applied): #15 [Editing] Prefer named exports — 0 times (45 days old) ``` ### Correction Heatmap ``` Correction Heatmap By category (all time): ████████████ Testing 34 corrections ████████ Navigation 22 corrections ██████ Git 18 corrections ████ Quality 12 corrections Hot learnings (most corrected, least learned): - [Testing] Mock external deps — corrected 8x, learned 0x → Consider: /learn-rule to capture this permanently Cold learnings (learned but never applied): - [Editing] Use named exports — learned 45 days ago, applied 0x → Consider removing if no longer relevant ``` ### Productivity Metrics ``` Productivity (last 10 sessions) Avg session: 35 min Avg edits/session: 18 Correction rate: 12% (improving) Learning capture: 2.1 per session ``` ## Guardrails - Use actual data from project memory and session history. - Surface actionable suggestions, not just numbers. - Flag recurring corrections that should become permanent rules. - Identify stale learnings that may no longer be relevant. ## Output Formatted analytics report with: - Current session stats - Category breakdown - Most/least applied learnings - Correction trends with suggestions - Productivity metrics over time
[{"step":"Identify the scope of your analysis by filling in [PROJECT_NAME], [START_DATE], [END_DATE], and [TOOL_NAME] (e.g., GitHub, VS Code, Jupyter Notebook).","tip":"Narrow the date range to focus on a specific sprint or phase for more actionable insights."},{"step":"Specify the metrics you care about most (e.g., time breakdown, error trends, or heatmaps) to avoid information overload.","tip":"Use the prompt template as-is for a comprehensive report, or customize it to highlight only the stats you need."},{"step":"Review the generated report and identify 1–2 key takeaways to act on immediately.","tip":"Look for patterns (e.g., recurring errors) rather than isolated incidents."},{"step":"Use the insights to adjust your workflow. For example, schedule debugging sessions during your peak productivity hours or add automated checks for common errors.","tip":"Set a reminder to revisit the report in 1–2 weeks to track progress."},{"step":"If your tool supports session history exports (e.g., GitHub Copilot’s activity logs), share the file with the AI to generate more detailed or personalized reports.","tip":"Export data in JSON or CSV format for easier parsing."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/rohitg00/pro-workflow/tree/main/skills/insightsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a session analytics report for my work on [PROJECT_NAME] from [START_DATE] to [END_DATE]. Include: 1) Total time spent, 2) Breakdown of time by task type (e.g., coding, debugging, research), 3) Most frequently corrected errors or patterns, 4) Productivity trends over time, and 5) A heatmap showing my peak activity hours. Use the session history from [TOOL_NAME] if available.
Here’s your session analytics report for the **AI-Powered Chatbot Project** from **June 1–15, 2024**, based on your work in **VS Code** and **GitHub Copilot** sessions:
**1. Time Allocation:**
- Total time: **42 hours, 15 minutes**
- Coding: 68% (28h 42m) | Debugging: 18% (7h 36m) | Research/Documentation: 14% (5h 57m)
**2. Error Correction Trends:**
Top 3 recurring issues:
- **TypeError: 'NoneType' object is not subscriptable** (12 occurrences, mostly in API response handling)
- **IndentationError: unexpected indent** (8 occurrences, in Python scripts)
- **ModuleNotFoundError: No module named 'requests'** (5 occurrences, during dependency setup)
**3. Productivity Trends:**
- **June 3–5:** Highest output (12h 30m total) with 80% coding efficiency.
- **June 10–11:** Lowest output (3h 45m) due to debugging a critical API integration issue.
- **Peak hours:** 10 AM–12 PM and 2 PM–4 PM (accounted for 62% of total time).
**4. Heatmap:**
```
9AM 10AM 11AM 12PM 1PM 2PM 3PM 4PM 5PM
Mon ░ ██ ██ ██ ░ ██ ██ ░ ░
Tue ░ ██ ██ ██ ░ ██ ██ ░ ░
Wed ░ ████ ████ ██ ░ ██ ██ ░ ░
Thu ░ ██ ██ ██ ░ ██ ██ ░ ░
Fri ░ ██ ██ ░ ░ ░ ░ ░ ░
```
**Key Insights:**
- Your debugging sessions spike after major feature implementations, suggesting a need for more thorough testing upfront.
- The **NoneType error** is likely tied to inconsistent API response handling—consider adding validation checks earlier in the pipeline.
- Your most productive blocks align with your calendar’s "Deep Work" time slots. Scheduling more complex tasks during these windows could improve efficiency.
**Recommendations:**
1. Add unit tests for API response parsing to catch the NoneType errors earlier.
2. Use a linter (e.g., pylint) to flag indentation issues in real-time.
3. Block 2–3 hours daily for focused debugging to prevent backlogs.
Would you like me to drill down into any specific area or compare this to your previous month’s data?skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan