.claude/skills/skill-improvement-from-observability/SKILL.md
Complete feedback loop from observability insights to skill updates. Use when analyzing enhanced telemetry patterns and automatically improving skills.
npx skillsauth add adaptationio/skrillz skill-improvement-from-observabilityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Self-Improvement Loop: Enhanced Telemetry → Pattern Analysis → Skill Updates → Better Performance
Primary: {job="claude_code_enhanced"} in Loki (from enhanced-telemetry hooks)
Use observability-analyzer with enhanced telemetry:
# Session analytics
{job="claude_code_enhanced", event_type="session_end"} | json
# Error patterns
{job="claude_code_enhanced", event_type="tool_result", status="error"} | json
# Tool sequences
{job="claude_code_enhanced", event_type="tool_call"} | json
# Prompt patterns
{job="claude_code_enhanced", event_type="user_prompt"} | json
Use observability-pattern-detector operations:
detect-failures → Error patterns by tooldetect-tool-sequences → Inefficient tool chainsdetect-conversation-patterns → User behavior insightsdetect-context-issues → Context management problemsdetect-waste → Redundant operationsFilter high-impact issues from enhanced telemetry:
Error Analysis:
sum by (tool, error_type) (count_over_time({job="claude_code_enhanced", event_type="tool_result", status="error"} | json [7d]))
Tool Inefficiency:
# Repeated Read→Read patterns (waste)
{job="claude_code_enhanced", event_type="tool_call"} | json | previous_tool="Read" and tool_name="Read"
Context Issues:
# Auto compaction frequency
count_over_time({job="claude_code_enhanced", event_type="context_compact", trigger="auto"} [7d])
| Pattern | Likely Skill | Action | |---------|--------------|--------| | Bash command errors | bash-related skills | Add existence checks | | File not found | file operation skills | Add path validation | | Repeated Glob→Read | search skills | Optimize file discovery | | High context usage | context-heavy skills | Add chunking | | Many debugging prompts | core skills | Improve error messages |
Based on enhanced telemetry patterns:
{
"improvement": {
"pattern": "File not found errors",
"occurrences": 45,
"source_query": "{job=\"claude_code_enhanced\", event_type=\"tool_result\", status=\"error\"} | json | error_type=~\".*not found.*\"",
"affected_skills": ["file-operations"],
"recommendation": "Add file existence check before Read/Edit operations",
"implementation": "Add pathlib.Path(file).exists() check",
"priority": "high",
"expected_impact": "Reduce errors by 80%"
}
}
After improvements deployed, measure:
# Before vs After error rates
sum(count_over_time({job="claude_code_enhanced", event_type="tool_result", status="error"} | json [7d]))
# Tool success rate improvement
sum(count_over_time({job="claude_code_enhanced", event_type="tool_result", status="success"} | json [7d])) /
sum(count_over_time({job="claude_code_enhanced", event_type="tool_result"} | json [7d]))
Telemetry: "npm not found" × 45 in tool_result errors
↓
Pattern: Bash tool failures with npm commands
↓
Recommendation: Add npm availability check
↓
skill-updater applies changes
↓
Telemetry tracks: npm errors = 0 after deployment
↓
Result: ✅ 100% reduction
Telemetry: Auto-compaction triggered 12 times in 7 days
↓
Pattern: Large file reads accumulating tokens
↓
Recommendation: Add file chunking for large reads
↓
skill-updater applies changes
↓
Telemetry tracks: Auto-compactions = 2 after deployment
↓
Result: ✅ 83% reduction
Telemetry: Glob→Read→Glob→Read pattern 89 times
↓
Pattern: Redundant file discovery
↓
Recommendation: Cache glob results within session
↓
skill-updater applies changes
↓
Telemetry tracks: Redundant glob reduced by 70%
↓
Result: ✅ Faster file operations
topk(10, sum by (tool, error_type) (count_over_time({job="claude_code_enhanced", event_type="tool_result", status="error"} | json [7d])))
# High error sessions
{job="claude_code_enhanced", event_type="session_end"} | json | error_count > 5
# Low productivity sessions (high turns, few tool calls)
{job="claude_code_enhanced", event_type="session_end"} | json | turn_count > 20 and tools_used < 5
# Tool usage distribution
sum by (tool) (count_over_time({job="claude_code_enhanced", event_type="tool_call"} | json [7d]))
# Error rate by tool
sum by (tool) (count_over_time({job="claude_code_enhanced", event_type="tool_result", status="error"} | json [7d])) /
sum by (tool) (count_over_time({job="claude_code_enhanced", event_type="tool_result"} | json [7d]))
# Prompt pattern trends
sum by (pattern) (count_over_time({job="claude_code_enhanced", event_type="user_prompt"} | json [7d]))
# Debugging frequency (indicates pain points)
count_over_time({job="claude_code_enhanced", event_type="user_prompt", pattern="debugging"} [7d])
Uses existing skills:
Auto-Apply Safe:
Require Review:
Track improvement success:
# Calculate error reduction percentage
(before_errors - after_errors) / before_errors * 100
# Track pattern elimination
count_over_time({job="claude_code_enhanced"} | json | <pattern_filter> [7d])
Report format:
{
"improvement_id": "file-existence-check",
"deployed": "2025-11-27",
"before_errors": 45,
"after_errors": 2,
"reduction_percent": 95.6,
"status": "successful"
}
development
Setup secure web-based terminal access to WSL2 from mobile/tablet via ttyd + ngrok/Cloudflare/Tailscale. One-command install, start, stop, status. Use when you need remote terminal access, web terminal, browser-based shell, or mobile access to WSL2 environment.
development
Complete development workflows where Claude writes the code while Gemini and Codex provide research, planning, reviews, and different perspectives. Claude remains the main developer. Use for complex projects requiring expert planning and multi-perspective reviews.
development
Systematic progress tracking for skill development. Manages task states (pending/in_progress/completed), updates in real-time, reports progress, identifies blockers, and maintains momentum. Use when tracking skill development, coordinating work, or reporting progress.
testing
Comprehensive testing workflow orchestrating functional testing, example validation, integration testing, and usability assessment. Sequential workflow for complete skill testing from examples through scenarios to integration validation. Use when conducting thorough testing, pre-deployment validation, ensuring skill functionality, or comprehensive quality checks.