Claude-skill-registry analyze-friction
Orchestrate 3-stage friction analysis workflow across conversations. Extracts raw friction, abstracts patterns, and presents for approval. Use when user wants to analyze conversation history for improvement opportunities.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/analyze-friction" ~/.claude/skills/majiayu000-claude-skill-registry-analyze-friction && rm -rf "$T"
manifest:
skills/data/analyze-friction/SKILL.mdsource content
Friction Analysis Orchestrator
Orchestrates a 3-stage workflow to analyze conversation friction and extract actionable patterns.
Arguments
- Number of conversations to analyze (default: 15)--count N
Overview
| Stage | Agent | Purpose |
|---|---|---|
| 1 | conversation-friction-analyzer | Extract raw friction from individual conversations (parallel) |
| 2 | friction-pattern-abstractor | Aggregate and abstract patterns across all raw outputs |
| 3 | (orchestrator) | Present patterns to user for point-by-point approval |
Workflow
Stage 0: Preparation
- Parse arguments for
(default 15)--count N - Check existing files in
to determine which conversations are already processeddocs/friction-analysis/raw/ - Calculate which conversations need analysis (skip index 0 - current session)
# List existing raw files ls docs/friction-analysis/raw/ 2>/dev/null || echo "No existing files"
Stage 1: Raw Friction Extraction (Parallel)
For each conversation index from 1 to N (skipping 0 which is current session):
- Check if
already existsdocs/friction-analysis/raw/{conversation-id}.md - If not exists, spawn a
agent:conversation-friction-analyzer
Spawn agents in parallel (up to 15 concurrent): For conversation at index I (where I = 1 to count): - Extract conversation: `aaa extract-conversations --limit 1 --skip I` - Pass to conversation-friction-analyzer agent - Agent saves output to docs/friction-analysis/raw/{conversation-id}.md
Sub-agent prompt template:
Analyze this conversation for friction points. Extract RAW friction only - no abstraction. CONVERSATION: <output from aaa extract-conversations --limit 1 --skip {index}> Save your analysis to: docs/friction-analysis/raw/{conversation-id}.md
Resumability: Always check for existing files before spawning agents. Skip conversations that already have raw output files.
Stage 2: Pattern Abstraction (Sequential)
After ALL Stage 1 agents complete:
- Verify all expected raw files exist in
docs/friction-analysis/raw/ - Spawn single
agent:friction-pattern-abstractor
Analyze all raw friction files and extract patterns. Input directory: docs/friction-analysis/raw/ Output file: docs/friction-analysis/patterns.md
Wait for completion before proceeding.
Stage 3: User Approval
- Read the generated
docs/friction-analysis/patterns.md - For EACH pattern identified, use AskUserQuestion to get approval:
Pattern: [Pattern Name] Root Cause: [description] Evidence: [list of conversation IDs] Proposed Fix: [description] Options: - Approve - proceed with this fix - Modify - adjust the proposed fix - Skip - don't implement this pattern - Stop - end the approval process
- Collect approved patterns
- Output summary of approved patterns for implementation
Output Structure
docs/friction-analysis/ ├── raw/ │ ├── {conversation-id-1}.md # Stage 1 output │ ├── {conversation-id-2}.md │ └── ... └── patterns.md # Stage 2 output
Error Handling
- If
fails for a conversation, log and continue with othersaaa extract-conversations - If Stage 1 produces no raw files, abort with message "No friction found to analyze"
- If Stage 2 fails, check raw files exist and retry
Completion
After Stage 3, output:
## Friction Analysis Complete **Analyzed:** N conversations **Patterns Found:** M **Patterns Approved:** K ### Approved Patterns 1. [Pattern Name] - [Proposed Fix Summary] 2. ... ### Next Steps [Implementation guidance for approved patterns]