src/autoskillit/skills_extended/audit-friction/SKILL.md
Scan Claude Code project logs for friction patterns — repeated failures, approach loops, tool errors, misunderstanding cycles, and stuck workflows. Categorizes and counts friction events to surface what causes the most resistance. Use when user says "audit friction", "find friction", "friction audit", or "what keeps going wrong".
npx skillsauth add talont-org/autoskillit audit-frictionInstall 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.
Mine Claude Code conversation logs to identify and categorize friction — repeated failures, stuck loops, tool errors, and misunderstanding cycles that cost the most effort. Surfaces patterns causing the most resistance and recommends concrete mitigations.
The user may provide a "since" date (e.g., 2/7, 2026-02-07, last month). If not specified, use AskUserQuestion to ask what the earliest lookback date should be before proceeding. If the resulting window contains no logs, fall back to the last 30 days and note the adjustment.
NEVER:
{{AUTOSKILLIT_TEMP}}/audit-friction/ directory*/subagents/) — top-level session files onlyrun_in_background: true is prohibited)ALWAYS:
{{AUTOSKILLIT_TEMP}}/audit-friction/ (create if needed){{AUTOSKILLIT_TEMP}}/audit-friction/friction_audit_{YYYY-MM-DD_HHMMSS}.mdFriction is any pattern where repeated effort yields no progress:
Logs are too large to read in full. All analysis uses targeted grep commands to surface signal lines, then reads only the surrounding context (a few lines via -A/-B) to confirm the event. Use this keyword battery against each file:
# Tool errors — direct flag
grep -n '"is_error".*true' FILE | head -100
# Error keywords in content
rg -i '"not found|permission denied|no such file|command not found|ENOENT|"failed|"cannot|"error"|exit code [1-9]|Traceback|AssertionError' FILE | head -200
# Human correction language (look inside "type":"human" lines)
rg -n '"type":"human"' FILE | rg -i 'wrong|"no,|try again|you already|that.s not|incorrect|revert|undo|stop' | head -50
# Test / build failures
rg -i 'FAILED|test.*failed|build.*failed|compile.*error|syntax error' FILE | head -100
# Consecutive tool call loops — extract tool names in document order, show runs of 2+ back-to-back
grep -o '"name":"[^"]*"' FILE | awk -F'"' '{print $4}' | uniq -c | awk '$1>=2' | head -30
# Once you know which tool is looping, get its line numbers to find the range:
grep -n '"name":"TOOL_NAME"' FILE | head -30
# Permission / access blockers
rg -i 'permission denied|access denied|not allowed|forbidden' FILE | head -50
For each match batch, pull context (-A 10 -B 10) to confirm it is a real friction event rather than incidental text, then record the line range and category.
Derive the log directory from the current working directory:
PROJECT_PATH=$(pwd)
LOG_DIR="$HOME/.claude/projects/-${PROJECT_PATH//\//-}"
LOG_DIR="${LOG_DIR//--/-}"
Verify the directory exists and contains .jsonl files. If the directory is missing or empty, report this to the user before stopping.
Filter .jsonl files (top-level only, no subagent subdirs) modified since the target date:
# File count and list (portable — Python date comparison, no GNU findutils required)
python3 - "$LOG_DIR" "$SINCE_DATE" <<'EOF'
import os, sys, datetime
log_dir, since_str = sys.argv[1], sys.argv[2]
cutoff_ts = datetime.datetime.fromisoformat(since_str).timestamp()
matched = [
os.path.join(log_dir, f)
for f in os.listdir(log_dir)
if f.endswith(".jsonl")
and os.path.isfile(os.path.join(log_dir, f))
and os.path.getmtime(os.path.join(log_dir, f)) > cutoff_ts
]
matched.sort()
total_lines = sum(open(p).read().count("\n") for p in matched)
print(f"File count: {len(matched)}")
print(f"Total lines: {total_lines}")
for p in matched:
print(p)
EOF
Report both counts to the terminal. If zero files match, extend the window by 15 days and retry, noting the adjustment.
Split the log file list into batches. Use batches of ~5 files for smaller corpora; reduce to ~3 files per batch when the corpus is large so each Haiku agent isn't overloaded. Dispatch one Haiku model subagent per batch in parallel.
Each Haiku subagent should run the full keyword battery from the Friction Signal Patterns section against each assigned file. Do not read files in full — grep only. For each hit, pull 20 lines of context (-A 10 -B 10) to confirm the event and assign a category:
"is_error": true hits → Tool Failure LoopsFor Approach Reversals and Context Re-exploration (harder to grep directly): look for the same search query or file path appearing repeatedly across the file, or "not found" returns immediately followed by a different search for the same thing.
For each confirmed friction event record: {file, line_start, line_end, category, one-line description}. Widen the context window further if 20 lines isn't enough to understand the event.
Return all findings as structured text. Do not write any files.
After all Haiku agents return, group all indicators by category. Dispatch Sonnet model subagents to analyze the grouped indicators in parallel. Any category with at least one indicator warrants a subagent. Spawn one subagent per category when there are many; batch smaller related groups when overall volume is low. The orchestrator decides the grouping.
Each Sonnet subagent should:
(file, line_start, line_end) pointers for its assigned categoryReturn a structured category report in response text. Do not write any files.
After all subagents return:
Ensure {{AUTOSKILLIT_TEMP}}/audit-friction/ exists (mkdir -p).
Save to: {{AUTOSKILLIT_TEMP}}/audit-friction/friction_audit_{YYYY-MM-DD_HHMMSS}.md
Structure:
# Friction Audit: {Project} Since {date}
**Analysis Date:** {today}
**Log Files Analyzed:** {count}
**Total Lines Scanned:** {count}
**Analysis Mode:** Direct / Two-Round (Haiku triage + deep analysis)
## Executive Summary
{2-3 sentences: top friction types, total events, single highest-leverage mitigation}
## Friction Rankings
| Rank | Category | Occurrences | Sessions Affected | Severity |
|------|----------|-------------|-------------------|----------|
## Category N: {Name}
**Severity:** HIGH / MEDIUM / LOW
**Occurrences:** {count} across {n} sessions
### What It Looks Like
{How this friction manifests in the logs — specific signals and sequences}
### Example
{A concrete excerpt or paraphrase from an actual log showing this friction in action — what the tool call was, what error it got, what happened next}
### Instances
| Session | Date | Context | Friction Description |
|---------|------|---------|----------------------|
### Root Cause
{Why this keeps happening — tooling gap, codebase structure, workflow design, or model limitation}
### Recommended Mitigations
{Concrete, actionable suggestions ordered by impact}
---
## Session Overview
| Session ID | Date | Friction Types | Event Count |
|------------|------|----------------|-------------|
{All sessions with friction, sorted by event count descending}
## High-Friction Hotspots
{Sessions or task types appearing in 3+ categories — best candidates for targeted improvement}
Output a concise summary:
development
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"