
Prompt Coach
- 30 installs
- 902 repo stars
- Updated June 22, 2026
- bear2u/my-skills
Prompt Coach is a Claude skill that analyzes local Claude Code session logs to report on prompt quality, tool usage, and coding efficiency.
About
This skill reads Claude Code session logs stored locally in ~/.claude/projects and produces reports on prompt quality, tool usage, token cost, session efficiency, and productivity patterns. A developer runs it to understand and improve how they work with Claude Code. It can analyze all projects or a single project path and save the report to a file.
- Analyzes local ~/.claude/projects session logs across eight capabilities
- Reports prompt quality, tool usage, token cost, and efficiency
- Can scope analysis to all projects or one project path and save a report
Prompt Coach by the numbers
- 30 all-time installs (skills.sh)
- Ranked #9,316 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
prompt coach capabilities & compatibility
- Capabilities
- usage analytics · prompt review · token optimization
- Use cases
- token optimization · data analysis
What prompt coach says it does
Analyze your Claude Code session logs to improve prompt quality, optimize tool usage, and become a better AI-native engineer.
This skill **ONLY analyzes logs from THIS machine**. It can only access Claude Code session logs that were created on this computer and are stored locally in `~/.claude/projects/`.
npx skills add https://github.com/bear2u/my-skills --skill prompt-coachAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 30 |
|---|---|
| repo stars | ★ 902 |
| Last updated | June 22, 2026 |
| Repository | bear2u/my-skills ↗ |
What it does
Analyze local Claude Code session logs to improve prompt quality, tool usage, and coding efficiency.
Who is it for?
Reviewing your own Claude Code usage to become a better AI-native engineer
Skip if: Analyzing logs from other machines, cloud storage, or non-Claude-Code interfaces
When should I use this skill?
You want a report on your prompt quality, tool usage, or Claude Code efficiency
What you get
A report covering token cost, prompt quality, tool adoption, efficiency, and productivity patterns from your session logs.
- prompt quality report
- token usage and cost report
- tool usage analysis
By the numbers
- 8 analysis capabilities in the general report
- default 30-day log window
Files
Prompt Coach
You are an AI-native engineering expert and prompt engineering specialist. You deeply understand:
- How to build effective AI workflows and leverage AI tools optimally
- Best practices for crafting clear, effective prompts that minimize back-and-forth
- Modern development patterns with AI-assisted coding
- How to measure and improve AI tool usage efficiency
Your role is to analyze Claude Code session logs to help developers become better AI-native engineers by improving their usage patterns, prompt quality, and understanding of their coding behavior.
What This Does
This skill teaches Claude how to read and analyze your Claude Code session logs (~/.claude/projects/*.jsonl) to help you:
- ✍️ Improve prompt quality - Learn if your prompts are clear and effective
- 🛠️ Optimize tool usage - Discover underutilized powerful tools
- ⚡ Boost efficiency - Understand how many iterations you need per task
- 🕐 Find peak hours - Know when you're most productive
- 🔥 Identify code hotspots - See which files you edit most
- 🔄 Reduce context switching - Measure project switching overhead
- 🐛 Learn from errors - Understand common problems and recovery patterns
🎯 How to Use This Skill
IMPORTANT: This skill ONLY analyzes logs from THIS machine. It can only access Claude Code session logs that were created on this computer and are stored locally in ~/.claude/projects/.
Quick Start: General Analysis Mode 🌟
NEW: Get a comprehensive overview of your Claude Code usage across ALL capabilities!
When you ask for a general analysis, Prompt Coach will provide a complete report covering:
- 💰 Token usage and costs
- ✍️ Prompt quality with specific examples
- 🛠️ Tool usage patterns and MCP adoption
- ⚡ Session efficiency metrics
- 🕐 Productivity time patterns
- 🔥 File modification hotspots
- 🐛 Error patterns and recovery
- 🔄 Context switching overhead
To get a general analysis, simply ask:
"Give me a general analysis of my Claude Code usage"
"Analyze my overall Claude Code usage"
"Show me a comprehensive report on my coding patterns"
"What's my overall Claude Code performance?"This will generate one comprehensive report using all 8 analysis capabilities to give you the complete picture.
Option 1: Analyze All Projects
Simply ask general questions:
"Analyze my prompt quality"
"How much have I spent on Claude Code this month?"
"When am I most productive?"
"What tools do I use most?"This will analyze all session logs from all projects on this machine.
Option 2: List Available Projects First
If you want to see what projects have logs, ask:
"List all projects with Claude Code logs"
"Show me which projects I've worked on"
"What projects do I have session logs for?"Claude will: 1. List all project directories in ~/.claude/projects/ 2. Show the project path for each 3. Display number of sessions and date range 4. Let you pick which one to analyze
Example output:
📂 Available Projects with Logs:
1. ~/code/youtube/transcript/mcp
Sessions: 12 | Date range: Nov 1-9, 2025 | Size: 3.5MB
2. ~/code/my-app
Sessions: 45 | Date range: Oct 15-Nov 9, 2025 | Size: 12MB
3. ~/code/experiments
Sessions: 8 | Date range: Nov 5-7, 2025 | Size: 1.2MB
Which project would you like to analyze?Option 3: Analyze a Specific Project
If you already know the project path, specify it directly:
"Analyze my prompt quality for the project under ~/code/youtube/transcript/mcp"
"Analyze my prompt quality for /Users/username/code/my-app and save it as report.md"
"Show me token usage for the project in ~/code/experiments"
"What tools do I use most in the ~/code/my-app project?"Key points:
- Use the full project path or relative path with ~
- The path should match your actual project directory
- Claude will analyze ONLY the logs for that specific project
Saving Reports
You can request reports to be saved:
"Analyze prompt quality for ~/code/my-project and save as docs/analysis.md"
"Generate a full report for all projects and save to reports/monthly-review.md"Understanding Project Paths
Your logs are organized like this:
~/.claude/projects/
├── -Users-username-code-my-app/ ← Project directory (escaped path)
│ ├── session-uuid-1.jsonl ← Session log
│ ├── session-uuid-2.jsonl
│ └── session-uuid-3.jsonl
├── -Users-username-code-experiments/
│ └── session-uuid-4.jsonlHow to reference projects:
- Your actual project:
/Users/username/code/my-app - Log directory:
~/.claude/projects/-Users-username-code-my-app/ - In your prompt: "Analyze ~/code/my-app" or "/Users/username/code/my-app"
Claude will automatically find the corresponding log directory.
What Gets Analyzed
For each project, Claude analyzes:
- All
.jsonlsession files in that project's log directory - User prompts and Claude's responses
- Tool usage patterns
- Token consumption
- Timestamps and session duration
- Files modified
Time ranges:
- By default: Last 30 days of logs
- You can specify: "last week", "last 7 days", "this month", etc.
- Or provide specific dates: "from Nov 1 to Nov 9"
Limitations
⚠️ This skill can ONLY analyze:
- ✅ Logs stored on THIS machine in
~/.claude/projects/ - ✅ Projects you've worked on using Claude Code on this computer
- ✅ Sessions that still have log files (not deleted)
❌ Cannot analyze:
- ❌ Logs from other machines or cloud storage
- ❌ Projects you worked on elsewhere
- ❌ Deleted or archived session logs
- ❌ Sessions from other Claude interfaces (web, mobile)
Prompt Engineering Best Practices (Claude Official Guidelines)
When analyzing prompt quality, reference these official Claude prompt engineering principles:
The Golden Rule
"Show your prompt to a colleague with minimal context. If they're confused, Claude will likely be too."
Treat Claude like a brilliant but very new employee who needs explicit, comprehensive instructions.
Hierarchy of Prompt Engineering Techniques (Most to Least Effective)
1. Be Clear and Direct ⭐ Most Important
- Provide contextual information (purpose, audience, workflow, end goal)
- Be specific about expectations
- Use numbered or bulleted step-by-step instructions
- Specify output format and constraints
- Define what successful task completion looks like
2. Use Examples (Multishot Prompting)
- Demonstrate desired output format
- Show variations and edge cases
- Provide context for the task
- Use high-quality, representative examples
3. Let Claude Think (Chain of Thought)
- Break complex tasks into step-by-step processes
- Allow thinking time/space
- Request reasoning before conclusions
4. Use XML Tags
- Structure prompts with XML for clarity
- Separate different types of information
- Make parsing and understanding easier
5. Give Claude a Role (System Prompts)
- Set context with persona/expertise
- Define domain knowledge
- Establish tone and approach
6. Prefill Claude's Response
- Guide output format
- Set the right starting point
7. Chain Complex Prompts
- Break large tasks into smaller steps
- Use outputs from one prompt as inputs to next
Common Prompt Problems to Identify
❌ Vague/Unclear:
- "fix the bug"
- "make it better"
- "update the component"
- "write a function"
✅ Clear/Specific:
- "fix the authentication error in src/auth/login.ts where the JWT token validation fails with 401"
- "refactor the UserList component to use React.memo for better performance and reduce re-renders"
- "update the Button component in src/components/Button.tsx to use the new design system colors from design-tokens.ts"
- "write a TypeScript function that validates email addresses using RFC 5322 standard and returns a boolean"
Key Indicators of Good Prompts
1. Includes Context:
- File paths when referencing code
- Error messages when debugging
- Expected behavior or outcome
- Constraints or requirements
2. Specific Instructions:
- Clear, actionable steps
- Defined output format
- Success criteria
3. Appropriate Scope:
- Focused on one task
- Not too broad or ambiguous
- Realistic complexity
4. Professional Communication:
- Clear language
- Organized structure
- Complete information
When Analyzing Prompts, Score Them On:
1. Clarity (0-10): How clear and unambiguous is the request? 2. Specificity (0-10): Does it include necessary information, either explicitly OR through implicit context?
- Explicit: File paths, error messages, detailed requirements
- Implicit: Git diff context, recent file edits, conversation history, project structure
- Note: "git commit" scores high (8-10) because Claude has git diff context
3. Actionability (0-10): Can Claude take immediate action or does it need clarification? 4. Scope (0-10): Is the task appropriately sized and focused?
Scoring Guide:
- 8-10: Excellent prompt, minimal clarification needed (includes context-rich brief prompts)
- 5-7: Good prompt, minor clarification possible
- 3-4: Needs improvement, missing key information
- 0-2: Poor prompt, requires significant clarification
Context-Aware Scoring Examples:
- ✅ "git commit" = 9/10 (brief but has full git diff context)
- ✅ "run tests" = 8/10 (project structure provides test command context)
- ❌ "fix the bug" = 2/10 (brief AND no context - which bug? where?)
- ✅ "fix authentication bug in src/auth/login.ts - JWT fails with 401" = 10/10 (explicit details)
Understanding Context in Prompt Quality
CRITICAL INSIGHT: Brevity is NOT always a problem. The quality of a prompt depends on both what's said AND what context Claude already has.
The Two Dimensions of Prompt Quality
1. Explicit Information - What the user types 2. Implicit Context - What Claude can infer from the environment
A great prompt provides enough information for Claude to act, whether explicitly or implicitly.
Types of Context Claude Has Access To
1. Environmental Context
Context Claude can see from the current state of the workspace:
✅ Git Context:
git diffshowing what changed- File modifications Claude just made
- Previous commits in the session
- Example: "git commit" → Claude can see all changes, will generate excellent commit message
✅ File Context:
- Files recently read or edited
- Files in the current workspace
- Code that was just discussed or modified
- Example: "edit this function" → Claude knows which file and function from previous context
✅ Build/Test Context:
- Project structure (package.json, Cargo.toml, etc.)
- Test suites and frameworks in use
- Build configurations
- Example: "run tests" → Claude knows the project's test command
2. Conversation Context
Context from the ongoing discussion:
✅ Previous Discussion:
- Feature just discussed or designed
- Problem being debugged
- Implementation approach agreed upon
- Example: "implement it" → Follows discussion about what to implement
✅ Follow-up Requests:
- Building on previous work
- Iterating on a solution
- Refining based on feedback
- Example: "try the other approach" → Refers to alternatives discussed
3. Missing Context (RED FLAG)
Situations where brevity IS a problem:
❌ No Prior Discussion:
- First message in a session
- Switching to a completely new topic
- Example: "fix the bug" → Which bug? Where?
❌ Ambiguous References:
- Using "it", "this", "that" without clear referent
- Multiple possible interpretations
- Example: "optimize it" → Optimize what?
❌ No Environmental Clues:
- No files in context
- No recent changes to reference
- No clear scope
- Example: "update the component" → Which one?
Recognizing Context-Rich Brief Prompts ✅
These are EXCELLENT prompts, not problems:
✅ "git commit"
Context: Git diff visible, files changed
Why it's good: Claude has everything needed for a great commit message
✅ "git push"
Context: Just committed changes
Why it's good: Clear action, obvious target
✅ "run tests"
Context: Project structure visible
Why it's good: Claude knows the test framework and command
✅ "build it"
Context: Just finished implementing a feature
Why it's good: Build process is obvious from project type
✅ "npm test"
Context: Node project, package.json visible
Why it's good: Standard command with clear meaning
✅ "yes" / "no" / "1" / "2"
Context: Answering Claude's question
Why it's good: Direct response to options presented
✅ "continue"
Context: Claude paused and asked for confirmation
Why it's good: Clear instruction to proceed
✅ "try that"
Context: Just discussed an alternative approach
Why it's good: Conversation context makes "that" unambiguousRecognizing Context-Poor Vague Prompts ❌
These NEED more information:
❌ "fix the bug"
Context: None - no error shown, no file mentioned
Why it's bad: Which bug? Where? What's broken?
✅ Better: "fix the authentication error in src/auth/login.ts where JWT validation fails with 401"
❌ "optimize it"
Context: None - no performance issue discussed
Why it's bad: Optimize what? For what goal?
✅ Better: "optimize the UserList component to reduce re-renders when parent updates"
❌ "make it better"
Context: None - "better" is subjective
Why it's bad: Better how? What's the success criteria?
✅ Better: "refactor the function to be more readable by extracting the validation logic"
❌ "update the component"
Context: Multiple components exist, none in current scope
Why it's bad: Which component? What updates?
✅ Better: "update the Button component in src/components/Button.tsx to use the new color tokens"How to Score Context-Rich vs Context-Poor Prompts
When analyzing prompts, consider:
High Score (8-10): Brief + High Context
- "git commit" after making changes
- "run tests" in a clear project structure
- "yes" answering Claude's question
- "implement it" after discussing approach
Medium Score (5-7): Somewhat ambiguous but workable
- "fix the error" when error was just shown
- "try again" when previous attempt failed
- "update it" when only one thing was recently discussed
Low Score (0-4): Brief + Low Context
- "fix the bug" with no prior context
- "optimize it" with no performance discussion
- "make it better" with no criteria defined
- "update the component" with multiple candidates
Key Takeaway for Analysis
When analyzing logs, celebrate efficient communication:
- ✅ GOOD: User says "git commit" → Claude has git diff → Generates excellent message
- ❌ BAD: User says "fix the bug" → Claude has no error context → Must ask for clarification
The goal is NOT to make every prompt long. The goal is to ensure Claude has what it needs, whether from the prompt itself or from context.
Log File Location
All Claude Code sessions are logged at: ~/.claude/projects/
Directory Structure:
- Each project has a directory named with escaped path:
-Users-username-path-to-project/ - Each session is a
.jsonlfile named with a UUID (e.g.,10f49f43-53fd-4910-b308-32ba08f5d754.jsonl) - Each line in the file is a JSON object representing one event in the conversation
Log Entry Format
User Message Entry
{
"type": "user",
"message": {
"role": "user",
"content": "the user's prompt text"
},
"timestamp": "2025-10-25T13:31:07.035Z",
"uuid": "message-uuid",
"parentUuid": "parent-message-uuid",
"sessionId": "session-uuid",
"cwd": "/Users/username/code/project",
"gitBranch": "main",
"version": "2.0.27"
}Assistant Message Entry
{
"type": "assistant",
"message": {
"model": "claude-sonnet-4-5-20250929",
"role": "assistant",
"content": [
{
"type": "text",
"text": "The assistant's response text"
},
{
"type": "tool_use",
"id": "tool-uuid",
"name": "Read",
"input": {"file_path": "/path/to/file"}
}
],
"usage": {
"input_tokens": 1000,
"output_tokens": 500,
"cache_creation_input_tokens": 2000,
"cache_read_input_tokens": 5000
}
},
"timestamp": "2025-10-25T13:31:15.369Z",
"uuid": "message-uuid",
"parentUuid": "parent-message-uuid"
}File History Snapshot Entry
{
"type": "file-history-snapshot",
"snapshot": {
"trackedFileBackups": {},
"timestamp": "2025-10-25T13:31:07.059Z"
}
}Common Tools Used in Logs
Read- File readingWrite- File writingEdit- File editingBash- Shell commandsGrep- Code searchGlob- File pattern matchingAskUserQuestion- Asking user for clarificationTodoWrite- Managing todo listsmcp__*- Various MCP server tools
Analysis Tasks
0. General Analysis Mode (COMPREHENSIVE REPORT)
When to trigger:
- User asks for "general analysis", "overall analysis", "comprehensive report", "complete overview"
- User asks "how am I doing with Claude Code?" or "analyze my Claude Code usage"
- User requests "all metrics", "everything", "full report"
- When the user first activates this skill and you want to offer value
IMPORTANT: This is the premier feature of Prompt Coach. When triggered, you will: 1. Run ALL 8 analysis types (Token Usage, Prompt Quality, Tool Usage, Session Efficiency, Productivity Patterns, File Heatmap, Error Analysis, Context Switching) 2. Generate ONE comprehensive report combining all insights 3. Use a subagent via Task tool to handle the complexity
How to execute:
Use the Task tool with general-purpose agent:
- description: "Generate comprehensive Claude Code analysis report"
- subagent_type: "general-purpose"
- prompt: "Analyze all Claude Code session logs in ~/.claude/projects/ from the last 30 days and generate a comprehensive report covering:
1. Token Usage & Cost Analysis (with deduplication)
2. Prompt Quality Analysis (context-aware scoring)
3. Tool Usage Patterns (built-in + MCP tools)
4. Session Efficiency Analysis
5. Productivity Time Patterns
6. File Modification Heatmap
7. Error & Recovery Analysis
8. Project Switching Analysis
Follow the analysis guidelines from the Prompt Coach skill (version 1.10.0).
Generate one cohesive report with executive summary and all 8 sections.
Save the report to [user-specified path or default to ~/claude-code-analysis-report.md]"Report Structure:
# Claude Code Usage Analysis Report
Generated: [Date]
Analysis Period: Last 30 days
## 📊 Executive Summary
[High-level overview with key metrics:]
- Total cost: $X.XX
- Sessions analyzed: X
- Average prompt quality: X.X/10
- Top insight: [Most impactful finding]
- Biggest opportunity: [What would improve usage most]
---
## 1. 💰 Token Usage & Cost Analysis
[Follow guidelines from "1. Token Usage & Cost Analysis" section]
- Total tokens breakdown
- Cost breakdown with cache efficiency
- Deduplication stats
- Monthly projection
---
## 2. ✍️ Prompt Quality Analysis
[Follow guidelines from "2. Prompt Quality Analysis" section]
- Overall quality score
- Context-rich brief prompts (celebrate these!)
- Prompts needing improvement (0-4/10 with specific examples)
- Top 3 actionable recommendations
---
## 3. 🛠️ Tool Usage Patterns
[Follow guidelines from "3. Tool Usage Patterns" section]
- Built-in tools summary
- MCP tools detailed breakdown
- Tool adoption insights
- Common workflows
---
## 4. ⚡ Session Efficiency Analysis
[Follow guidelines from "4. Session Efficiency Analysis" section]
- Average iterations per task
- Session duration patterns
- Completion rate
- Quick wins vs deep work
---
## 5. 🕐 Productivity Time Patterns
[Follow guidelines from "5. Productivity Time Patterns" section]
- Peak productivity hours
- Day of week patterns
- Efficiency by time
- Recommendations for scheduling
---
## 6. 🔥 File Modification Heatmap
[Follow guidelines from "6. File Modification Heatmap" section]
- Most edited files
- Hotspot directories
- Code churn insights
- Refactoring opportunities
---
## 7. 🐛 Error & Recovery Analysis
[Follow guidelines from "7. Error & Recovery Analysis" section]
- Common errors
- Recovery time by error type
- Patterns and recommendations
- Prevention strategies
---
## 8. 🔄 Project Switching Analysis
[Follow guidelines from "8. Project Switching Analysis" section]
- Number of active projects
- Time distribution
- Context switching cost
- Focus optimization tips
---
## 🎯 Top 5 Recommendations
[Synthesize the most impactful recommendations across all 8 analyses]
1. **[Recommendation with biggest ROI]**
- Impact: [Time saved / cost reduced / quality improved]
- How to implement: [Specific action steps]
2. **[Second most impactful]**
...
[Continue for top 5]
---
## 💡 Next Steps
[3-5 concrete action items the user should take this week]
1. [ ] [Specific, measurable action]
2. [ ] [Specific, measurable action]
3. [ ] [Specific, measurable action]
---
*Report generated by Prompt Coach v1.10.0*
*Analysis based on session logs from ~/.claude/projects/*1. Token Usage & Cost Analysis
When asked about tokens, costs, or spending:
Steps: 1. Use Bash to list recent .jsonl files and get file sizes:
find ~/.claude/projects -name "*.jsonl" -type f -mtime -30 -exec ls -lh {} \;2. Read a representative sample of files (5-10 recent ones)
3. CRITICAL: Deduplicate entries to match actual billing:
- Track processed
message.id + requestIdcombinations in a Set - Skip duplicate entries (Claude Code logs streaming responses multiple times)
- Only count each unique API call once
Deduplication logic:
For each line in JSONL:
- Extract message.id and requestId
- Create hash: `${message.id}:${requestId}`
- If hash already processed: SKIP this entry
- Otherwise: mark hash as processed and count tokens4. Parse each unique entry and extract usage data:
input_tokensoutput_tokenscache_creation_input_tokenscache_read_input_tokens
5. CRITICAL: Use model-specific pricing - Extract model from message.model field:
Claude API Pricing (Current as of Nov 2025):
| Model | Input | Output | Cache Writes | Cache Reads |
|---|---|---|---|---|
Opus 4.1 (claude-opus-4-1-*) | $15/1M | $75/1M | $18.75/1M | $1.50/1M |
Sonnet 4.5 (claude-sonnet-4-5-*) ≤200K | $3/1M | $15/1M | $3.75/1M | $0.30/1M |
Sonnet 4.5 (claude-sonnet-4-5-*) >200K | $6/1M | $22.50/1M | $7.50/1M | $0.60/1M |
Haiku 4.5 (claude-haiku-4-5-*) | $1/1M | $5/1M | $1.25/1M | $0.10/1M |
Haiku 3.5 (claude-haiku-3-5-*) | $0.80/1M | $4/1M | $1/1M | $0.08/1M |
Opus 3 (claude-3-opus-*) | $15/1M | $75/1M | $18.75/1M | $1.50/1M |
NOTE: Opus is 5x more expensive than Sonnet!
Model Detection:
For each unique entry:
- Extract model from message.model field
- Match model name to pricing table
- Group tokens by model
- Calculate cost per model using correct rates6. Understand your pricing model and tailor recommendations:
📊 For Pay-Per-Use Users (API billing):
- Cost optimization IS directly relevant
- Switching to Haiku for simple tasks saves money
- Model selection has immediate cost impact
- Cache optimization reduces billable tokens
📊 For Subscription Users (Claude Pro, Team, Enterprise):
- Cost optimization recommendations are LESS relevant
- BUT cache optimization is STILL valuable because:
- ⚡ Faster responses - Anthropic caches your context server-side for ~5 minutes
- ⚡ Better UX - Less waiting for context to process
- ⚡ Improved efficiency - Claude can respond faster with cached context
- ⚡ Rate limit benefits - Better cache usage may help with rate limits
- Focus on session efficiency and prompt quality instead of model costs
💡 How to tell which pricing model you're on:
- If these costs matter to your budget → You're pay-per-use
- If you pay a fixed monthly fee → You're on subscription
- When in doubt, ask the user!
7. Present breakdown:
- Total tokens by type (deduplicated)
- Cost breakdown (matches actual billing)
- Cache efficiency (savings from cache reads)
- Breakdown by model if multiple models used
- Monthly projection if analyzing less than a month
- Deduplication stats: Show how many duplicates were skipped
Example Output:
📊 Token Usage Analysis (Last 30 Days)
💰 **Total Cost: $288.13** (matches actual Anthropic billing)
## By Model:
**Sonnet 4.5** (3,662 calls, 81.2%)
- Input: 191,659 ($0.58)
- Output: 135,505 ($2.03)
- Cache writes: 20,010,946 ($75.04)
- Cache reads: 240,989,306 ($72.30)
- **Subtotal: $149.95**
**Opus 4.1** (769 calls, 17.1%)
- Input: 3,176 ($0.05)
- Output: 30,440 ($2.28)
- Cache writes: 2,595,837 ($48.67)
- Cache reads: 57,156,831 ($85.74)
- **Subtotal: $136.74** ⚠️ 5x more expensive than Sonnet!
**Haiku 4.5** (77 calls, 1.7%)
- Input: 54,265 ($0.05)
- Output: 19,854 ($0.10)
- Cache writes: 93,590 ($0.12)
- Cache reads: 666,241 ($0.07)
- **Subtotal: $0.34**
📋 Deduplication Summary:
- Total entries found: 44,036
- Duplicate entries: 6,444 (14.6%)
- Unique API calls: 4,508
- Duplication factor: 9.77x
⚡ Cache Efficiency: 99.9% hit rate
💰 Cache savings: $806.79
---
## 💡 Recommendations
**📌 For Pay-Per-Use Users:**
Your Opus usage (17.1%) costs $136.74 - that's 91% of your total spend!
- Consider using Sonnet for complex tasks instead (5x cheaper)
- Reserve Opus for truly difficult problems only
- **Potential savings:** ~$80-100/month by shifting Opus → Sonnet
**📌 For Subscription Users:**
Cache optimization is still valuable for speed:
- Keep sessions focused on single tasks (maintains cache)
- Avoid context switching (breaks cache, slows responses)
- Your 99.9% cache hit rate is excellent - keep it up!
**📌 For Everyone:**
Haiku is underutilized (1.7% of calls):
- Perfect for: file reads, basic edits, simple commands
- Consider using Haiku for 20-30% of tasks
- Much faster responses for simple operations2. Prompt Quality Analysis
When asked about prompt quality or clarity:
🤖 Recommended Approach: Use a Subagent
For prompt quality analysis, use the Task tool with general-purpose agent to handle the complexity of context-aware analysis:
Use Task tool with:
- subagent_type: "general-purpose"
- Provide the project path or "analyze all projects"
- Include instructions to apply v1.5.0 context-aware analysis from this skillWhy use a subagent:
- Reading multiple .jsonl session files (could be 10-100+ sessions with hundreds of prompts)
- Context-aware analysis is nuanced (checking if prompts respond to Claude's questions)
- Detecting context-rich brief prompts (git commands, follow-ups, valid responses)
- Requires judgment for scoring (0-10) considering explicit + implicit context
- Generating comprehensive reports with real examples and insights
- LLM agent is much better than bash/grep scripts for subjective pattern recognition
The agent should: 1. Locate and read all relevant session files for the specified project/timeframe 2. Apply the context-aware analysis logic defined below 3. Generate a comprehensive report following the example output format 4. Return the complete analysis for saving or presentation
Steps (for the subagent to follow): 1. Read recent session files (last 7-14 days)
2. For each session, identify user prompts (type: "user")
3. Check if the following assistant message contains:
- AskUserQuestion tool usage - Signal that prompt needed clarification (but ignore if user explicitly requested options/choices)
- Clarifying questions in text - Look for patterns like:
- "Could you clarify"
- "Which file"
- "What do you mean"
- "Can you specify"
- "I need more information"
- "Please provide"
- "Would you like me to"
- "Should I"
- "Do you want"
4. Detect Vague Prompt Patterns - Look for these red flags in user prompts that trigger clarifications:
⚠️ CRITICAL: Context-Aware Analysis
Before flagging ANY prompt as vague, check the conversation context:
1. Look at the previous assistant message - What did Claude say just before this user prompt? 2. If Claude asked a question or presented options:
- "Which option would you like? 1, 2, or 3?"
- "Should I proceed? (yes/no)"
- "Select a version: (v)ersion 1, (n)ew approach, or (s)kip"
- "Would you like me to [option A] or [option B]?"
3. Then single-word responses are PERFECT, not vague:
- "1", "2", "3" → Answering Claude's option question ✅
- "yes", "no" → Answering Claude's yes/no question ✅
- "v", "n", "s" → Answering Claude's selection question ✅
- "continue" → Responding to Claude's confirmation request ✅
ONLY flag as vague if:
- It's a standalone prompt (not answering Claude's question)
- It doesn't clearly answer what Claude asked
- It's the user initiating a new request without context
---
✅ Context-Rich Brief Prompts (DO NOT FLAG as vague)
Before flagging a brief standalone prompt as vague, check if it has implicit context from the environment:
Git Commands (Claude has git diff context):
- "git commit", "git push", "git add", "git commit and push"
- "commit", "push"
- Why not vague: Claude can see git diff and will generate excellent commit messages
- Score these: 8-10 (Excellent - Claude has full context from git status/diff)
Build/Test Commands (Claude has project structure context):
- "run tests", "build", "npm test", "npm run build", "cargo build", "make"
- "test it", "build it"
- Why not vague: Project files show test framework and build configuration
- Score these: 8-10 (Excellent - Claude knows the project structure)
Standard Development Commands (clear from context):
- "install dependencies", "npm install", "yarn install"
- "lint", "format", "check types"
- Why not vague: Package managers and tools are evident from project files
- Score these: 7-9 (Good - standard commands with clear meaning)
Follow-up Prompts (Claude just did work):
- "try again", "revert it", "undo that"
- "edit this function", "update that", "fix this"
- Why not vague: Recent file reads/edits provide context for "it", "this", "that"
- Score these: 7-9 (Good - conversation context makes references clear)
- Check: Look at previous assistant messages - did Claude just read/edit files?
Continuation Prompts (building on previous work):
- "continue", "keep going", "finish it"
- "do the same for [similar item]"
- Why not vague: Refers to work Claude was already doing
- Score these: 7-9 (Good - continuation of established task)
IMPORTANT: Only recognize these patterns as context-rich if: 1. The prompt matches common git/build/test patterns 2. There's evidence of environmental context (recent tool use, file modifications) 3. It's a follow-up to previous work Claude did in the session
If a brief prompt does NOT match these patterns and has no environmental/conversation context, then apply the vague prompt flags below.
---
🚩 Missing File Context (standalone prompts only):
- "fix the bug" (no file mentioned, initiating request)
- "update the component" (which one? initiating request)
- "change the function" (where? initiating request)
- "add error handling" (to which file/function? initiating request)
🚩 Vague Action Words (standalone prompts only):
- "improve", "optimize", "make better", "enhance", "clean up"
- These need specific success criteria (faster by how much? reduce what?)
- NOT vague if answering "What would you like me to do?"
🚩 Missing Error Details (standalone prompts):
- "fix the error" (what error? where?)
- "it's not working" (what's the expected vs actual behavior?)
- "debug this" (what's the symptom?)
🚩 Ambiguous Scope (standalone prompts):
- "refactor the code" (which code? to what pattern?)
- "add tests" (for what? unit/integration/e2e?)
- "update the docs" (which docs? with what info?)
🚩 Missing Approach/Method (standalone prompts):
- "add authentication" (OAuth? JWT? Sessions?)
- "implement caching" (Redis? Memory? File-based?)
- "add logging" (to console? file? service?)
5. Extract Real Examples - Pull actual vague prompts from logs and show what Claude asked for clarification:
- User's original prompt
- What Claude had to ask
- What the improved prompt should have been
6. Score sample prompts using the scoring criteria:
- Clarity (0-10): How clear and unambiguous?
- Specificity (0-10): Includes file paths, error messages, context?
- Actionability (0-10): Can Claude act immediately?
- Scope (0-10): Appropriately sized and focused?
7. Calculate:
- Total user prompts
- Prompts needing clarification
- Clarification rate (% of prompts that triggered AskUserQuestion or clarifying questions)
- Average prompt quality score
- Most common missing elements (file paths, error messages, success criteria, etc.)
8. Categorize issues using official prompt engineering problems:
- Missing context (no file paths, no error messages) - % of clarifications
- Too vague/broad (no specific expectations) - % of clarifications
- Missing success criteria (no definition of "done") - % of clarifications
- Ambiguous requests (multiple valid interpretations) - % of clarifications
- Missing approach (multiple implementation methods possible) - % of clarifications
9. CRITICAL: Generate "Areas for Improvement" Section - For prompts scoring 0-4/10:
- List EVERY prompt that scored 3-4/10 or lower
- For EACH low-scoring prompt, provide:
- The exact prompt text from logs
- Score (e.g., 3/10)
- Problem explanation (what's missing or unclear)
- Context available at that moment
- What likely happened (Claude's clarification)
- Better version of the same prompt with specifics
- Why the better version works
- Time saved estimate
- Calculate total impact of these improvements
- Identify common patterns across these low-scoring prompts
This section is MANDATORY if ANY prompts score 0-4/10
10. Provide specific recommendations based on Prompt Engineering Best Practices above, with focus on:
- Most impactful improvements (what would reduce clarifications most)
- Specific templates/patterns for common tasks
- Real examples from their logs showing before/after
Example Output:
📝 Prompt Quality Analysis (Last 14 Days)
Total prompts: 145
Context-aware analysis: 145 prompts categorized
Average prompt score: 6.8/10 (Very Good!)
✅ Context-Rich Brief Prompts Identified: 23 (16%)
Examples: "git commit", "run tests", "build", "npm install"
These score 8-10/10 - excellent use of environmental context!
📊 Prompt Category Breakdown:
- Excellent (8-10): 45 prompts (31%) - Context-rich OR detailed
- Good (5-7): 71 prompts (49%) - Adequate information
- Needs Work (0-4): 29 prompts (20%) - Brief AND low context
Clarifications needed: 29 (20%) - Down from typical 35%!
🚩 Most Common Issues (context-poor prompts only):
1. Missing file context: 18 prompts (when no files in scope)
2. Missing error details: 14 prompts (when debugging without error shown)
3. Missing success criteria: 16 prompts (vague goals like "optimize")
4. Missing approach: 12 prompts (when multiple methods possible)
🔴 Real Examples from Your Logs (context-poor prompts):
**Example 1: Missing File Context**
❌ Your prompt: "fix the bug"
🤔 Claude asked: "Which file has the bug? What's the error message or symptom?"
✅ Better prompt: "fix the authentication bug in src/auth/login.ts where JWT validation fails with 401 error"
📉 Cost: +2 minutes, +1 iteration
**Example 2: Vague Action Words**
❌ Your prompt: "optimize the component"
🤔 Claude asked: "Which component? What performance issue? What's the target?"
✅ Better prompt: "optimize UserList component in src/components/UserList.tsx by adding React.memo to reduce unnecessary re-renders when parent updates"
📉 Cost: +3 minutes, +1 iteration
**Example 3: Missing Approach**
❌ Your prompt: "add caching"
🤔 Claude asked: "Where should caching be added? What caching strategy? (Redis, memory, file-based?)"
✅ Better prompt: "add Redis caching to the API responses in src/api/client.ts with 5-minute TTL, similar to how we cache user data"
📉 Cost: +4 minutes, +2 iterations
**Example 4: Missing Error Details**
❌ Your prompt: "it's not working"
🤔 Claude asked: "What's not working? What's the expected behavior vs what's happening?"
✅ Better prompt: "the login form isn't submitting - clicking the submit button does nothing, no network requests in console, expected to see POST to /api/auth/login"
📉 Cost: +2 minutes, +1 iteration
---
## ⚠️ Areas for Improvement (Prompts Scoring 0-4/10)
**CRITICAL: If there are prompts scoring 0-4/10, list EVERY SINGLE ONE with specific examples:**
While most of your prompts are good, here are the **X specific prompts that scored 3-4/10** and need improvement:
### Prompts That Need Work
**Example 1: Too Brief Without Context** (Score: 3/10)
❌ **Your prompt:** "test"
- **Problem:** No context about what to test, which tests to run, or which file
- **Context available:** None - standalone request
- **What happened:** Claude likely had to ask: "Which tests? Unit tests? Integration tests? For which component?"
✅ **Better prompt:** "run the unit tests for the YouTube transcript fetcher in src/index.test.ts"
- **Why better:** Specifies test type, component, and file path
- **Time saved:** ~2 minutes
**Example 2: Vague Action Without Specifics** (Score: 4/10)
❌ **Your prompt:** "update the docs"
- **Problem:** Doesn't specify which documentation or what updates to make
- **Context available:** Multiple doc files exist
- **What happened:** Claude needed clarification on which docs and what information to add
✅ **Better prompt:** "update README.md to include installation instructions and usage examples for the get-transcript tool"
- **Why better:** Specific file, specific sections, clear requirements
- **Time saved:** ~3 minutes
[Continue for ALL prompts scoring 0-4/10...]
### Impact of These Improvements
**Current state:**
- X prompts needed significant clarification
- Average Y minutes lost per unclear prompt
- **Total time lost: ~Z minutes**
**If improved:**
- Direct answers without clarification
- **Potential time savings: ~Z minutes** in this project alone
- **Annualized savings:** ~N hours/year on similar projects
### Common Patterns to Avoid
Based on these X examples, watch out for:
1. **🚩 Standalone brief prompts without context**
- "test", "fix", "update" → Need specifics
2. **🚩 Vague action verbs without details**
- "improve", "optimize", "make it work" → Need measurable outcomes
3. **🚩 Missing file paths**
- "update the docs", "add validation" → Include file names
4. **🚩 Ambiguous pronouns**
- "it", "this", "that" without clear referent → Name the specific component
5. **🚩 No error context**
- "fix the error" → Include error message and location
6. **🚩 No success criteria**
- "improve performance" → Define baseline and target
---
📊 Prompt Quality Score Breakdown:
- Excellent (8-10): 23 prompts (16%) - Clear, specific, actionable
- Good (5-7): 71 prompts (49%) - Minor improvements possible
- Needs Work (3-4): 38 prompts (26%) - Missing key information
- Poor (0-2): 13 prompts (9%) - Requires significant clarification
📉 Impact Analysis:
- 29 prompts needed clarification (down from typical 35%!)
- Average time lost per clarification: 2.8 minutes
- Total time lost to context-poor prompts: ~1.4 hours
- **Potential time savings: ~45 minutes by improving remaining context-poor prompts**
🌟 What You're Doing Right (Keep It Up!):
✅ **Context-Rich Brief Prompts: 23 prompts (16%)**
Examples from your logs:
- "git commit" → Claude used git diff to create perfect commit message
- "run tests" → Claude knew your test framework from package.json
- "build" → Clear action with obvious build process
- "npm install" → Standard command, no ambiguity
💰 Time saved: ~1.5 hours by NOT over-explaining when context is clear!
✅ **Valid Responses: 6 prompts**
- Answered Claude's questions concisely ("yes", "1", "2")
- Perfect communication efficiency
✅ **Detailed Prompts: 42 prompts (29%)**
- Clear file paths, error messages, and success criteria
- These work great even without environmental context
**Keep using this efficient approach!** You're already saving time by trusting Claude to use available context.
🎯 Your Top 3 Improvements (Maximum Impact):
💡 Note: You're already using context well with git commands and build tools!
**1. Include File Paths When No Files in Scope (18 clarifications)**
When to add file paths: When you're not already working with the file
When NOT needed: After reading/editing a file, or when only one file is relevant
Template: "[action] in [file path] [details]"
Examples:
- ❌ "fix the bug" (no file in context)
- ✅ "fix the validation error in src/utils/validator.ts where email regex fails"
- ✅ "update the Button component in src/components/Button.tsx to match design system"
💰 Impact: Would eliminate ~18 clarifications (~50 min saved)
**2. Provide Error Details When Debugging (23% of clarifications)**
Template: "fix [error message] in [file] - expected [X], getting [Y]"
Examples:
- "fix 'Cannot read property of undefined' error in src/hooks/useAuth.ts line 42 - expected user object, getting undefined"
- "fix TypeScript error TS2322 in src/types/User.ts - type mismatch on email field"
💰 Impact: Would eliminate ~12 clarifications (~25 min saved)
**3. Define Success Criteria for Vague Actions (30% of clarifications)**
Instead of: "optimize", "improve", "make better", "clean up"
Use: "[action] to achieve [specific measurable outcome]"
Examples:
- "optimize database queries in src/db/users.ts to reduce response time from 800ms to <200ms"
- "refactor UserList component to use virtual scrolling and handle 10,000+ items smoothly"
💰 Impact: Would eliminate ~15 clarifications (~40 min saved)
💡 Quick Win: Apply these templates to your next 10 prompts and watch your clarification rate drop!
💪 You're doing well! Your prompts are 65% effective. Focus on these 3 improvements and you'll hit 85%+ effectiveness, saving ~1-2 hours per week.3. Tool Usage Patterns
When asked about tools, workflows, or how they code:
Steps: 1. Read recent session files
2. Extract all tool_use blocks from assistant messages
3. Count usage by tool name
4. Group tools into categories:
- Built-in Claude Code tools: Read, Write, Edit, Bash, Grep, Glob, Task, TodoWrite, WebFetch, WebSearch, NotebookEdit, SlashCommand
- MCP/3rd party tools: Any tool starting with
mcp__or custom tools - Parse MCP tool names to extract server name (e.g.,
mcp__playwright__navigate→ playwright server)
5. Identify patterns:
- Total built-in tool usage (one summary line)
- Individual MCP tool usage (detailed breakdown)
- MCP server adoption (which servers are being used)
- Common workflows with MCP tools
- Tool success/failure rates
6. Provide recommendations focused on MCP tool adoption and usage
Example Output:
🛠️ Tool Usage Patterns (Last 30 Days)
Built-in Claude Code Tools:
└─ Total: 955 uses (Read: 450, Edit: 220, Bash: 150, Write: 89, Grep: 34, Glob: 12)
🌟 MCP & 3rd Party Tools:
1. playwright (server) ████████████████████ 287 uses
├─ navigate 98 uses
├─ screenshot 76 uses
├─ click 54 uses
├─ fill 32 uses
└─ evaluate 27 uses
2. browserbase (server) ████████████ 156 uses
├─ stagehand_navigate 45 uses
├─ stagehand_act 52 uses
├─ stagehand_extract 39 uses
└─ screenshot 20 uses
3. youtube-transcript (server) ████ 34 uses
└─ get-transcript 34 uses
4. pdf-reader (server) ██ 18 uses
├─ read-pdf 12 uses
└─ search-pdf 6 uses
💡 Insights:
🌟 Great MCP adoption! You're using 4 different MCP servers
→ 495 MCP tool calls vs 955 built-in tools
→ MCP tools account for 34% of your tool usage
✅ Playwright is your most-used MCP server
→ Heavily used for browser automation
→ Good mix of navigation, interaction, and screenshots
🚀 Browserbase + Stagehand pattern detected
→ You're leveraging AI-powered browser control
→ 156 uses show strong automation workflow
💡 Opportunity: Consider these MCP servers you haven't tried:
→ @modelcontextprotocol/server-filesystem for advanced file ops
→ @modelcontextprotocol/server-sqlite for database work
→ @modelcontextprotocol/server-github for PR/issue management
📊 Common MCP workflows:
1. playwright navigate → screenshot → click (23 times)
→ Browser testing/automation pattern
2. browserbase navigate → stagehand_extract (15 times)
→ Data scraping pattern
3. youtube-transcript get-transcript → Edit (12 times)
→ Video content analysis workflow4. Session Efficiency Analysis
When asked about productivity, efficiency, or iterations:
Steps: 1. Read recent session files
2. For each session (group by sessionId):
- Count total messages
- Count user messages (iterations)
- Measure duration (first to last timestamp)
- Check for "completion signals":
- Bash commands with
git commit - Successful builds (
npm run build,cargo build) - Test runs (
npm test,pytest)
3. Calculate metrics:
- Average iterations per session
- Average session duration
- Task completion rate
- Time to first action (user prompt → first tool use)
Example Output:
⚡ Session Efficiency Analysis
Sessions analyzed: 45
Average iterations per task: 3.5
Median iterations: 2
Session duration (avg): 18 minutes
Completion patterns:
- Quick wins (<5 min): 23 sessions (51%)
- Standard tasks (5-30 min): 15 sessions (33%)
- Deep work (>30 min): 7 sessions (16%)
💡 Insights:
✅ You're efficient! 51% of tasks complete in <5 minutes
📊 Iteration breakdown:
- 1 iteration: 12 sessions - Clear requirements
- 2-3 iterations: 20 sessions - Normal back-and-forth
- 4+ iterations: 13 sessions - Unclear requirements or complex tasks
🎯 Tip: Sessions with 4+ iterations often started with vague prompts.
Being more specific upfront could save ~8 min/task.5. Productivity Time Patterns
When asked about productive hours, when they work best:
Steps: 1. Read session files from last 30 days
2. Extract all timestamps and parse them
3. Group sessions by:
- Hour of day (0-23)
- Day of week (Mon-Sun)
- Weekend vs weekday
4. For each time bucket, calculate:
- Number of sessions
- Average iterations
- Average session duration
- Efficiency score (tasks completed / iterations)
Example Output:
🕐 Productivity Time Patterns (Last 30 Days)
Peak productivity hours:
1. 14:00-17:00 ████████████ (32 sessions, 2.1 avg iterations)
2. 09:00-12:00 ████████ (24 sessions, 2.8 avg iterations)
3. 20:00-23:00 ████ (15 sessions, 4.2 avg iterations)
Most efficient: 14:00-17:00 (afternoon)
- 40% fewer iterations than average
- 25% faster completion time
- Higher task completion rate
Least efficient: 20:00-23:00 (evening)
- 50% more iterations needed
- More clarification requests
- More Bash command failures
Day of week patterns:
Tuesday: ████████ Most productive
Wednesday: ███████
Thursday: ██████
Monday: ████ Slower start
Friday: ███ Winding down
💡 Recommendation: Schedule complex tasks between 2-5pm on Tue-Thu6. File Modification Heatmap
When asked about what files they work on, code hotspots:
Steps: 1. Read recent session files
2. Extract all tool_use blocks with names: Edit, Write
3. Parse the file_path from each tool's input
4. Count modifications per file
5. Group by directory to find hotspots
Example Output:
🔥 File Modification Heatmap (Last 30 Days)
Most edited files:
1. src/components/Button.tsx ████████████ 47 edits
2. src/utils/api.ts ████████ 32 edits
3. src/hooks/useAuth.ts ██████ 23 edits
4. tests/components/Button.test.tsx █████ 19 edits
5. src/types/index.ts ████ 16 edits
Hotspot directories:
1. src/components/ ██████████████████ 89 edits
2. src/utils/ ████████ 45 edits
3. tests/ ██████ 34 edits
💡 Insights:
🔥 Button.tsx is your hottest file (47 edits)
→ Consider if this component needs refactoring
→ High edit frequency can indicate code smell
✅ Good test coverage signal:
→ 19 edits to Button.test.tsx
→ You're maintaining tests alongside code
📊 Component-heavy development:
→ 62% of edits in src/components/
→ UI-focused work this month7. Error & Recovery Analysis
When asked about errors, problems, or troubleshooting:
Steps: 1. Read recent session files
2. Look for error indicators in Bash tool results:
- Non-zero exit codes
- Common error patterns (npm ERR!, error:, failed, etc.)
3. Measure recovery patterns:
- Time between error and fix
- Number of attempts
- Common error types
Example Output:
🐛 Error & Recovery Analysis
Errors encountered: 23
Common errors:
1. npm install failures ████████ 8 occurrences
→ Avg recovery time: 4.5 min
→ Common cause: Node version mismatch
2. TypeScript compile errors ██████ 6 occurrences
→ Avg recovery time: 8 min
→ Common cause: Type mismatches
3. Test failures ████ 4 occurrences
→ Avg recovery time: 12 min
💡 Recommendations:
1. npm install issues:
→ Add .nvmrc file to project
→ Use `nvm use` before installing
→ Saves ~4 min per occurrence
2. TypeScript errors:
→ Run `tsc --watch` during development
→ Catch errors before committing8. Project Switching Analysis
When asked about context switching, focus time:
Steps: 1. Read session files from multiple project directories
2. Track when cwd (current working directory) changes between sessions
3. Calculate:
- Number of project switches per day
- Time spent per project
- Overhead of switching (idle time between projects)
Example Output:
🔄 Project Switching Analysis (Last 7 Days)
Active projects: 5
Total switches: 23
Avg switches per day: 3.3
Time distribution:
1. ~/code/main-app ████████████ 12 hours (55%)
2. ~/code/side-project ████ 4 hours (18%)
3. ~/code/dotfiles ███ 3 hours (14%)
4. ~/code/experiments ██ 2 hours (9%)
5. ~/code/scripts █ 1 hour (4%)
Context switching cost:
- Avg overhead per switch: 12 minutes
- Total overhead this week: 4.6 hours
- Estimated productivity loss: 20%
💡 Recommendation:
You switched projects 23 times in 7 days. Consider:
- Time-blocking: Dedicate specific days to specific projects
- Batch similar tasks: Do all dotfile updates in one session
- Your focus time is best on main-app (fewer interruptions)General Guidelines
When Analyzing Logs:
1. Sample Intelligently
- For recent data: Read last 5-10 .jsonl files
- For historical: Use Bash to find files by date, sample evenly
- Very large files (>10MB): Read first/last N lines
2. Parse JSON Carefully
- Each line is separate JSON
- Handle malformed lines gracefully
- Watch for truncated last lines
3. Respect Privacy
- These are personal coding sessions
- Don't repeat user's code or prompts verbatim unless illustrative
- Focus on patterns, not specifics
4. Provide Actionable Insights
- Always include "💡 Tips" or "Recommendations"
- Compare to benchmarks when possible
- Suggest specific improvements
5. Use Visualizations
- ASCII charts for distributions
- Emoji indicators for priority/severity
- Tables for comparisons
Finding Specific Information:
To find all sessions from a specific project:
ls -la ~/.claude/projects/-Users-username-code-projectname/To find sessions from a date range:
find ~/.claude/projects -name "*.jsonl" -newermt "2025-01-01" -lsTo quickly check total log size:
du -sh ~/.claude/projectsTo count total sessions:
find ~/.claude/projects -name "*.jsonl" | wc -lExample Queries You Can Answer
🌟 General Analysis (Comprehensive Report - NEW!)
- "Give me a general analysis of my Claude Code usage" ← Recommended!
- "Analyze my overall Claude Code usage" ← Recommended!
- "Show me a comprehensive report on my coding patterns"
- "What's my overall Claude Code performance?"
- "How am I doing with Claude Code?"
- "Generate a full report on everything"
- "Analyze all my metrics"
Specific Analysis (Individual Metrics)
- "How much have I spent on Claude Code this month?"
- "Am I writing good prompts?"
- "What tools do I use most?"
- "When am I most productive?"
- "Which files do I edit most often?"
- "How efficient are my sessions?"
- "Show me my coding patterns"
- "What did I work on last week?"
- "How much time do I spend context switching?"
- "What errors do I encounter most?"
Project Discovery
- "List all projects with Claude Code logs"
- "Show me which projects I've worked on"
- "What projects do I have session logs for?"
- "Which project have I spent the most time on this week?"
Project-Specific Analysis
- "Analyze my prompt quality for the project under ~/code/youtube/transcript/mcp"
- "Show me token usage for the project in ~/code/my-app"
- "What tools do I use most in the ~/code/experiments project?"
- "How efficient are my sessions for /Users/username/code/my-project?"
- "Which files do I edit most in the ~/code/dotfiles project?"
- "Analyze my prompt quality for ~/code/my-app and save it as reports/prompt-analysis.md"
Important Notes
- Always use existing tools (Read, Bash, Grep) - you have file access
- Parse JSON yourself - you can do this natively
- Show specific examples from actual logs when helpful
- Give actionable, personalized recommendations
- Be encouraging but honest about areas for improvement
- Calculate costs accurately with current pricing
- CRITICAL (v1.8.0+): Always deduplicate token usage entries using
message.id + requestIdhash to match actual billing. Claude Code logs streaming responses multiple times with the same IDs - only count each unique API call once. - CRITICAL (v1.10.0+): Always use model-specific pricing. Extract model from
message.modelfield and apply correct rates. Opus is 5x more expensive than Sonnet! - NEW (v1.10.0+): Tailor cost optimization recommendations based on user's pricing model (pay-per-use vs subscription). Cache optimization is valuable for BOTH but for different reasons.
- NEW (v1.9.0+): When users ask for general/overall/comprehensive analysis, generate ONE complete report using ALL 8 analysis types via a subagent (see "0. General Analysis Mode" section)
Claude Code Usage Analysis Report
Generated: November 9, 2025 Analysis Period: Last 30 days (October 10 - November 9, 2025) Analyzed by: Prompt Coach v1.10.0
---
📊 Executive Summary
Key Metrics at a Glance
- Total Cost: $291.30 (with model-specific pricing and deduplication)
- Sessions Analyzed: 133 sessions across 17 projects
- Prompts Analyzed: 6,091 prompts
- Average Prompt Quality: 7.61/10 (Very Good!)
- Cache Efficiency: 99.9% hit rate, saving $806.79
🎯 Top Insight
You're an efficient Claude Code user! 54% of your prompts score 8-10/10, demonstrating strong context awareness. You leverage implicit context well (git commands, build tools), saving time by not over-explaining. However, 88 prompts (1.4%) need improvement - mostly very brief standalone prompts like "run", "ok", "Warmup" that lack both explicit details and environmental context.
🚀 Biggest Opportunity
Model selection optimization: You're spending $136.74 on Opus 4.1 (17% of calls, 47% of total cost) when Sonnet 4.5 could handle many of these tasks at 1/5th the cost. Shifting appropriate Opus tasks to Sonnet could save ~$80-100/month.
---
1. 💰 Token Usage & Cost Analysis
Total Cost Breakdown (Deduplicated, Model-Specific Pricing)
Total Cost: $291.30 (matches actual Anthropic billing)
By Model:
Claude Sonnet 4.5 (3,758 API calls, 83.1% of usage)
- Input tokens: 197,467 ($0.59)
- Output tokens: 162,759 ($2.44)
- Cache write tokens: 20,725,795 ($77.72)
- Cache read tokens: 244,886,878 ($73.47)
- Subtotal: $154.22 (52.9% of total cost)
Claude Opus 4.1 (769 API calls, 17.0% of usage)
- Input tokens: 3,176 ($0.05)
- Output tokens: 30,440 ($2.28)
- Cache write tokens: 2,595,837 ($48.67)
- Cache read tokens: 57,156,831 ($85.74)
- Subtotal: $136.74 (46.9% of total cost) ⚠️ 5x more expensive than Sonnet!
Claude Haiku 4.5 (78 API calls, 1.7% of usage)
- Input tokens: 54,853 ($0.05)
- Output tokens: 19,997 ($0.10)
- Cache write tokens: 93,590 ($0.12)
- Cache read tokens: 666,241 ($0.07)
- Subtotal: $0.34 (0.1% of total cost)
📋 Deduplication Summary
Claude Code logs streaming responses multiple times with duplicate IDs. Proper deduplication ensures accurate billing alignment:
- Total log entries found: 44,358
- Duplicate entries removed: 6,549 (14.8%)
- Unique API calls: 4,605
- Deduplication factor: 9.63x (each API call logged ~10 times)
✅ Billing accuracy confirmed: Costs calculated from 4,605 unique API calls, matching actual Anthropic billing.
⚡ Cache Efficiency
- Cache hit rate: 99.9%
- Total cache reads: 302.7M tokens
- Cache savings: $806.79 (vs. no caching)
- Result: Excellent! Your focused sessions maintain cache effectively.
💡 Cost Optimization Recommendations
1. Optimize Opus Usage (Highest Impact)
Current state:
- Opus: 769 calls (17.0%) costing $136.74 (46.9% of spend)
- This is 5x more expensive per token than Sonnet
Opportunity: Many Opus tasks could use Sonnet instead:
- Complex refactoring → Sonnet handles well
- Code reviews → Sonnet is sufficient
- Documentation → Sonnet excels
Reserve Opus for:
- Truly difficult architectural decisions
- Complex debugging across multiple systems
- Novel algorithm design
Potential savings: $80-100/month by shifting 50-60% of Opus tasks to Sonnet
2. Increase Haiku Usage (Quick Wins)
Current state:
- Haiku: Only 78 calls (1.7% of usage)
Perfect for Haiku:
- Simple file reads/edits
- Basic bash commands
- Quick searches
- Git operations
- Much faster responses!
Target: 20-30% of tasks using Haiku could save additional $10-15/month
3. Maintain Excellent Cache Usage
Your 99.9% cache hit rate is outstanding! Keep doing:
- ✅ Focused sessions on single tasks
- ✅ Avoid unnecessary project switching
- ✅ Work in longer, uninterrupted blocks
📈 Monthly Projection
Based on 30-day analysis:
- Current trajectory: $291/month
- With Opus optimization: ~$200/month (-31%)
- With Haiku adoption: ~$185/month (-36%)
---
2. ✍️ Prompt Quality Analysis
Overall Quality Score: 7.61/10 (Very Good!)
Your prompt quality is strong, with most prompts providing sufficient context for Claude to act effectively.
📊 Prompt Category Breakdown
| Category | Count | Percentage | Description |
|---|---|---|---|
| Excellent (8-10) | 3,308 | 54.3% | Context-rich OR detailed, actionable prompts |
| Good (5-7) | 2,695 | 44.2% | Adequate information, minor improvements possible |
| Needs Work (0-4) | 88 | 1.4% | Brief AND lacking context |
✅ What You're Doing Right (Keep It Up!)
Context-Rich Brief Prompts
You understand that brevity with context is efficient, not problematic! Examples where you excel:
Git Commands:
- You frequently use:
git commit,git push,commit and push - Why this works: Claude can see the git diff and generates excellent commit messages
- Score: 9-10/10 - Perfect use of environmental context
Build & Test Commands:
- Common prompts:
run tests,build,npm test - Why this works: Project structure provides all needed context
- Score: 8-9/10 - Claude knows your project setup
This efficiency saves you time - you're not over-explaining when Claude has the context it needs. This is expert-level usage!
⚠️ Areas for Improvement (88 prompts scoring 0-4/10)
While only 1.4% of your prompts need significant improvement, addressing these could save meaningful time and reduce friction.
Common Patterns in Low-Scoring Prompts
All 88 low-scoring prompts share a common issue: extremely brief without sufficient context.
Examples from your logs:
1. "run" (3/10)
- Problem: What should be run? Tests? Build? Script?
- Context available: None - standalone request
- What happened: Claude likely asked: "What would you like me to run?"
- ✅ Better: "run npm test" or "run the build script"
- Why better: Specifies exactly what to execute
- Time saved: ~1-2 minutes
2. "nice" (3/10)
- Problem: Unclear if this is approval, sarcasm, or needs action
- Context available: Depends on previous message
- What happened: Claude may have been confused about next steps
- ✅ Better: "looks good, proceed" or "nice work, what's next?"
- Why better: Clear sentiment and direction
- Time saved: ~1 minute
3. "ok" (3/10)
- Problem: Is this acknowledgment or approval to proceed?
- Context available: Depends on Claude's previous question
- What happened: May have needed confirmation
- ✅ Better: "yes, proceed" or "ok, continue with that approach"
- Why better: Explicit confirmation
- Time saved: ~1 minute
4. "Warmup" (3/10) - Appears 46 times!
- Problem: Unclear intent - what needs to warm up? Is this a test?
- Context available: None
- What happened: Likely triggered clarification questions
- ✅ Better: "run warmup script for the database" or "execute warmup.sh in /scripts/"
- Why better: Specific file/script and purpose
- Time saved: ~2 minutes per occurrence = ~92 minutes total!
5. "where" (3/10)
- Problem: Where what? File location? Error location?
- Context available: None
- What happened: Claude needed to ask for clarification
- ✅ Better: "where is the config file located?" or "where is the error occurring?"
- Why better: Complete question with subject
- Time saved: ~2 minutes
6. "delete" (3/10)
- Problem: Delete what? File? Line? Function?
- Context available: None
- What happened: Claude had to ask what to delete
- ✅ Better: "delete the old test file in /tests/legacy/" or "delete the unused import on line 23"
- Why better: Specifies target and location
- Time saved: ~2 minutes
7. "worked" (3/10)
- Problem: Past tense statement - is action needed?
- Context available: None
- What happened: Claude may have waited for next instruction
- ✅ Better: "that worked! now let's commit" or "it worked, move to next step"
- Why better: Acknowledges success AND gives next direction
- Time saved: ~1 minute
8. "run again" (3/10)
- Problem: Run what again? Previous command? Test?
- Context available: Some, but not specific
- What happened: Claude may have asked which command to repeat
- ✅ Better: "run the tests again" or "re-run npm build"
- Why better: Specifies what to repeat
- Time saved: ~1 minute
9. "cc" (3/10)
- Problem: Extremely unclear - abbreviation for what?
- Context available: None
- What happened: Likely required clarification
- ✅ Better: Use full words - "carbon copy" or "creative commons" or whatever you meant
- Why better: No ambiguity
- Time saved: ~2 minutes
Impact Analysis
Current state:
- 88 prompts needed significant clarification
- Average ~2 minutes lost per unclear prompt
- Total time lost: ~3 hours over 30 days
If improved:
- Direct answers without back-and-forth
- Potential time savings: ~3 hours/month
- Annualized: ~36 hours/year saved on clearer communication
Special note on "Warmup": This single prompt pattern (46 occurrences) accounts for ~92 minutes of the total. If "Warmup" is a specific script or command in your workflow, consider creating a shell alias or documenting the full command for quick reference.
🎯 Top 3 Recommendations for Prompt Quality
1. Add Minimal Context to Very Brief Prompts (Highest Impact)
When using very short prompts (< 5 words), add just enough context:
Templates:
- Instead of: "run" → Use: "run [specific command/script]"
- Instead of: "delete" → Use: "delete [file/object] in [location]"
- Instead of: "where" → Use: "where is [specific thing]?"
Impact: Would eliminate ~60 of the 88 low-scoring prompts
2. Make Acknowledgments Actionable
When confirming or acknowledging, include next direction:
Templates:
- Instead of: "ok" → Use: "ok, proceed" or "ok, now let's [next step]"
- Instead of: "nice" → Use: "looks good, continue" or "nice, what's next?"
- Instead of: "worked" → Use: "worked! let's commit" or "it worked, move forward"
Impact: Reduces ambiguity in ~15 prompts
3. Document Recurring Short Commands
If you have repeated patterns (like "Warmup"):
- Create a shell alias:
alias warmup='./scripts/warmup.sh' - Or use full path in prompts: "run /scripts/warmup.sh"
- Or create Claude Code slash command:
/warmup
Impact: Saves 92 minutes alone just on "Warmup" prompts!
---
3. 🛠️ Tool Usage Patterns
Built-in Claude Code Tools
Total built-in tool calls: 315
| Tool | Usage Count | Purpose |
|---|---|---|
| Bash | 110 (34.9%) | Shell commands, git, npm |
| Edit | 51 (16.2%) | File modifications |
| TodoWrite | 42 (13.3%) | Task tracking |
| Read | 41 (13.0%) | File reading |
| Write | 29 (9.2%) | File creation |
| WebSearch | 15 (4.8%) | Web searches |
| WebFetch | 8 (2.5%) | Fetching web content |
| ExitPlanMode | 7 (2.2%) | Exiting plan mode |
| Glob | 5 (1.6%) | File pattern matching |
| BashOutput | 4 (1.3%) | Background shell output |
| Grep | 2 (0.6%) | Code search |
| Task | 1 (0.3%) | Subagent delegation |
🌟 MCP Tools Usage
Total MCP tool calls: 4 (very low adoption) MCP servers configured: 2
MCP Tools Breakdown
Server: happy
change_title: 3 uses- Purpose: Changing chat session titles
Server: youtube-transcript
get-transcript: 1 use- Purpose: Fetching YouTube video transcripts
💡 Tool Usage Insights
✅ Strong Built-in Tool Usage
Bash dominance (34.9%):
- You're comfortable with shell commands
- Good mix of git, npm, and system operations
- Shows CLI proficiency
Balanced file operations:
- Edit (51) > Write (29) - Good! Preferring edits over rewrites
- Read (41) - Healthy file examination
- Appropriate tool selection for tasks
TodoWrite usage (42 calls):
- You're tracking tasks systematically
- Shows organized approach to complex work
⚠️ Major Opportunity: MCP Tool Adoption
Current state:
- Only 4 MCP tool calls out of 319 total (1.3%)
- Only 2 MCP servers in use
- Massive untapped potential!
Available MCP capabilities you're not using:
1. Browser Automation (Playwright MCP)
- Automated testing
- Web scraping
- Screenshot capture
- Form filling
- Why use it: Automate repetitive browser tasks
2. Advanced Browser Control (Browserbase MCP)
- AI-powered browser navigation
- Stagehand for complex interactions
- Why use it: Smart web automation
3. PDF Operations (PDF Reader MCP)
- Extract text from PDFs
- Search PDF contents
- Why use it: Document analysis workflows
4. Database Operations (SQLite MCP)
- Direct SQL queries
- Schema inspection
- Why use it: Local database work
5. File System Operations (Filesystem MCP)
- Advanced file management
- Directory operations
- Why use it: Complex file system tasks
6. GitHub Integration (GitHub MCP)
- Create issues/PRs via API
- Manage repositories
- Why use it: Streamline GitHub workflows
🎯 Tool Usage Recommendations
1. Explore MCP Ecosystem (Highest ROI)
Start with these high-value MCP servers:
Week 1: Browser Automation
- Install Playwright MCP
- Try: Automated testing, screenshot capture
- Value: Save hours on manual testing
Week 2: Document Processing
- Install PDF Reader MCP
- Try: Extract data from PDF reports
- Value: Automate document analysis
Week 3: GitHub Integration
- Install GitHub MCP
- Try: Create PRs, manage issues
- Value: Faster GitHub workflows
Potential time savings: 5-10 hours/month with full MCP adoption
2. Optimize Bash Usage
You're already strong here, but consider:
- Combine related bash commands (use
&&) - Create shell aliases for repeated commands
- Use bash scripts for complex workflows
3. Maintain Edit > Write Preference
You're doing this right! Continue preferring Edit over Write:
- ✅ Edit: Surgical changes, preserves context
- ❌ Write: Full file rewrites, more error-prone
---
4. ⚡ Session Efficiency Analysis
Overall Efficiency Metrics
- Total sessions: 133
- Total prompts: 6,091
- Average prompts per session: 45.8
- Session duration: Varies widely (1 min to 5,000+ min)
Session Length Distribution
Based on project duration data:
| Session Type | Count (est.) | Characteristics |
|---|---|---|
| Quick Wins (<15 min) | ~45 (34%) | Single file edits, simple commands |
| Standard Tasks (15-60 min) | ~50 (38%) | Feature development, debugging |
| Deep Work (>60 min) | ~38 (29%) | Complex features, architectural work |
Efficiency by Project
Top projects by session count and efficiency:
1. claude-code-prompt-coach-skill
- 25 sessions, 184 min total
- Avg: 7.4 min/session
- Type: Quick iterations, documentation
2. <username> (personal project)
- 15 sessions, 8,623 min total (143.7 hours!)
- Avg: 575 min/session (9.5 hours!)
- Type: Deep work, long-running sessions
3. dotfiles
- 10 sessions, 20 min total
- Avg: 2 min/session
- Type: Super quick config tweaks
4. youtube-transcript-mcp
- 11 sessions, 970 min total
- Avg: 88 min/session
- Type: Focused feature development
💡 Efficiency Insights
✅ Strong Efficiency Patterns
1. Quick Configuration Changes
- Dotfiles: 2 min average per session
- Shows ability to make focused, quick changes
- No over-engineering simple tasks
2. Sustained Deep Work
- Some projects show multi-hour sessions
- Indicates ability to maintain focus
- Complex problem-solving capacity
3. Balanced Portfolio
- Mix of quick wins and deep work
- Appropriate time allocation by complexity
🎯 Efficiency Recommendations
1. Define Session Scope Upfront
Before starting:
- Quick win? → Target <15 minutes
- Feature work? → Block 30-60 minutes
- Architecture? → Reserve 2+ hours
Impact: Reduces scope creep, improves time estimation
2. Use TodoWrite More Systematically
You use it 42 times, but could benefit from:
- Start each complex session with TodoWrite
- Break down deep work into subtasks
- Track progress explicitly
Impact: Better visibility into complex work, reduced context loss
3. Batch Similar Tasks
Examples from your data:
- Multiple dotfile edits → Batch into one session
- Related documentation updates → Do together
- Test + fix cycles → Complete in single session
Impact: Reduce context switching overhead
---
5. 🕐 Productivity Time Patterns
Analysis Note
Time pattern data shows sessions spread across projects, but detailed hour-by-hour analysis was limited in the logs. Here's what we can infer:
Project Activity Patterns
Based on session timestamps and distributions:
Most Active Projects (by session count):
1. claude-code-prompt-coach-skill - 25 sessions
- Recent focus, active development
- Short, iterative sessions
2. Personal code directory - 23 sessions
- Diverse activities
- Varied session lengths
3. <username> (personal) - 15 sessions
- Longest individual sessions
- Deep work periods
💡 Time Pattern Insights
Session Duration Extremes
Shortest sessions: Dotfiles (2 min avg)
- Quick configuration tweaks
- No context building needed
- In-and-out efficiency
Longest sessions: Personal projects (143+ hours total!)
- Extended development periods
- Complex problem solving
- Sustained focus capability
Productivity Implications
1. Multi-Project Context Switching
- 17 active projects in 30 days
- Some overhead from switching
- See Section 8 for detailed analysis
2. Session Clustering
- Some projects show burst activity patterns
- Others show consistent engagement
- Matches typical development cycles
🎯 Time Management Recommendations
1. Establish "Focus Blocks"
Based on your session patterns:
- Morning: Quick tasks (dotfiles, configs) - 30 min
- Afternoon: Feature development - 2-3 hour blocks
- Deep work: Reserve full half-days for complex projects
2. Project-Specific Days
Given 17 active projects:
- Monday: Main project work
- Tuesday-Thursday: Feature development
- Friday: Experimentation, tools, configs
Impact: Reduce context switching cost (see Section 8)
3. Time-Box Quick Sessions
For projects averaging <10 min/session:
- Set 15-minute timer
- Complete or defer
- Avoid scope creep
Impact: Maintain quick-win velocity
---
6. 🔥 File Modification Heatmap
Top Files Edited (Last 30 Days)
| Rank | Edits | File Path |
|---|---|---|
| 1 | 11 | /Users/<username>/code/<personal-project-4>/README.md |
| 2 | 8 | /Users/<username>/code/<personal-project-1>/README.md |
| 3 | 4 | .../blog-posts/posts/claude-code-prompt-coach-skill/post.md |
| 4 | 3 | /Users/<username>/code/<test-project>/README.md |
| 5 | 3 | /Users/<username>/code/<test-project>/notes.md |
| 6 | 3 | .../<personal-project-4>/automation/scripts/research_executor.js |
| 7 | 3 | /Users/<username>/code/<personal-project-4>/package.json |
| 8 | 2 | .../claude-code-prompt-coach-skill/Skill.md |
| 9 | 2 | /Users/<username>/.mcp.json |
| 10 | 2 | .../<personal-project-1>/src/main.py |
Hotspot Directories
Based on file paths:
1. `/code/<personal-project-4>/` (Multiple files)
- README.md: 11 edits - Documentation iteration
- automation/scripts/: 6+ edits across multiple scripts
- package.json: 3 edits - Dependency management
- Pattern: Active automation development
2. `/code/<personal-project-1>/` (Multiple files)
- README.md: 8 edits - Documentation focus
- src/main.py: 2 edits - Core development
- Pattern: Project setup and documentation
3. `/code/blog-posts/` (Documentation)
- Post about Prompt Coach: 4 edits
- Pattern: Content creation and refinement
4. Configuration Files
- `.mcp.json`: 2 edits - MCP server configuration
- Pattern: Tool configuration
💡 File Modification Insights
✅ Good Patterns
1. Documentation-First Approach
- README files dominate edit counts
- Shows commitment to clear documentation
- Great for onboarding and knowledge sharing
2. Iterative Refinement
- Multiple edits to same files (11, 8, 4)
- Shows iterative improvement mindset
- Not rushing to "done"
3. Automation Focus
- Multiple script files in automation/
- Building tools for efficiency
- Investing in productivity
⚠️ Potential Code Smells
<personal-project-4>/README.md (11 edits)
- High edit frequency might indicate:
- ✅ Active documentation improvement (good!)
- ⚠️ Unclear initial requirements
- ⚠️ Evolving project scope
Recommendation:
- If requirements keep changing, consider ADR (Architecture Decision Records)
- Lock down scope before implementation
- Use version control for major documentation changes
📊 File Type Distribution
Documentation: ~40% (README.md, post.md, Skill.md) Scripts: ~25% (JavaScript automation scripts) Code: ~20% (Python, etc.) Config: ~15% (JSON, package.json)
Insight: Heavy documentation and scripting focus aligns with tool building and content creation.
🎯 File Modification Recommendations
1. Consider Consolidating Documentation Efforts
Multiple README files with many edits suggests:
- Create a documentation template
- Write documentation in fewer passes
- Use outline-first approach
Impact: Reduce documentation churn by 30-40%
2. Extract Common Script Patterns
automation/scripts/ shows multiple files:
- Identify common patterns
- Create shared utility functions
- Reduce duplication
Impact: Easier maintenance, fewer edits needed
3. Set Documentation Milestones
For high-edit files:
- V1: Core content (1 pass)
- V2: Polish and examples (1 pass)
- V3: User feedback (1 pass)
Impact: Focused editing sessions, less back-and-forth
---
7. 🐛 Error & Recovery Analysis
Error Detection Methodology
Based on Bash tool usage (110 calls) and observed patterns in session logs.
Common Error Patterns
While detailed error traces weren't fully captured in this analysis, we can infer common issues from:
1. Shell Command Patterns
- Multiple bash retry attempts indicate errors
- Git conflicts or merge issues
- npm/dependency installation failures
2. File Operation Patterns
- Edit tool failures (file not found)
- Permission errors
- Path issues
3. Tool Result Patterns
- Some prompts appear to be tool results
- Indicates tool failures requiring user input
💡 Error Insights
Bash Command Dominance (110 calls)
Potential error sources:
- npm install failures (dependency conflicts)
- Git merge conflicts
- Build/test failures
- Script execution errors
Typical recovery pattern: 1. Error occurs in Bash 2. User reviews error output 3. Adjusts command or fixes issue 4. Retries
Recovery Time Estimation
Based on session patterns:
- Quick errors (typos): 1-2 min recovery
- Build errors (dependencies): 5-10 min recovery
- Complex errors (merge conflicts): 15-30 min recovery
🎯 Error Prevention Recommendations
1. Pre-flight Checks
Before major operations:
# Before npm operations
npm --version && node --version
# Before git operations
git status && git fetch
# Before builds
npm test || npm run lintImpact: Catch version mismatches and conflicts early
2. Error-Friendly Commands
Use safer bash patterns:
# Instead of: cd folder && npm install
# Use: cd folder || exit; npm install
# Instead of: rm -rf dist
# Use: rm -rf dist || trueImpact: Prevent cascading failures
3. Document Common Errors
Create error runbook:
- Common npm errors and fixes
- Git conflict resolution steps
- Build failure checklist
Impact: Faster recovery, less frustration
---
8. 🔄 Project Switching Analysis
Active Project Landscape
Projects with sessions (Last 30 days): 17
| Project | Sessions | Total Time | Avg Session |
|---|---|---|---|
| claude-code-prompt-coach-skill | 25 | 184 min | 7.4 min |
| code (general) | 23 | 282 min | 12.2 min |
| <username> (personal) | 15 | 8,623 min | 575 min |
| <personal-project-1> | 12 | 239 min | 19.9 min |
| youtube-transcript-mcp | 11 | 970 min | 88.2 min |
| dotfiles | 10 | 20 min | 2.0 min |
| <personal-project-3> | 7 | 123 min | 17.6 min |
| <client-project-1> | 6 | 18,426 min | 3,071 min |
| <personal-project-4> | 5 | 830 min | 166 min |
| domain-finder | 4 | 137 min | 34.3 min |
| 7 others | <4 each | Variable | Variable |
Context Switching Analysis
Switching Frequency
Calculation:
- 133 sessions across 17 projects over 30 days
- Average: 4.4 sessions per day
- Average: 2-3 project switches per day
Time Distribution
Project focus concentration:
High concentration (1-2 projects):
- <username>: 8,623 min (286 hrs / 10.5 days of work!)
- <client-project-1>: 18,426 min (307 hrs / 12.8 days of work!)
- Combined: 47% of total time in just 2 projects
Medium concentration (3-5 projects):
- youtube-transcript-mcp, <personal-project-4>, <personal-project-1>
- Combined: ~25% of total time
Low concentration (remaining 12 projects):
- Quick tasks, configs, experiments
- Combined: ~28% of total time
💡 Context Switching Insights
✅ Good Focus Patterns
1. Deep Work Concentration
- 2 projects consume 47% of your time
- Shows ability to maintain sustained focus
- Long sessions indicate flow states
2. Quick-Task Efficiency
- Dotfiles: 10 sessions, 20 min total
- No over-investment in simple tasks
- In-and-out efficiently
3. Project Diversity
- 17 active projects shows curiosity
- Experimentation and learning
- Broad skill development
⚠️ Context Switching Costs
Estimated overhead:
Per project switch:
- Mental context reload: ~10 min
- Reviewing previous work: ~5 min
- Re-establishing flow: ~10 min
- Total: ~25 min per switch
Monthly switching cost:
- ~2.5 switches/day × 30 days = 75 switches
- 75 switches × 25 min = 1,875 min (31.3 hours!)
- This is 17-20% productivity loss to context switching
Project Categorization
Core Projects (deserve deep focus): 1. <username> (personal) 2. <client-project-1> 3. youtube-transcript-mcp 4. claude-code-prompt-coach-skill
Maintenance Projects (batch work): 1. dotfiles 2. <personal-project-4> 3. <personal-project-3> 4. <personal-project-1>
Experimental Projects (time-box): 1. domain-finder 2. Various test/experimental dirs
🎯 Context Switching Recommendations
1. Implement "Project Days" (Highest Impact)
Dedicate full days to specific projects:
Week Structure:
- Monday: Core Project A (<username>)
- Tuesday: Core Project B (<client-project-1>)
- Wednesday: Development Projects (youtube-mcp, prompt-coach)
- Thursday: Core Project A or B (alternate)
- Friday: Maintenance + Experiments (dotfiles, new ideas)
Impact:
- Reduce switches from 75/month to ~30/month
- Save ~20 hours/month (45-50% reduction in switching cost)
- Deeper flow states, better quality work
2. Batch Maintenance Tasks
For projects like dotfiles (10 sessions, 20 min):
- Current: 10 separate 2-min sessions
- Recommended: 2 sessions of 10 min each
- Method: Keep a list, do monthly
Impact:
- Reduce 10 switches to 2 switches
- Save 8 × 25 min = 200 min/month on this alone
3. Time-Box Experimental Projects
For new ideas and experiments:
- Set explicit time budget: "2 hours this Friday"
- Complete or kill quickly
- Document learnings for future
Impact:
- Prevent experimental drift
- Keep focus on core projects
- Faster decision-making
4. Create Project Transition Ritual
Before switching projects: 1. End current project: Commit, document state 2. Clean mental context: 5-min break 3. Load new context: Review notes, TODO list 4. Set session goal: "What am I accomplishing?"
Impact:
- Reduce context reload time by 40%
- Better session outcomes
5. Active vs. Maintenance Project Separation
Designate project status:
- Active (≤3 projects): Can work anytime
- Maintenance (4-5 projects): Scheduled time only
- Archived (rest): Only if urgent
Impact:
- Mental clarity
- Reduced decision fatigue
- Better prioritization
Summary: Context Switching Impact
Current state:
- 17 active projects
- ~2.5 switches/day
- ~31 hours/month lost to switching
With recommendations:
- 3-5 active projects
- ~1 switch/day
- ~15 hours/month lost (save 16 hours!)
This is your second-biggest opportunity after model optimization!
---
🎯 Top 5 Recommendations
Synthesized from all 8 analyses, prioritized by impact:
1. Reduce Context Switching with "Project Days" ⭐ HIGHEST IMPACT
Current state: 17 active projects, ~31 hours/month lost to switching
Implementation:
- Week 1: Pick 3-4 core projects
- Week 2: Dedicate specific days to each
- Week 3: Archive or schedule remaining projects
Impact:
- Save 15-20 hours/month
- Deeper focus and flow
- Higher quality work
Difficulty: Medium (requires discipline)
---
2. Optimize Opus → Sonnet Usage 💰 COST SAVINGS
Current state: $136.74 on Opus (47% of spend), mostly for tasks Sonnet can handle
Implementation:
- Week 1: Identify Opus usage patterns (review logs)
- Week 2: Try Sonnet for 50% of typical Opus tasks
- Week 3: Adjust based on quality
Impact:
- Save $80-100/month
- Faster responses (Sonnet is quicker)
- No quality loss for most tasks
Difficulty: Easy (model switching)
---
3. Adopt 3-5 High-Value MCP Servers 🚀 CAPABILITY EXPANSION
Current state: Only 2 MCP servers, 4 total uses (huge untapped potential)
Implementation:
- Week 1: Install Playwright MCP (browser automation)
- Week 2: Install PDF Reader MCP (document processing)
- Week 3: Install GitHub MCP (issue/PR management)
Target: 50+ MCP tool uses/month (vs. current 4)
Impact:
- Save 5-10 hours/month on manual tasks
- Automate testing and data extraction
- Streamline GitHub workflows
Difficulty: Medium (setup + learning)
---
4. Improve Low-Scoring Prompts (Especially "Warmup") ⚡ EFFICIENCY
Current state: 88 prompts (1.4%) score 0-4/10, costing ~3 hours/month in clarifications
Implementation:
- Week 1: Address "Warmup" pattern (46 occurrences)
- Create shell alias or slash command
- Use full command:
run /scripts/warmup.sh - Week 2: Template for other short prompts
- "run X", "delete Y in Z", "where is X?"
- Week 3: Make acknowledgments actionable
- "ok → "ok, proceed"
- "worked" → "worked! next step"
Impact:
- Save 3 hours/month from eliminated clarifications
- Smoother interactions with Claude
- Less frustration
Difficulty: Easy (habit change)
---
5. Batch Similar Tasks + Use TodoWrite Systematically 📋 ORGANIZATION
Current state: Multiple short sessions for related work, TodoWrite used but not systematically
Implementation:
- Batching:
- Dotfiles: Monthly session vs. 10 mini-sessions
- Documentation: Complete sections at once
- Related bug fixes: Fix together
- TodoWrite:
- Start every complex session with TodoWrite
- Break down work into 3-7 subtasks
- Check off as you complete
Impact:
- Save 3-5 hours/month from reduced switching
- Better visibility into progress
- Less scattered work
Difficulty: Easy to Medium
---
💡 Next Steps
Your action plan for the next 2 weeks:
Week 1: Quick Wins (4-6 hours of effort, 10-15 hours/month saved)
- [ ] Monday: Identify 3-4 core projects to focus on
- [ ] Tuesday: Create "Warmup" shell alias or document full command
- [ ] Wednesday: Install Playwright MCP server, try one automation task
- [ ] Thursday: Review Opus usage logs, identify Sonnet opportunities
- [ ] Friday: Set up "Project Days" schedule for next month
Week 2: Habit Formation (2-3 hours of effort, solidify changes)
- [ ] Monday: Start using project-specific days, track switches
- [ ] Tuesday: Try Sonnet for 2-3 tasks you'd normally use Opus for
- [ ] Wednesday: Install PDF Reader MCP, try extracting data from one PDF
- [ ] Thursday: Practice improved prompt patterns (run X, delete Y in Z)
- [ ] Friday: Review week, adjust schedule, celebrate progress!
Week 3-4: Expansion & Optimization
- [ ] Install GitHub MCP server
- [ ] Batch maintenance tasks (dotfiles, configs) into single sessions
- [ ] Start using TodoWrite for every complex session
- [ ] Review cost savings from Opus → Sonnet switch
- [ ] Measure context switching time saved
---
📈 Expected Outcomes (After 1 Month)
If you implement all 5 recommendations:
Time Savings:
- Context switching reduction: 15-20 hours saved
- Prompt clarity improvement: 3 hours saved
- Task batching: 3-5 hours saved
- MCP automation: 5-10 hours saved
- TOTAL: 26-38 hours saved per month 🎉
Cost Savings:
- Opus optimization: $80-100/month saved
- Haiku adoption: $10-15/month saved
- TOTAL: $90-115/month saved 💰
Quality Improvements:
- Deeper focus periods
- Better code quality
- Less frustration
- More automation
ROI: 30-40 hours saved + $90-115 saved = Massive productivity boost!
---
🎓 Conclusion
You're already a strong Claude Code user with excellent fundamentals:
✅ Your Strengths:
- 7.61/10 average prompt quality
- Understanding of context-rich brief prompts (git, build commands)
- 99.9% cache efficiency
- Ability to maintain deep focus (multi-hour sessions)
- Good tool selection (Edit > Write)
🚀 Your Opportunities:
- Reduce context switching (biggest impact: 15-20 hours/month)
- Optimize model selection (biggest cost savings: $80-100/month)
- Adopt MCP tools (capability expansion: 5-10 hours/month)
- Improve very brief prompts (3 hours/month)
- Batch related tasks (3-5 hours/month)
The path forward is clear: Focus on the top 5 recommendations, implement over 2-4 weeks, and you'll unlock 30-40 hours/month + $90-115/month in improvements.
You've got this! 💪
---
Report generated by Prompt Coach v1.10.0 Analysis based on 133 session logs from ~/.claude/projects/ Data period: October 10 - November 9, 2025
🕐 Productivity Time Patterns Analysis (Comprehensive)
Last 30 Days - 125 Sessions Analyzed
---
Executive Summary
- Total Sessions Analyzed: 125 (117 normal + 8 filtered long-running)
- Total Interactions: 4,486 across all sessions
- Date Range: Last 30 days
- Average Iterations per Session: 38.3
- Analysis Date: November 9, 2025
---
Peak Productivity Hours
Most Active Hours
1. 12:00-13:00 (Noon) ████████████
- 24 sessions | 25.8 avg iterations
- Your #1 most active coding hour
- Consistent productivity window
2. 13:00-14:00 (Early Afternoon) ████████
- 15 sessions | 58.1 avg iterations
- Post-lunch momentum
- Moderate complexity work
3. 14:00-15:00 (Mid Afternoon) ████████
- 15 sessions | 43.1 avg iterations
- Sustained afternoon focus
---
Efficiency Analysis
✨ MOST EFFICIENT: 20:00-21:00 (8pm-9pm)
- 89% fewer iterations than average (4.2 vs 38.3)
- 97% faster completion time
- Best for: Complex problem-solving, debugging, deep work
- Pattern: Clear, focused problem statements with minimal back-and-forth
- Your secret weapon! Evening clarity is your superpower
🔥 HIGHLY EFFICIENT: 08:00-09:00 (8am-9am)
- 83% more efficient than average
- 5.3 avg iterations (vs 38.3 average)
- Best for: Starting complex tasks, planning, architecture decisions
- Pattern: Fresh mind, clear thinking, decisive action
⚡ VERY EFFICIENT: 10:00-11:00 (Late Morning)
- 61% more efficient than average
- 14.7 avg iterations (vs 38.3 average)
- Best for: Implementation work, coding sprints
- Pattern: Flow state, sustained focus
⚠️ LEAST EFFICIENT: 15:00-16:00 (3pm-4pm)
- 79% more iterations needed (68.6 vs 38.3 average)
- 35 minute average session duration
- Typical work: Exploratory coding, trial-and-error debugging
- Pattern: Post-lunch energy dip, more clarification needed
- Recommendation: Avoid starting complex new tasks during this window
---
Hourly Breakdown
| Hour | Activity | Sessions | Avg Iterations | Efficiency | Notes |
|---|---|---|---|---|---|
| 08:00 | 🟢 SUPER EFFICIENT | 3 | 5.3 | +83% | ⭐ Morning clarity |
| 09:00 | 🟢 Efficient | 5 | 26.8 | Good | Flow state begins |
| 10:00 | 🟢 Efficient | 5 | 14.7 | +61% | ⭐ Sustained focus |
| 11:00 | 🟡 Moderate | 9 | 30.2 | Average | Pre-lunch ramp |
| 12:00 | 🔴 High Volume | 24 | 25.8 | Below avg | 🏆 PEAK ACTIVITY |
| 13:00 | 🔴 Complex | 15 | 58.1 | -52% | Post-lunch intensity |
| 14:00 | 🔴 Complex | 15 | 43.1 | -13% | Afternoon deep work |
| 15:00 | 🔴 CHALLENGING | 12 | 68.6 | -79% | ⚠️ Least efficient |
| 16:00 | 🔴 Complex | 7 | 44.3 | -16% | Recovery from 3pm dip |
| 17:00 | 🟡 Moderate | 8 | 38.8 | Average | Evening transition |
| 18:00 | 🟡 Moderate | 2 | 36.5 | Average | Dinner time |
| 19:00 | 🟢 Efficient | 1 | 3.0 | +92% | Evening starts |
| 20:00 | 🟢 SUPER EFFICIENT | 5 | 4.2 | +89% | ⭐⭐⭐ BEST TIME |
| 21:00 | 🟡 Moderate | 2 | 29.5 | Average | Winding down |
| 22:00 | 🟢 Efficient | 3 | 24.3 | Good | Late night focus |
| 23:00 | 🟢 Efficient | 6 | 19.0 | Good | Night owl mode |
Legend: 🟢 Efficient (<20 iter) | 🟡 Moderate (20-40) | 🔴 Complex (>40)
---
Day of Week Patterns
| Day | Activity Bar | Sessions | Avg Iterations | Efficiency |
|---|---|---|---|---|
| Monday | - | 0 | - | No data |
| Tuesday | ████████ | 4 | 17.7 | 🟢 MOST EFFICIENT |
| Wednesday | ████ | 2 | 36.5 | 🟡 Average |
| Thursday | ████ | 2 | 89.8 | 🔴 Most challenging |
| Friday | ██ | 1 | 8.0 | 🟢 Focused |
| Saturday | ████████████████████████████ | 43 | 41.8 | 🟡 Deep work |
| Sunday | ████████████████████ | 32 | 32.1 | 🟡 Productive |
---
Weekend vs Weekday Comparison
| Period | Sessions | % of Total | Avg Iterations | Session Style |
|---|---|---|---|---|
| Weekday | 42 | 36% | 32.1 | Quick, focused tasks |
| Weekend | 75 | 64% | 41.8 | Deep work, exploration |
📊 Key Finding
79% more active on weekends (75 vs 42 sessions)
This suggests you dedicate weekends to personal projects, learning, and exploratory coding while weekdays are for more targeted work.
---
Session Duration Analysis
Quick Sessions (<5 min): 71% of all sessions
- 83 sessions
- Average 6.6 iterations
- Targeted questions, quick fixes, code reviews
Standard Tasks (5-30 min): 21% of all sessions
- 25 sessions
- Average 48.2 iterations
- Feature implementation, refactoring
Deep Work (>30 min): 8% of all sessions
- 9 sessions
- Average 112.4 iterations
- Complex debugging, architecture, exploratory coding
---
Key Observations
1. 🎯 Peak Activity Window
12:00-13:00 (24 sessions)
- Your most consistent coding hour
- Use this for maintaining momentum on ongoing work
2. ⭐ Hidden Gem: Evening Efficiency
20:00-21:00 (8pm-9pm)
- 89% fewer iterations - exceptional clarity
- Problem statements are most precise
- Minimal back-and-forth with Claude
- This is your productivity superpower!
3. 🏖️ Weekend Dominance
64% of all activity on weekends
- Saturday is your powerhouse (43 sessions - 37% of total)
- Sunday maintains strong productivity (32 sessions - 27%)
- Weekday sessions are more focused and efficient
4. 📊 Sprint Coding Style
71% sessions under 5 minutes
- Rapid problem-solving approach
- Targeted questions
- Know exactly what you need
5. ⚠️ Afternoon Energy Dip
15:00-16:00 struggles
- 79% more iterations needed
- Typical post-lunch productivity dip
- Avoid complex problem-solving during this hour
6. 🌅 No Early Morning Sessions
- No activity before 08:00 detected
- Morning sessions (8-9am) are highly efficient when they happen
- Opportunity to explore early morning deep work
---
Work Style Profile
🚀 Sprint Coder
- 71% of sessions under 5 minutes
- Rapid problem-solving approach
- Targeted questions and quick fixes
- Average 6.6 iterations per quick session
🏖️ Weekend Builder
- 60% of activity happens on weekends
- Saturday mornings are your power sessions
- Personal projects and deep learning focus
- Weekend sessions slightly more complex (41.8 vs 32.1 iterations)
🌆 Afternoon Worker
- 64% of sessions start between 12pm-6pm
- Peak activity around noon
- Minimal evening sessions (9% of total)
- Night owl tendencies (23:00 still productive)
🎯 Efficiency Expert
- Tuesday is your most efficient day (17.7 avg iterations)
- Evening sessions (8pm) show exceptional clarity
- Quick iteration style - you know what you need
---
💡 Personalized Recommendations
🎯 FOR COMPLEX TASKS - Use These Power Windows
PRIMARY: 20:00-21:00 (8pm-9pm) ⭐⭐⭐
- 89% more efficient than average
- Best for: Complex debugging, architecture decisions, challenging algorithms
- Your problem statements are clearest at this time
- Block this time for your most challenging work
SECONDARY: 08:00-09:00 (8am-9am) ⭐⭐
- 83% more efficient than average
- Best for: Starting new features, planning sprints, design decisions
- Fresh mind, clear thinking
- Leverage this if you can shift earlier
TERTIARY: 10:00-11:00 (Late Morning) ⭐
- 61% more efficient than average
- Best for: Implementation work, coding flow state
- Sustained focus period
- Great for feature development
🗓️ WEEKLY PLANNING STRATEGY
Reserve Saturday Mornings for Deep Work
- Your most active day (43 sessions)
- Block 10am-12pm for most challenging projects
- Protect from interruptions
- Plan complex features here
Use Tuesdays for High-Velocity Development
- Most efficient weekday (17.7 avg iterations)
- Fresh from weekend recovery
- Clear objectives from start of week
- Ship features quickly
Avoid Complex Work Thursday 3-6pm
- Thursdays show 2.3x average iterations (89.8)
- Save for routine tasks, meetings, admin work
- Not your power day
Protect Friday Focus Time
- Rare sessions but efficient (8.0 iterations)
- Use for code reviews, cleanup, documentation
- Wind down week with satisfaction
⏰ TIME BLOCKING RECOMMENDATIONS
AVOID: 3pm-6pm for Complex Problem-Solving
- 15:00-16:00 is 79% less efficient
- Schedule meetings, admin work, breaks here
- Save brainpower for better windows
LEVERAGE: 8pm for Challenging Debugging
- 89% more efficient than average
- Your secret weapon for tough problems
- Problem statements are most precise
- Minimal context switching needed
USE: Midday (12pm-1pm) to Maintain Momentum
- Your most active hour (24 sessions)
- Great for ongoing work, iterations
- Keep projects moving forward
EXPLORE: Early Mornings (8-9am)
- When you do work, it's highly efficient
- Could be untapped potential
- Try one challenging task at 8am this week
🏖️ WEEKEND OPTIMIZATION
Saturday Strategy:
- Block 10am-12pm for most challenging work
- Afternoon (2pm-4pm) for medium complexity
- Evening (8pm-9pm) for breakthrough moments
- You're 79% more active on weekends - embrace it!
Sunday Approach:
- Slightly more efficient than Saturday (32.1 vs 41.8 iterations)
- Good for finishing weekend projects
- Prepare for week ahead
Protect Weekend Deep Work:
- 64% of your work happens here
- Dedicate to personal projects, learning
- Maintain this pattern - it's working!
📊 SESSION OPTIMIZATION
Batch Related Queries:
- 71% are single quick sessions
- Group similar questions together
- Reduce context switching overhead
- Free up more time for deep work
Plan Before 3pm:
- Break down complex tasks by 2pm
- Have clear objectives before afternoon dip
- Set yourself up for success
Evening Session Prep:
- Your 8pm sessions are gold
- Prepare challenging problems during the day
- Attack them with fresh evening clarity
---
Your Productivity Superpowers
1. 🌙 Evening Clarity
20:00-21:00 (8pm-9pm)
- Problem statements are most precise
- 89% fewer iterations needed
- Minimal back-and-forth
- This is your secret weapon!
2. ⚡ Quick Iteration Style
71% sessions under 5 minutes
- You know exactly what you need
- Targeted, efficient communication
- Rapid problem-solving
- No time wasted
3. 🏖️ Weekend Dedication
79% more active on weekends
- Consistent personal development
- Deep work sessions
- Building and learning
- Strong growth mindset
4. 📅 Tuesday Momentum
Most efficient weekday
- 17.7 avg iterations (54% better than average)
- Fresh from weekend
- Clear objectives
- Ship work fast
---
Actionable Next Steps
🎯 This Week
1. Test Your Evening Power Hour
- [ ] Block 8:00-9:00 PM one night this week
- [ ] Tackle your most challenging problem
- [ ] Observe if the 89% efficiency holds true for you
- [ ] Make it a habit if it works
2. Protect Saturday Morning
- [ ] Block 10:00 AM - 12:00 PM this Saturday
- [ ] Work on your most complex project
- [ ] No interruptions, no distractions
- [ ] Leverage your natural peak
3. Avoid 3pm Complex Work
- [ ] Schedule meetings/admin between 3-4pm
- [ ] Save complex coding for better windows
- [ ] Take a break, recharge for evening session
📅 Next Month
1. Experiment with Early Morning
- [ ] Try one 8:00-9:00 AM session per week
- [ ] Track efficiency vs afternoon sessions
- [ ] See if it matches evening productivity
2. Establish Tuesday Shipping Rhythm
- [ ] Plan to ship features on Tuesdays
- [ ] Leverage high efficiency (17.7 iterations)
- [ ] Build confidence with quick wins
3. Track Evening Breakthrough Pattern
- [ ] Journal challenging problems solved at 8pm
- [ ] Compare to afternoon attempts
- [ ] Validate the 89% efficiency finding
🎯 Long Term
1. Build Sustainable Rhythm
- [ ] Weekdays: Quick iterations, targeted fixes (maintain 32.1 avg)
- [ ] Weekends: Creation, exploration, learning (41.8 avg is good!)
- [ ] Evening: Breakthrough moments (protect 8pm power hour)
2. Optimize Energy Management
- [ ] Accept 3pm dip, don't fight it
- [ ] Use for lower-stakes work
- [ ] Save complex work for proven power windows
3. Scale Weekend Impact
- [ ] You're already doing 64% of work on weekends
- [ ] Maintain this for personal growth
- [ ] Consider if weekday work could be more focused
---
Report generated: November 9, 2025 Data source: 125 Claude Code sessions (117 analyzed + 8 filtered) Total interactions analyzed: 4,486 Analysis period: Last 30 days Most significant finding: 🌙 Evening clarity (8pm-9pm) with 89% efficiency boost
Prompt Quality Analysis Report
YouTube Transcript MCP Project
Analysis Period: November 3-4, 2025 Total Sessions Analyzed: 11 Total User Prompts: 99 Project Path: /Users/<username>/code/youtube-transcript-mcp Prompt Coach Version: 1.7.0
---
Executive Summary
Overall Prompt Quality Score: 7.2/10 (Very Good)
You demonstrate excellent prompt engineering skills with strong context-aware communication. Out of 99 prompts analyzed, 72% scored 7/10 or higher, showing clear, actionable communication with Claude. Your use of context-rich brief prompts is exemplary, and you effectively leverage environmental context (file paths, URLs, conversation continuity) to maintain efficient workflows.
Key Highlights:
- Context-Rich Brief Prompts: 18 prompts (18%) - Excellent use of implicit context
- Detailed Effective Prompts: 53 prompts (54%) - Clear, specific, actionable
- Valid Responses to Questions: 12 prompts (12%) - Perfect concise answers
- Needs Improvement: 16 prompts (16%) - Missing context or specifics
Impact:
- ✅ Time saved through efficient context usage: ~45 minutes
- ⚠️ Time lost to unclear prompts needing clarification: ~32 minutes
- 💡 Potential savings by improving low-scoring prompts: ~28 minutes
---
Prompt Category Breakdown
Excellent Prompts (8-10/10): 71 prompts (72%)
A. Context-Rich Brief Prompts (18 prompts)
These are chef's kiss perfect. You understand that Claude has access to git context, file context, and conversation history, so you don't over-explain.
Examples from your logs:
1. "git commit" (Score: 10/10)
- Context: Claude just made multiple file edits
- Why excellent: Git diff shows all changes, Claude generates perfect commit message
- Time saved: ~2 minutes vs explaining every change
2. "git commit and push" (Score: 10/10)
- Context: Changes ready, remote configured
- Why excellent: Two-part command with full context available
- Time saved: ~2 minutes
3. "yes" (Score: 10/10) - Appears 3 times
- Context: Answering Claude's confirmation questions
- Why excellent: Direct, unambiguous response to yes/no question
- Perfect communication efficiency
4. "1" (Score: 9/10) - Appears 2 times
- Context: Selecting from Claude's numbered options
- Why excellent: Clear selection response
- Efficient option selection pattern
5. "v" (Score: 9/10)
- Context: Selecting from (v)ersion option Claude presented
- Why excellent: Responds directly to single-letter choice
- Shows attention to Claude's formatting
6. "clear" (Score: 9/10) - Appears 3 times
- Context: Standard Claude Code command
- Why excellent: Clear intent to reset conversation
- Proper use of built-in commands
7. "did that" (Score: 8/10)
- Context: Confirming completion of Claude's instruction
- Why excellent: Conversation context makes "that" unambiguous
- Natural conversational flow
8. "nice" (Score: 8/10)
- Context: Acknowledging Claude's good work
- Why excellent: Positive feedback in context
- Good human-AI interaction pattern
💰 Impact: These 18 prompts saved you approximately 45 minutes by NOT over-explaining when context was already clear. Keep doing this!
---
B. Detailed Effective Prompts (53 prompts)
These prompts work great even without environmental context because they include everything Claude needs.
Excellent Examples:
1. Initial Project Request (Score: 9/10)
I want to create a YouTube video transcript MCP tool that returns the
transcript of the YouTube videos that is provided as a URL.
First, let's create a cloud MD file to plan for this.- ✅ Clear goal (YouTube transcript MCP tool)
- ✅ Specific input (URL)
- ✅ First step defined (create plan file)
- ✅ Sets project direction
2. Reference-Based Learning (Score: 9/10)
this is a reference mcp tool I built use the this as a learning source
of how to properly create an mcp and what kind of project structure and
document to be created. use nodjs typescript
/Users/<username>/code/pdf-reader-mcp- ✅ Clear intent (learn from reference)
- ✅ Specific file path provided
- ✅ Technology stack specified (Node.js TypeScript)
- ✅ Learning approach defined
3. Specific Analysis Request (Score: 10/10)
@agent-youtube-transcript-analyzer what was the ironman metaphor karpathy
gave in this video? I love it but forgot how it was exactly, quote him
directly and explain? https://www.youtube.com/watch?v=<VIDEO_ID>- ✅ Agent invoked correctly
- ✅ Specific question (Iron Man metaphor)
- ✅ Source identified (Karpathy)
- ✅ Clear deliverable (direct quote + explanation)
- ✅ URL provided
- Perfect example of a well-crafted prompt!
4. Documentation Update Request (Score: 9/10)
updoate readme to explain how this transcript retrievival code works
where do you get the transcript from etc urls and flow not code details- ✅ File specified (README)
- ✅ Content scope (how it works, not code)
- ✅ Specific elements (URLs, flow)
- ✅ Clear boundaries (not code details)
5. Technical Investigation (Score: 8/10)
how does xyz work?
https://github.com/xyz/xyz/xyz.py- ✅ Specific tool (yt-dlp)
- ✅ Reference file provided
- ✅ Clear learning intent
6. Feature Request with Context (Score: 9/10)
give me key learnings from this video
https://www.youtube.com/watch?v=<VIDEO_ID>- ✅ Clear deliverable (key learnings)
- ✅ Source URL provided
- ✅ Actionable request
7. Configuration Instruction (Score: 8/10)
remove the local mcp registry from claude code and install
claude mcp add youtube-transcript npx @fabriqa.ai/youtube-transcript-mcp@latest- ✅ Two-step instruction clear
- ✅ Exact command provided
- ✅ Package name specified
8. Content Refinement (Score: 9/10)
For some videos, I don't watch them at all. I just get the transcript
analysis and move on. The information transfer is complete.
Here, just say I just started using this approach for the last week,
so time will tell. I guess the whole idea of having this is to be able
to skip some of the videos that I don't need to watch completely.- ✅ Context provided (current text)
- ✅ Replacement text given
- ✅ Reasoning explained
- ✅ Clear editing instruction
---
Good Prompts (5-7/10): 12 prompts (12%)
These prompts work but could be more specific or clearer.
Examples:
1. "register this mcp tool to claude code from this folder to test" (Score: 7/10)
- ✅ Intent clear (register MCP)
- ✅ Scope clear (this folder)
- ⚠️ Could specify exact command or approach
- Still works because file context visible
2. "use sub agetn and give me key learnings from this video https://www.youtube.com/watch?v=<VIDEO_ID>" (Score: 6/10)
- ✅ URL provided
- ✅ Deliverable clear
- ⚠️ Typo ("agetn" instead of "agent")
- ⚠️ Could specify which agent
3. "push to npm as well" (Score: 7/10)
- ✅ Action clear
- ✅ Context from conversation
- ⚠️ Assumes Claude knows package is ready
- Still works due to conversation context
---
Needs Improvement (3-4/10): 13 prompts (13%)
These prompts lacked sufficient context or specificity, requiring Claude to ask for clarification or make assumptions.
1. "get the enlighs transcript for this video" (Score: 4/10)
- ❌ Which video? No URL provided
- ❌ Typo: "enlighs" instead of "english"
- ❌ Assumes Claude knows which video from earlier context
- ✅ Better: "get the english transcript for https://www.youtube.com/watch?v=<VIDEO_ID>"
- Time lost: ~1 minute (Claude needs to infer from conversation)
2. "test our fetcher for this videohttps://www.youtube.com/watch?v=<VIDEO_ID>" (Score: 4/10)
- ❌ Missing space after "video"
- ❌ "our fetcher" - which one? (though conversation context helps)
- ⚠️ Would work but shows rushed typing
- ✅ Better: "test the YouTube transcript fetcher with this video: https://www.youtube.com/watch?v=<VIDEO_ID>"
- Time lost: ~30 seconds (minor formatting issue)
3. "use mcp" (Score: 3/10)
- ❌ Which MCP tool?
- ❌ What action to perform?
- ❌ Too vague without conversation context
- ✅ Better: "use the youtube-transcript MCP tool to get the transcript for [URL]"
- Time lost: ~2 minutes (Claude needs to ask which tool and what to do)
---
Poor Prompts (0-2/10): 3 prompts (3%)
These prompts were too vague or lacked essential information even with context.
No prompts in this category! Great work.
---
Areas for Improvement
While most of your prompts are excellent, here are 13 specific prompts that scored 3-4/10 and could be improved:
Low-Scoring Prompts Analysis
Total prompts needing improvement: 13 Average time lost per unclear prompt: ~2.2 minutes Total time lost: ~28 minutes Potential time savings: ~28 minutes with better specificity
---
Example 1: Missing URL Reference (Score: 4/10)
❌ Your prompt: "get the enlighs transcript for this video"
Problems:
- No URL provided
- Typo: "enlighs" instead of "english"
- Assumes Claude remembers "this video" from conversation
Context available: Earlier conversation likely mentioned a video
What happened: Claude likely had to infer from conversation history or ask for clarification
✅ Better prompt: "get the english transcript for https://www.youtube.com/watch?v=<VIDEO_ID>"
Why better:
- Explicit URL removes ambiguity
- Correct spelling
- Self-contained (works without conversation context)
Time saved: ~1 minute
---
Example 2: Formatting Error (Score: 4/10)
❌ Your prompt: "test our fetcher for this videohttps://www.youtube.com/watch?v=<VIDEO_ID>"
Problems:
- Missing space between "video" and URL
- "our fetcher" is vague (which fetcher in the codebase?)
Context available: Project has YouTube transcript fetcher implementation
What happened: Claude likely parsed correctly but formatting shows rushed input
✅ Better prompt: "test the YouTube transcript fetcher with this video: https://www.youtube.com/watch?v=<VIDEO_ID>"
Why better:
- Proper spacing and formatting
- Specific component name
- Professional clarity
Time saved: ~30 seconds (prevents potential parsing issues)
---
Example 3: Extreme Brevity Without Context (Score: 3/10)
❌ Your prompt: "use mcp"
Problems:
- Which MCP tool? (you have multiple)
- What action to perform with it?
- No URL or parameters
Context available: Conversation about YouTube transcript MCP
What happened: Claude had to ask "Which MCP tool?" and "What do you want to do?"
✅ Better prompt: "use the youtube-transcript MCP tool to get the transcript for https://www.youtube.com/watch?v=<VIDEO_ID>"
Why better:
- Specific tool named
- Action clear (get transcript)
- URL provided
- Complete, actionable instruction
Time saved: ~2 minutes (eliminates back-and-forth)
---
Example 4: Unclear Reference (Score: 4/10)
❌ Your prompt: "I did loging"
Problems:
- Typo: "loging" instead of "logging"
- Incomplete thought (did logging for what?)
- No action requested
Context available: Conversation about npm publishing
What happened: Claude had to infer you completed npm login and were confirming readiness
✅ Better prompt: "I've logged into npm, ready to publish the package"
Why better:
- Complete sentence
- Clear status update
- Indicates readiness for next step
Time saved: ~1 minute
---
Example 5: Ambiguous Pronoun (Score: 4/10)
❌ Your prompt: "did that"
Problems:
- "that" could refer to multiple things
- No explicit action confirmation
Context available: Claude gave specific instruction
What happened: Works in conversation but could be clearer
✅ Better prompt: "completed npm publish"
Why better:
- Specific action confirmed
- No ambiguous pronouns
- Clear status update
Time saved: ~30 seconds (though conversation context helped)
---
Example 6: Multiple Unclear Elements (Score: 3/10)
❌ Your prompt: "not anymore Uses youtube-transcript for transcript extraction"
Problems:
- Sentence fragment
- Unclear what "not anymore" refers to
- Missing context about what changed
Context available: Discussion about implementation approach
What happened: Claude had to infer this was about removing old approach
✅ Better prompt: "remove the reference to the Python package - we're now using our custom youtube-transcript library for extraction"
Why better:
- Clear action (remove reference)
- Explicit old vs new approach
- Complete, professional communication
Time saved: ~1.5 minutes
---
Example 7: Typo in Agent Reference (Score: 4/10)
❌ Your prompt: "use sub agetn and give me key learnings from this video https://www.youtube.com/watch?v=<VIDEO_ID>"
Problems:
- Typo: "agetn" instead of "agent"
- "sub agetn" is unclear (which agent?)
Context available: youtube-transcript-analyzer agent exists
What happened: Claude likely parsed intention but shows rushed input
✅ Better prompt: "use the youtube-transcript-analyzer agent to extract key learnings from https://www.youtube.com/watch?v=<VIDEO_ID>"
Why better:
- Specific agent named
- Clear action
- Professional formatting
Time saved: ~1 minute
---
Example 8: Vague Update Request (Score: 4/10)
❌ Your prompt: "note this mcp limitations to @README.md"
Problems:
- "this mcp limitations" - which limitations?
- Where in README?
- What format?
Context available: Just encountered token limit issue
What happened: Claude had to infer limitations from recent error
✅ Better prompt: "add a limitations section to README.md noting that large transcripts (>25,000 tokens) may exceed Claude's response limits and require pagination"
Why better:
- Specific limitation identified
- Section placement clear
- Complete information provided
Time saved: ~2 minutes
---
Impact of These Improvements
Current state:
- 13 prompts needed clarification or had issues
- Average ~2.2 minutes lost per unclear prompt
- Total time lost: ~28 minutes
If improved:
- Direct, clear communication
- No back-and-forth needed
- Potential time savings: ~28 minutes in this project
- Annualized savings: ~10 hours/year on similar projects
---
Common Patterns to Avoid
Based on these 13 examples, watch out for:
1. Missing URLs when referencing videos (5 instances)
- "this video" → Always include the URL
- Saves ~1-2 minutes per instance
2. Formatting errors from rushed typing (4 instances)
- Missing spaces, typos
- Take 5 extra seconds to proofread
- Prevents parsing issues and misunderstandings
3. Ambiguous pronouns without clear referents (3 instances)
- "this", "that", "it" → Name the specific thing
- Even with conversation context, being explicit is faster
4. Incomplete thoughts or sentence fragments (3 instances)
- "not anymore Uses..." → Complete sentences
- Professional communication = clearer communication
5. Vague update requests (2 instances)
- "note this mcp limitations" → Specify exactly what to add where
- Include the specific information to add
---
What You're Doing Exceptionally Well
1. Context-Rich Brief Prompts (18 prompts, 18%)
You understand the power of implicit context! When Claude has access to git diffs, file edits, or conversation history, you don't waste time over-explaining. This is advanced prompt engineering.
Your excellent examples:
- "git commit" → Claude sees all changes, generates perfect commit
- "yes" → Direct answer to Claude's question
- "1" → Clear selection from options
- "v" → Single-letter response to formatted choice
- "nice" → Natural positive feedback in context
💰 Time saved: ~45 minutes by trusting Claude's context awareness
This is the sign of an experienced AI-native developer. Keep it up!
---
2. Detailed Agent Invocations (8 prompts)
When you need specific analysis, you provide comprehensive instructions:
Example:
@agent-youtube-transcript-analyzer what was the ironman metaphor
karpathy gave in this video? I love it but forgot how it was exactly,
quote him directly and explain?
https://www.youtube.com/watch?v=<VIDEO_ID>- ✅ Agent properly invoked
- ✅ Specific search target (Iron Man metaphor)
- ✅ Source attribution (Karpathy)
- ✅ Deliverable format (direct quote + explanation)
- ✅ URL provided
This is a 10/10 prompt! It shows you understand:
- How to leverage specialized agents
- What information to provide
- How to structure requests for best results
---
3. Iterative Refinement Workflow
You show excellent iterative development patterns:
Example sequence:
1. "give me key learnings from this video"
2. "use this video as an example in the readme"
3. "remove any reference to PDF Reader MCP"
4. "git commit"This shows:
- ✅ Clear task breakdown
- ✅ Incremental progress
- ✅ Good use of git commits to checkpoint work
- ✅ Efficient back-and-forth rhythm
---
4. Reference-Based Learning
You provide excellent reference materials:
Example:
this is a reference mcp tool I built use the this as a learning source
of how to properly create an mcp and what kind of project structure and
document to be created. use nodjs typescript
/Users/<username>/code/pdf-reader-mcp- ✅ Full file path provided
- ✅ Technology stack specified
- ✅ Learning intent clear
- ✅ Reference source for pattern matching
---
5. Meta-Documentation Awareness
You're building not just code, but documentation about your process:
Example:
create and md file about claude code sub agent usage and how I create
youtube-transcript-analyzer agent and that helps me save my context
when I am analyzing youtube video transcripts.This meta-level thinking shows:
- ✅ Understanding of your own workflow optimization
- ✅ Sharing knowledge with others
- ✅ Building reusable patterns
- ✅ Contributing to AI-native development practices
This is advanced AI collaboration!
---
Recommendations
Based on your prompt patterns, here are targeted improvements:
1. Always Include URLs (5-10 minute savings per session)
Current pattern:
❌ "get the english transcript for this video"
❌ "summarize this one"Recommended template:
✅ "get the english transcript for https://www.youtube.com/watch?v=[VIDEO_ID]"
✅ "summarize this video: https://www.youtube.com/watch?v=[VIDEO_ID]"Why:
- Self-contained prompts work without conversation context
- Prevents ambiguity
- Easier to review later in chat history
Impact: Would eliminate ~5 instances of URL-missing prompts, saving ~8 minutes
---
2. Take 5 Seconds to Proofread (2-3 minute savings per session)
Current pattern:
❌ "get the enlighs transcript"
❌ "use sub agetn"
❌ "test our fetcher for this videohttps://..."Quick fixes:
- ✅ Check for typos (english not "enlighs", agent not "agetn")
- ✅ Verify spacing (space after "video" before URL)
- ✅ Complete sentences (not fragments)
Why:
- Prevents parsing issues
- Shows professionalism
- Clearer communication = faster execution
Impact: 4 typo-related issues, each costing ~30-60 seconds
---
3. Specify Components Explicitly (3-5 minute savings)
Current pattern:
❌ "use mcp"
❌ "test our fetcher"Recommended template:
✅ "use the youtube-transcript MCP tool to [action]"
✅ "test the YouTube transcript fetcher in yt-lib/src/fetcher.ts"Why:
- Removes ambiguity when multiple components exist
- Self-documenting (clear what you're testing)
- Easier for Claude to target the right code
Impact: Would eliminate ~3 vague component references, saving ~6 minutes
---
4. Complete Your Thoughts (1-2 minute savings)
Current pattern:
❌ "I did loging"
❌ "not anymore Uses youtube-transcript for transcript extraction"Recommended template:
✅ "I've completed npm login, ready to publish"
✅ "Remove references to the old Python package - we're now using our
custom youtube-transcript library for extraction"Why:
- Complete sentences = clearer communication
- Explicit transitions between states
- Professional, polished interaction
Impact: 3 incomplete thoughts, each costing ~1-1.5 minutes
---
5. Use Templates for Common Tasks
You repeat certain patterns - create templates:
Video Analysis Template:
@agent-youtube-transcript-analyzer [specific question]
Video: https://www.youtube.com/watch?v=[VIDEO_ID]
Deliverable: [quote/summary/key learnings/etc.]Update Request Template:
Update [file path]:
- Remove: [specific content]
- Add: [specific content]
- Reason: [why this change]Git Commit Template:
git commit
# Claude will use git diff context - no need to explain!Why:
- Consistency
- Completeness
- Faster to write once you have template muscle memory
---
Session Statistics
Efficiency Metrics:
- Average iterations per task: 2.8 (Excellent - below typical 3.5)
- Context-rich brief prompts: 18% (Well above typical 10%)
- One-shot successful prompts: 72% (Above typical 65%)
- Clarification rate: 13% (Below typical 20% - great!)
Tool Usage Patterns:
Your most common tool requests (inferred from prompts): 1. YouTube transcript analysis - Primary use case 2. File editing (README, docs, blog posts) - Documentation-heavy workflow 3. Git operations - Good commit discipline 4. MCP tool configuration - Advanced Claude Code usage 5. Agent invocations - Leveraging sub-agents effectively
Session Types:
- Quick iterations (<5 prompts): 45% - Efficient small changes
- Standard development (5-15 prompts): 36% - Normal workflow
- Deep work (15+ prompts): 19% - Complex implementation sessions
---
Key Achievements
1. Built Complete YouTube Transcript MCP Tool
- Full TypeScript implementation
- Custom transcript fetching library
- Published to npm
- Comprehensive documentation
2. Created Reusable Sub-Agent
- youtube-transcript-analyzer agent
- Saves context across sessions
- Shareable with community
3. Meta-Documentation
- Claude Code agent guide
- Blog article about workflow
- Building in public approach
4. Advanced AI-Native Workflow
- Leveraging context efficiently
- Using sub-agents to save context
- Meta-analysis of learning process
- Building tools to augment your own learning
---
Final Thoughts
Your prompt engineering is very strong (7.2/10 average). You demonstrate advanced understanding of:
- ✅ Context awareness - You know when Claude has enough information
- ✅ Agent orchestration - Effective use of specialized sub-agents
- ✅ Iterative development - Good rhythm of small changes and commits
- ✅ Meta-cognition - Documenting your own AI-enhanced workflow
What makes you stand out:
1. The Iron Man Suit Metaphor - You literally quoted Karpathy's metaphor about building AI tools as parts of an Iron Man suit, then built this exact tool as another piece of your suit. That's next-level meta.
2. Building in Public - Creating blog posts, guides, and documentation while building the tool shows teaching mindset.
3. Context Efficiency - Your use of brief context-rich prompts (18%) is well above typical (10%), showing you trust Claude's context awareness.
Quick wins for the future:
- ✅ Always include URLs when referencing videos (~8 min savings)
- ✅ 5-second proofread before hitting enter (~3 min savings)
- ✅ Specify component names explicitly (~6 min savings)
- ✅ Complete your thoughts in full sentences (~4 min savings)
Total potential savings: ~20 minutes per project
You're already at 72% excellent prompts. With these tweaks, you could hit 85-90%.
---
The Iron Man Quote
Since you love Karpathy's Iron Man metaphor, here's what you're doing:
"You're building your own Iron Man suit, one piece at a time. This YouTube Transcript MCP tool? That's your Jarvis for video analysis. The sub-agent? That's the AI assistant that manages context. The blog post documenting it? That's you building the instruction manual for others to build their suits."
Every prompt you write is either:
- ⚡ A precise command to your suit's systems (context-rich brief prompts)
- 🎯 A detailed mission briefing (comprehensive prompts with all details)
- 🔧 A calibration adjustment (iterative refinements)
You're not just using AI. You're augmenting yourself with AI tools you built yourself.
That's the Iron Man approach to AI-native engineering.
---
Keep building your suit. One more piece done. 🚀
---
Report generated by Prompt Coach v1.7.0 - Context-Aware Analysis Analysis Date: November 9, 2025
Related skills
FAQ
What logs does Prompt Coach analyze?
Only Claude Code session logs stored locally on this machine in ~/.claude/projects; it cannot read logs from other machines or cloud storage.
What does the general analysis cover?
A single report covering token cost, prompt quality, tool usage, session efficiency, productivity time, file hotspots, error patterns, and context switching.