Use when user types /improve or frustration patterns detected - systematic intervention for reducing user frustration and improving workflow effectiveness through root cause analysis, evidence-based fixes, and effectiveness tracking
Detects frustration patterns and runs systematic root cause analysis to implement evidence-based workflow fixes. Triggers on `/improve` command or frustration phrases like "Stop" or "Again?
/plugin marketplace add gserafini/process-improvement/plugin install process-improvement@process-improvementThis skill is limited to using the following tools:
Systematic intervention system that detects frustration, analyzes root causes, implements fixes, and tracks effectiveness over time.
Core principle: Data-driven behavioral change. Success = days between frustration incidents increasing over time.
Announce at start: "š Process Improvement Protocol initiated! Saving my context for later."
CRITICAL: Before any file operations, discover where this plugin is installed.
The plugin must work regardless of installation method:
/path/to/process-improvement/~/.claude/plugins/marketplaces/process-improvement/~/.claude/process-improvement/ (deprecated)Path Discovery Strategy:
# Determine plugin root directory
# Priority: CLAUDE_PLUGIN_ROOT env var > marketplace location > current directory
if [ -n "$CLAUDE_PLUGIN_ROOT" ]; then
PLUGIN_ROOT="$CLAUDE_PLUGIN_ROOT"
elif [ -d ~/.claude/plugins/marketplaces/process-improvement ]; then
PLUGIN_ROOT=~/.claude/plugins/marketplaces/process-improvement
elif [ -d ~/.claude/process-improvement ]; then
# Legacy fallback
PLUGIN_ROOT=~/.claude/process-improvement
else
# Assume local development
PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
fi
# Export data directory for all file operations
export PLUGIN_DATA="$PLUGIN_ROOT/data"
# Verify data directory exists, create if missing
mkdir -p "$PLUGIN_DATA"/{sessions,deferred-incidents,fixes-registry}
# Verify required files exist, create if missing
touch "$PLUGIN_DATA/incidents.jsonl"
[ -f "$PLUGIN_DATA/days-without-incident.json" ] || echo '{"last_incident":null,"days_since_last":0,"longest_streak":0}' > "$PLUGIN_DATA/days-without-incident.json"
Usage: All file operations in this skill use ${PLUGIN_DATA}/filename instead of absolute paths.
User types /improve [timeframe] command
Time frame parameter (optional):
week - Analyze last 7 daysmonth - Analyze last 30 days (default)year - Analyze last 365 daysall - Analyze entire historyIf no time frame specified, default to month.
Parse time frame:
# Extract from command arguments
timeframe="${1:-month}" # Default to month if not specified
case "$timeframe" in
week) days=7 ;;
month) days=30 ;;
year) days=365 ;;
all) days=99999 ;; # Effectively all time
*) days=30 ;; # Default to month for invalid input
esac
Check user message for ANY of these phrases:
If detected, offer choice:
š I detected a potential frustration pattern. Would you like to:
1. Run Process Improvement Protocol now
2. Defer this and continue working (I'll save the context)
If user chooses option 2 (defer):
${PLUGIN_DATA}/deferred-incidents/YYYY-MM-DD-HHMMSS.jsonDisplay which time frame is being analyzed:
š Process Improvement Protocol initiated! Saving my context for later.
Analyzing: Last [7 days|30 days|365 days|all time] of conversations
Replace bracketed text with actual time frame based on parameter.
Create ${PLUGIN_DATA}/sessions/YYYY-MM-DD-HHMMSS-resume.json:
{
"timestamp": "2025-11-21T17:45:00Z",
"current_todos": [...], // from TodoWrite
"last_user_message": "...",
"working_on": "...", // brief summary
"files_being_edited": [...]
}
Read ${PLUGIN_DATA}/days-without-incident.json and calculate days since last incident:
Days since last frustration incident: X
[If X < 7]: Definitely still learning here. Let's get to it!
[If X >= 7]: Oof! We had a good streak going. Let's get back on track!
Check for obvious patterns:
Read ${PLUGIN_DATA}/deferred-incidents/*.json
If any found:
Current issue: [describe current frustration]
I also found X deferred incidents from earlier sessions that may be related:
- [incident 1 summary]
- [incident 2 summary]
Analyzing all together.
Read files within the specified time frame:
${PLUGIN_DATA}/incidents.jsonl (filter by timestamp and days parameter)${PLUGIN_DATA}/successful-fixes.md (what worked before)${PLUGIN_DATA}/patterns-detected.md (known failure modes)${PLUGIN_DATA}/fixes-registry/*.md (filter by file modification date using days parameter)Filter incidents.jsonl by time frame:
# Only load incidents within the specified time frame
jq -c --arg cutoff_days "$days" \
'select((now - (.timestamp | fromdate)) / 86400 <= ($cutoff_days | tonumber))' \
"${PLUGIN_DATA}/incidents.jsonl"
Check for similar past incidents (within time frame) and their solutions.
Using available context, perform analysis:
Create 2-3 solution options with:
Select the most likely to solve this based on evidence, with reasoning.
If analysis requires:
Spawn general-purpose agent with full context package.
## Root Cause Analysis
[What happened + why + is this a pattern?]
## Historical Context
[Has this happened before? What fixed it then? Did that fix last?]
## Solution Options
### Option A: [Name]
**What**: [Specific implementation]
**Why it should work**: [Evidence-based reasoning]
**Drawbacks**: [Honest assessment]
**Expected effectiveness**: [Based on historical data]
### Option B: [Name]
...
## Recommendation
**Recommended**: Option [X]
**Reasoning**: [Why this one, with evidence]
**Success criteria**: [How we'll know if it worked]
User chooses option (or approves recommendation).
Apply the selected fix:
actually_works_plus_superpowers.md)~/.claude/skills/user/)~/.claude/hooks/)${PLUGIN_DATA}/fixes-registry/YYYY-MM-DD-fix-name.md with:
Append new line to ${PLUGIN_DATA}/incidents.jsonl:
{"timestamp":"2025-11-21T17:45:00Z","days_since_last":7,"severity":"major_win","pattern":"Testing skipped","root_cause":"Agent claimed 'production-ready' without testing","solution_implemented":"Added BLOCKER section to actually_works.md requiring TodoWrite + verification skill","fix_file":"fixes-registry/2025-11-21-testing-protocol-blocker.md","expected_impact":"Zero untested 'complete' claims","effectiveness_1week":null,"effectiveness_2week":null,"status":"active"}
{
"last_incident": "2025-11-21T17:45:00Z",
"days_since_last": 0,
"longest_streak": 14
}
I hope this will improve our process and this frustration will hopefully not recur again.
We'll track our performance over time and revisit if needed.
Ready to get back to our earlier task?
1. Yes
2. Keep discussing improvements
If option 1: Continue to Phase 5 (Resume) If option 2: Continue improvement conversation
Display saved context from ${PLUGIN_DATA}/sessions/YYYY-MM-DD-HHMMSS-resume.json:
We're done with Process Improvement Protocol. Here's where we were:
**What you were working on**: [working_on from resume.json]
**Active TODOs**:
- [list from current_todos]
**Files being edited**:
- [list from files_being_edited]
**Last thing you said**:
[last_user_message]
Please let me know how you'd like to proceed - continue with the above, or start something new?
User manually decides next action.
When /improve runs (weekly or user-initiated), check for pending effectiveness measurements:
# Find incidents needing 1-week check
jq -c 'select(.effectiveness_1week == null and
(now - (.timestamp | fromdate)) >= 604800)' "${PLUGIN_DATA}/incidents.jsonl"
# Find incidents needing 2-week check
jq -c 'select(.effectiveness_2week == null and
(now - (.timestamp | fromdate)) >= 1209600)' "${PLUGIN_DATA}/incidents.jsonl"
For each pending check, grep conversations within time frame:
# Example: Count "review agent" mentions within time frame
pattern_keywords="review agent|Plan agent|code-reviewer"
project_dir=$(echo ~/.claude/projects/-Users-gserafini-git-src-* | head -1)
# Use the parsed $days variable from trigger time frame
occurrences=$(find "$project_dir" -name "*.jsonl" -type f -mtime -${days} \
-exec grep -l "$pattern_keywords" {} \; | wc -l)
success_rate = 1 - (occurrences_after / occurrences_before)
status = success_rate >= 0.8 ? 'highly_effective' :
success_rate >= 0.5 ? 'moderately_effective' :
success_rate >= 0.2 ? 'minimally_effective' : 'ineffective'
Update the incident entry with effectiveness data.
š Effectiveness Check Results:
Fix: [fix name] (1 week ago)
- Before: X occurrences/week
- After: Y occurrences/week
- Success rate: Z%
- Status: [Highly effective ā
/ Needs refinement ā ļø]
- Recommendation: [Keep as-is / Refine / Replace]
Skipping context preservation
Generic root cause
No historical check
Implementing without user approval
No effectiveness tracking
Never:
Always:
Invoked by:
/improve commandMay invoke:
Updates:
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.