
Friction Detector
Automatically spot recurring agent-session friction (retries, overrides, denials) and promote durable patterns into CLAUDE.md-style rules instead of manual log aggregation.
Overview
Friction-detector is a journey-wide agent skill that detects execution friction and graduates recurring patterns into durable agent guidance—usable whenever a solo builder needs to retrospective an agent session before t
Install
npx skills add https://github.com/athola/claude-night-market --skill friction-detectorWhat is this skill?
- Weighted friction signal taxonomy: repeated corrections, command failures, permission denials, re-reads, retry loops
- Structured promotion path from ephemeral session signals toward durable CLAUDE.md rules (complements LEARNINGS.md)
- Research-backed pipeline inspired by hook-based friction storage, self-improving-agent graduation tiers, and ACE-style p
- Trigger phrases include session retrospective, learning pipeline, pattern graduation, and friction report
- Bridges automatic detection with optional manual aggregation via `/abstract:aggregate-logs` when you still want batch re
- Five friction signal types with High/Medium/Low weights in the taxonomy table
- Research anchor: ACE framework cited at +10.6% on agent tasks from evolving playbooks
Adoption & trust: 1 installs on skills.sh; 304 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Agent sessions produce corrections and retries that vanish after the chat ends, so the same friction keeps happening because nothing automatically promotes patterns into repo-level rules.
Who is it for?
Solo builders running long Claude Code sessions on a fixed repo who want systematic retrospectives and rule graduation without only relying on `/abstract:aggregate-logs`.
Skip if: One-off tasks with no ongoing agent workflow, or teams that already forbid automated writes to CLAUDE.md and only want human-authored policy with no session telemetry.
When should I use this skill?
friction, friction detection, session retrospective, learning pipeline, recurring mistakes, pattern graduation, friction report
What do I get? / Deliverables
You get a structured friction report and promotion path toward CLAUDE.md-style rules so the next session starts with stronger defaults instead of another manual log scrape.
- Friction signal classification and session-weighted tracking
- Friction report suitable for retrospective review
- Promotion-ready patterns toward permanent guidance rules
Recommended Skills
Journey fit
Useful at every journey phase - explore requirements and options before committing to a direction.
Where it fits
Run a retrospective after the agent thrice failed the same deploy script and graduate a ‘always dry-run first’ rule.
Capture repeated permission denials during review-driven edits as high-weight friction before merging.
Weekly iterate pass: promote top recurring correction patterns from friction storage into CLAUDE.md.
After a spike session with lost context (same file re-read 3+), log low-weight re-read friction to tighten context handoff.
How it compares
Use instead of ad-hoc “remember this” chat reminders when you need weighted signal types and a deliberate friction-to-rules pipeline.
Common Questions / FAQ
Who is friction-detector for?
Solo and indie builders who use agentic coding daily on a single codebase and want session friction turned into durable guidance, especially in Claude Night Market–style setups with LEARNINGS.md and gauntlet knowledge.
When should I use friction-detector?
After dense agent sessions (build integrations, ship review fixes, operate on prod bugs), when you see repeated overrides or retry loops, for explicit session retrospectives, or when promoting patterns from the learning pipeline into CLAUDE.md rules.
Is friction-detector safe to install?
Treat it like any skill that may read session patterns and write learning artifacts: review the Security Audits panel on this Prism page and confirm what files it touches (LEARNINGS.md, CLAUDE.md, logs) before enabling in sensitive repos.
SKILL.md
READMESKILL.md - Friction Detector
# Friction-to-Learning Pipeline Detect friction signals during agent execution, track them across sessions, and graduate recurring patterns into permanent guidance. Bridges the gap between ephemeral session friction and durable CLAUDE.md rules. **Research backing**: Claude Coach (hook-based friction detection with SQLite storage), alirezarezvani's self-improving-agent (three-tier MEMORY to CLAUDE.md graduation), and the ACE framework (arXiv: evolving playbooks from execution feedback, +10.6% on agent tasks). **Current gap**: LEARNINGS.md exists but requires manual aggregation via `/abstract:aggregate-logs`. This skill adds automatic friction detection and a structured promotion path. ## Friction Signal Types | Signal | Detection Method | Weight | |--------|-----------------|--------| | Repeated corrections | User overrides same tool call 2+ times in session | High | | Command failures | Exit code != 0 patterns (same command type fails repeatedly) | Medium | | Permission denials | User denies tool call, indicating unexpected behavior | High | | Re-reads | Same file read 3+ times in session (lost context) | Low | | Retry loops | Same action attempted 3+ times with variations | Medium | | User frustration | Explicit negative feedback or correction language | High | Weight scoring: High = 3, Medium = 2, Low = 1 points per occurrence. Weighted score determines graduation velocity. ## Three-Tier Storage Graduation ``` Tier 1: Friction Log (ephemeral, per-session) Location: ~/.claude/friction/sessions/{date}-{id}.json Retention: 30 days, then pruned Threshold: 1 occurrence, logged, no action Tier 2: Pattern Candidate (persistent, LEARNINGS.md) Location: ~/.claude/skills/LEARNINGS.md (friction section) Threshold: 3+ occurrences across 2+ sessions Action: flagged for review in next friction report Tier 3: Graduated Rule (CLAUDE.md or skill update) Threshold: reviewed + user-approved Action: permanent guidance added to project/user config Constraint: NEVER auto-modify CLAUDE.md ``` ### Graduation Formula ``` graduation_score = (weighted_count * recency_factor) / sessions_seen recency_factor: last 7 days = 1.0 8-14 days = 0.7 15-30 days = 0.4 31+ days = 0.1 Tier 2 threshold: graduation_score >= 6.0 Tier 3 proposal: graduation_score >= 12.0 ``` ## Detection Workflow Run at session end, at 80% context usage (via `conserve:clear-context`), or after failed improvement cycles (when `metacognitive-self-mod` detects regression). ### Step 1: Scan Session for Signals For each friction indicator found, wrap it in the shared session-capture envelope (ADR-0011) so downstream readers can ingest friction signals and trace-capture entries through one parser: ```json { "schema_version": "session-capture/1", "session_id": "2026-04-14-abc12345", "timestamp": "2026-04-14T10:23:00Z", "source": "friction-detector", "payload": { "signal_type": "retry_loop", "description": "rg command failed 3x, fell back to grep", "context": "searching for pattern in node_modules", "weight": "medium" } } ``` Legacy files written before envelope adoption are read as ``session-capture/0`` (entire file treated as the payload). See ``docs/adr/0011-session-capture-envelope.md`` for the contract and migration path. ### Step 2: Compare Against Existing Log ```bash FRICTION_DIR=~/.claude/friction/sessions mkdir -p "$FRICTION_DIR" # Count prior occurrences of similar signals if command -v rg &>/dev/null; then rg -c "$SIGNAL_TYPE" "$FRICTION_DIR"/*.json 2>/dev/null || echo "0" else grep -rc "$SIGNAL_TYPE" "$FRICTION_DIR"/*.json 2>/dev/null || echo "0" fi ``` ### Step 3: Calculate Graduati