tyfarrago-hub/compound/friction-audit

Claude Code and agent skill by tyfarrago-hub/compound

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Mine your own Claude Code session transcripts for recurring failure patterns, cluster them by evidence, and turn the top clusters into concrete guardrails (skills, CLAUDE.md rules, hooks). Use when the user asks to audit recent sessions, find friction, figure out why sessions keep going wrong, or improve how Claude works for them.

Install

npx vskill@latest install tyfarrago-hub/compound/friction-audit

SKILL.md

The same SKILL.md was published earlier as tyfarrago-hub/compound/friction-audit.

friction-audit

Your session transcripts are a goldmine almost nobody reads. Every interruption, every "still doesn't work", every rejected tool call is a labeled data point about where your setup fails. This skill turns three weeks of transcripts into a ranked list of recurring failures, then converts the top failures into guardrails that prevent them.

Run once, this found (on a real ~90-session corpus): completion claims without verification as the #1 issue by far, followed by browser-automation eval failures, dropped mid-session constraints, stale-file edit errors, and repeated same-theory fix attempts. Every one of those became a rule or skill, and the following weeks' sessions were measurably smoother.

Where the data lives

Claude Code stores full session transcripts as JSONL:

~/.claude/projects/<project-slug>/*.jsonl

Each line is a JSON event. The signals worth mining:

SignalHow to find it
User interrupted a turnlines containing "Request interrupted by user
Tool call erroredlines containing "is_error":true
User denied a permission"user doesn't want to proceed or "User rejected
User friction languageuser messages matching `still (doesn'tnotbroken), you didn't, stop telling me, once again, not what i, wrong`, profanity

Note: transcripts are cleaned up after a retention period (cleanupPeriodDays in ~/.claude/settings.json, default 30). If you want a longer audit window, raise it before you need it.

The audit procedure

  1. Mine. Script pass over the last N days of transcripts (skip files under ~50KB; they're rarely interesting). For each session collect: interrupt count, tool-error count, denial count, and up to ~6 verbatim user messages matching the friction regex. Emit a compact per-session block: date, first user message as the topic, stats, friction quotes.
  1. Cluster with sub-agents. Feed the mined blocks to parallel agents (cap concurrency around 8; back off if rate-limited) with a prompt like: "Cluster these friction signals into recurring themes. Rank by evidence count. For each theme: what happened, verbatim examples, and the smallest intervention that would have prevented it." Then one synthesis pass merges the clusters.
  1. Rank by evidence, not by vividness. One spectacular blow-up matters less than the same quiet failure appearing in nine sessions. Count sessions per theme.
  1. Convert the top 3-5 themes into guardrails. Match the intervention to the failure type:
  • A judgment failure (claiming done without proof) becomes a skill with a hard protocol, optionally enforced by a Stop hook.
  • A memory failure (dropped constraints) becomes a file-based discipline (write it down, re-read before delivering).
  • A knowledge failure (same browser gotcha every week) becomes a CLAUDE.md rule or a note in the relevant skill.
  • A process failure (50 parallel agents hitting rate limits) becomes a hard limit written into CLAUDE.md.
  1. Install and verify. Write the guardrails, then test each one: pipe a synthetic failing case through a hook, confirm a skill registers, confirm the CLAUDE.md block loads in a fresh session.
  1. Make it recurring. A weekly cron (launchd on macOS, cron elsewhere) that runs the mining script and has claude -p cluster the week's friction into a short report answers the question "are the guardrails working?" with data instead of vibes. Strip ANTHROPIC_API_KEY from the child environment when scripting claude -p, otherwise those runs bill your API key instead of your subscription.

The mining script, minimal version

python
import glob, json, os, re, time
HOME = os.path.expanduser("~")
cutoff = time.time() - 21 * 86400 # 3 weeks
files = [f for f in glob.glob(f"{HOME}/.claude/projects/*/*.jsonl")
if "/subagents/" not in f and os.path.getmtime(f) > cutoff
and os.path.getsize(f) > 50_000]
FRICTION = re.compile(
r"(still (doesn'?t|not|broken|getting)|not what i|you didn'?t|"
r"stop telling me|doesn'?t work|once again|why is|wrong)", re.I)
for path in sorted(files, key=os.path.getmtime, reverse=True):
interrupts = errors = denials = 0
frictions = []
with open(path) as fh:
for line in fh:
if '"Request interrupted by user' in line: interrupts += 1
if '"is_error":true' in line: errors += 1
if '"User rejected' in line: denials += 1
if '"type":"user"' not in line: continue
try: e = json.loads(line)
except Exception: continue
c = e.get("message", {}).get("content")
text = c if isinstance(c, str) else " ".join(
b.get("text", "") for b in (c or [])
if isinstance(b, dict) and b.get("type") == "text")
if text and not text.startswith("<") and FRICTION.search(text):
frictions.append(text.strip()[:220])
if frictions or interrupts > 2 or errors > 10 or denials:
print(f"### {os.path.basename(path)[:8]} "
f"interrupts={interrupts} errors={errors} denials={denials}")
for m in frictions[:6]: print(f"- USER: {m}")

The posture

The point is compounding: every audited failure becomes a rule, and every rule makes the next hundred sessions better. Treat your own transcript history as the highest-signal training data you own, because it is.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tyfarrago-hub/compound/friction-audit/badge)](https://verified-skill.com/skills/tyfarrago-hub/compound/friction-audit)

Something wrong with this skill or its page? Tell us.