Analyzes Claude Code usage logs to provide insights on prompt effectiveness and tool optimization.
Install
mkdir -p .claude/skills/prompt-coach && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6683" && unzip -o skill.zip -d .claude/skills/prompt-coach && rm skill.zipInstalls to .claude/skills/prompt-coach
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Analyze your Claude Code session logs to improve prompt quality, optimize tool usage, and become a better AI-native engineer.Key capabilities
- →Analyze session logs for prompt quality
- →Calculate token usage and costs
- →Identify productivity patterns and tool usage
- →Provide actionable prompt templates
- →Measure time lost to unclear prompts
How it works
The skill reads local JSONL log files to parse interaction data, scoring prompts against best practices and calculating metrics like token efficiency and iteration counts.
Inputs & outputs
When to use prompt-coach
- →Improving prompt quality
- →Reducing token usage
- →Analyzing productivity patterns
About this skill
Prompt Coach - Claude Code Usage Analytics Skill
A Claude Code skill that analyzes your session logs to provide insights about your coding patterns, token usage, productivity, and prompt quality.
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
- 🎯 See real examples - Analyze actual vague prompts from your logs with before/after improvements
- 💰 Calculate time savings - Understand the cost of unclear prompts (time + iterations)
- 📋 Get actionable templates - Receive specific prompt templates for common tasks
- 🛠️ 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
Installation
Quick Install (Recommended)
Run the install script:
cd ~/code/claude-code-prompt-coach-skill
./install.sh
The script will:
- ✅ Create
~/.claude/skills/if needed - ✅ Check for existing installations
- ✅ Copy the skill to the correct location
- ✅ Verify installation
- ✅ Show next steps
Restart Claude Code and you're done!
Manual Install
Copy the skill directory to your Claude skills folder:
cp -r ~/code/claude-code-prompt-coach-skill ~/.claude/skills/prompt-coach
For Development (Symlink)
Create a symlink to the skill directory:
ln -s ~/code/claude-code-prompt-coach-skill ~/.claude/skills/prompt-coach
Now you can edit Skill.md and changes take effect on next Claude Code restart.
Usage
IMPORTANT: This skill analyzes logs from THIS machine only. It can only access Claude Code session logs stored locally in ~/.claude/projects/.
Option 1: Analyze All Projects
Just ask Claude natural questions about your usage across all projects:
"How much have I spent on tokens this month?"
"Analyze my prompt quality from last week"
"Which tools do I use most?"
"Show me my productivity patterns"
"What files do I edit most often?"
"When am I most efficient?"
Claude will automatically read all your session logs and provide detailed analysis.
Option 2: List Projects First, Then Pick One
If you want to see what projects have logs and choose one:
"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 show you all available projects with details (sessions count, date range, size), and you can pick which one to analyze.
Option 3: Analyze a Specific Project
If you know the project path, analyze just that project:
"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?"
This analyzes only the logs for that specific project, giving you focused insights.
Example Output
Token Usage Analysis
📊 Token Usage Analysis (Last 30 Days)
Input tokens: 450,000 ($1.35)
Output tokens: 125,000 ($1.88)
Cache writes: 200,000 ($0.75)
Cache reads: 1,500,000 ($0.45)
─────────────────
Total cost: $4.43
Cache savings: $4.05
Cache efficiency: 75% hit rate
💡 Tip: Your cache hit rate is excellent! You're saving ~$4/month
by keeping focused sessions.
Prompt Quality Analysis
📝 Prompt Quality Analysis (Last 14 Days)
Total prompts: 145
Needed clarification: 51 (35%)
Average prompt score: 5.2/10 (Good, room for improvement)
🚩 Most Common Missing Elements:
1. File paths: Missing in 61 prompts (42%)
2. Error details: Missing in 34 prompts (23%)
3. Success criteria: Missing in 43 prompts (30%)
4. Specific approach: Missing in 28 prompts (19%)
🔴 Real Examples from Your Logs:
**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
📉 Impact Analysis:
- 51 prompts needed clarification
- Average time lost per clarification: 2.8 minutes
- Total time lost to vague prompts: ~2.4 hours
- **Potential time savings: ~1.2 hours by improving top 25 vague prompts**
🎯 Your Top 3 Improvements (Maximum Impact):
**1. Always Include File Paths (42% of clarifications)**
Template: "[action] in [file path] [details]"
💰 Impact: Would eliminate ~21 clarifications (~1 hour saved)
**2. Provide Error Details When Debugging (23% of clarifications)**
Template: "fix [error message] in [file] - expected [X], getting [Y]"
💰 Impact: Would eliminate ~12 clarifications (~25 min saved)
**3. Define Success Criteria for Vague Actions (30% of clarifications)**
Instead of: "optimize", "improve", "make better"
Use: "[action] to achieve [specific measurable outcome]"
💰 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.
Tool Usage Patterns
🛠️ Tool Usage Patterns (Last 30 Days)
Most used tools:
1. Read ████████████████████ 450 uses
2. Edit ████████████ 220 uses
3. Bash ███████ 150 uses
4. Grep ██ 34 uses
💡 Insights:
✅ Good: You use Read heavily - shows careful code review
⚠️ Opportunity: Low Grep usage (34 uses vs 450 Reads)
→ Try Grep for searching across multiple files
→ It's much faster than reading each file
Available Analysis Types
- Token Usage & Cost Tracking - Detailed breakdown with current pricing
- Enhanced Prompt Quality Analysis ⭐ NEW! - Advanced analysis that:
- Detects vague prompt patterns (missing file paths, error details, success criteria)
- Shows real examples from YOUR logs with what Claude had to ask
- Provides before/after improvements for actual prompts you wrote
- Calculates time/iteration cost of unclear prompts
- Gives actionable templates ranked by impact
- Identifies most common missing elements in your prompts
- Tool Usage Patterns - Which tools you use most/least
- Session Efficiency - Average iterations per task
- Productivity Time Patterns - Best hours and days to code
- File Modification Heatmap - Most frequently edited files
- Error & Recovery Analysis - Common errors and how long they take to fix
- Project Switching Analysis - Context switching costs
How It Works
The skill provides Claude with:
- Official Claude prompt engineering best practices from Anthropic's documentation
- Knowledge of where logs are stored (
~/.claude/projects/) - Understanding of the JSONL log format
- A scoring system for prompt quality (Clarity, Specificity, Actionability, Scope)
- Patterns to look for (tool usage, tokens, timestamps, etc.)
- Instructions on how to calculate metrics
- Templates for presenting insights
Claude then uses its built-in tools (Read, Bash, Grep) to:
- Find and read your log files
- Parse the JSON data
- Score your prompts against official best practices
- Calculate metrics
- Generate personalized, actionable insights
No external dependencies, no installations, no data leaving your machine.
Prompt Engineering Knowledge
The skill is trained on official Claude prompt engineering guidelines, including:
The Golden Rule
"Show your prompt to a colleague with minimal context. If they're confused, Claude will likely be too."
Prompt Engineering Hierarchy (What Works Best)
- ⭐ Be Clear and Direct - Most effective
- Use Examples (Multishot) - Show desired output
- Let Claude Think - Chain of thought reasoning
- Use XML Tags - Structure for clarity
- Give Claude a Role - Set context
- Prefill Responses - Guide output format
- Chain Complex Prompts - Break into steps
When analyzing your prompts, the skill evaluates them against these techniques and provides specific recommendations for improvement.
Skill Design: Prompt Engineering in Action
The Skill.md file itself is a masterclass in prompt engineering, practicing what it preaches. Here's how it's constructed:
Core Techniques Applied
1. Clear Role Definition (System Prompts)
- Establishes Claude as "an AI-native engineering expert and prompt engineering specialist"
- Defines domain expertise upfront (lines 9-15)
- Sets clear expectations for behavior and knowledge
2. Hierarchical Structure & Organization
- Markdown headers create clear information hierarchy
- Numbered step-by-step instructions for each analysis task
- Visual indicators (emojis, ASC
Content truncated.
When not to use it
- →When analyzing logs from other machines
- →When logs are not stored in the default project directory
Prerequisites
Limitations
- →Only analyzes logs stored locally on the current machine
- →Requires Claude Code session logs to be present
How it compares
It provides personalized insights based on your actual historical interaction data rather than generic prompt engineering advice.
Compared to similar skills
prompt-coach side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| prompt-coach (this skill) | 1 | 9mo | Review | Intermediate |
| command-development | 16 | 9mo | Review | Intermediate |
| prpm-development | 6 | 8mo | Review | Intermediate |
| rule-identifier | 5 | 9mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by bear2u
View all by bear2u →You might also like
command-development
anthropics
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
prpm-development
pr-pm
Use when developing PRPM (Prompt Package Manager) - comprehensive knowledge base covering architecture, format conversion, package types, collections, quality standards, testing, and deployment
rule-identifier
anthropics
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
autonomous-agent-patterns
davila7
Design patterns for building autonomous coding agents. Covers tool integration, permission systems, browser automation, and human-in-the-loop workflows. Use when building AI agents, designing tool APIs, implementing permission systems, or creating autonomous coding assistants.
example-skill
anthropics
This skill should be used when the user asks to "demonstrate skills", "show skill format", "create a skill template", or discusses skill development patterns. Provides a reference template for creating Claude Code plugin skills.
command-creator
davila7
This skill should be used when creating a Claude Code slash command. Use when users ask to "create a command", "make a slash command", "add a command", or want to document a workflow as a reusable command. Essential for creating optimized, agent-executable slash commands with proper structure and best practices.