Agent skill

Friction Detector

by athola in athola/claude-night-market

Detect friction signals; graduate patterns into rules. An agent skill from athola/claude-night-market.

MITAuto-check passedProduct & Project Management

Install Friction Detector

skills CLI
$ npx skills add athola/claude-night-market --skill friction-detector -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install athola/claude-night-market friction-detector --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/abstract/skills/friction-detector .claude/skills/friction-detector && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
friction-detector
GitHub stars
341
Token cost
~1.8k tokens
SKILL.md length
525 words
Files
1
Skills in repo
154
Repo updated
First seen
Licence
MIT

At a glance

Detect friction signals; graduate patterns into rules. An agent skill from athola/claude-night-market.

  • Works in 5 steps: Scan Session for Signals → Compare Against Existing Log → Calculate Graduation Score → …
  • Session retrospectives
  • SKILL.md covers Overview, Friction Signal Types, Three-Tier Storage Graduation and Detection Workflow, plus 6 more sections
  • Calls rg

What it does

Friction Detector is an agent skill from athola/claude-night-market. Detect friction signals; graduate patterns into rules. Use for session retrospectives.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Product & Project Management, covering Retrospectives. The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • Session retrospectives
  • Tasks that involve Retrospectives

Example prompts

  • “/friction-detector”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Scan Session for Signals
  2. Compare Against Existing Log
  3. Calculate Graduation Score
  4. Propose Graduations
  5. Store Results

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Friction Detector loads about 1.8k tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 525 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 525 words, ~1,789 tokens.

Download SKILL.mdSave it as .claude/skills/friction-detector/SKILL.md (or your agent's skills folder).
name
friction-detector
description
Detect friction signals; graduate patterns into rules. Use for session retrospectives.
category
workflow-optimization
alwaysApply
false
trigger
friction, friction detection, session retrospective, learning pipeline, recurring mistakes, pattern graduation, friction report
model_hint
standard

Friction-to-Learning Pipeline

Overview

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

SignalDetection MethodWeight
Repeated correctionsUser overrides same tool call 2+ times in sessionHigh
Command failuresExit code != 0 patterns (same command type fails repeatedly)Medium
Permission denialsUser denies tool call, indicating unexpected behaviorHigh
Re-readsSame file read 3+ times in session (lost context)Low
Retry loopsSame action attempted 3+ times with variationsMedium
User frustrationExplicit negative feedback or correction languageHigh

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 abstract: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 Graduation Score

Aggregate across session logs: sum weighted occurrences, apply recency decay, divide by session count, compare against tier thresholds.

Step 4: Propose Graduations

Tier 2 crossing: append to LEARNINGS.md friction section. Tier 3 crossing: present proposal with evidence to user, wait for explicit approval before any modification.

Show full SKILL.md (216 more words)Show less
Step 5: Store Results

Write session log to ~/.claude/friction/sessions/{date}-{session_id}.json and update ~/.claude/friction/index.json.

Anti-Noise Rules

Ignore these signals:

  1. One-off failures: transient network/CI errors (unless they recur 3+ times)
  2. User-initiated exploration: deliberate experimentation is not agent error
  3. Already-graduated patterns: covered by existing CLAUDE.md rules or skill instructions
  4. External tool failures: MCP server crashes and similar tool bugs unrelated to agent behavior

Decay factor: signals older than 30 days contribute only 10% of their original weight (see graduation formula recency_factor).

Friction Report Format

markdown
## Friction Report: Session {date}

### New Signals (Tier 1)
- [RETRY] `rg` command failed 3x, fell back to `grep`
- [RE-READ] Read SKILL.md 4 times (lost file structure context)

### Recurring Patterns (Tier 2 candidates)
- [CORRECTION] User corrected file path format 4x across 3 sessions
  Score: 8.4 (threshold: 6.0)
  Candidate: Add path format guidance to CLAUDE.md

### Graduation Proposals (Tier 3)
- [RULE] "Always use absolute paths in Read tool"
  Evidence: 7 corrections across 5 sessions
  Score: 14.2 (threshold: 12.0)
  Action: Approve / Reject / Defer

### Noise Filtered
- 2 transient network timeouts (ignored)
- 1 user-initiated deep exploration (ignored)

Integration

Feeds into: LEARNINGS.md (Tier 2 patterns, same format as /abstract:aggregate-logs), abstract:skill-improver (priority scoring), and abstract:metacognitive-self-mod (pipeline effectiveness).

Consumes from: session transcripts, aggregate_learnings_daily hook data, and the performance tracker for trend correlation.

When NOT to Use

  • Single isolated failures (wait for recurrence)
  • Skill authoring (use abstract:skill-authoring)
  • Routine log aggregation (use /abstract:aggregate-logs)
  • abstract:metacognitive-self-mod: improvement analysis
  • abstract:skills-eval: evaluation criteria
  • /abstract:aggregate-logs: manual LEARNINGS.md generation
  • conserve:clear-context: triggers friction scan at 80%

Exit Criteria

  • Session friction report produced in "Friction Report Format" with at least one section (New Signals, Recurring Patterns, or Graduation Proposals) populated
  • Each signal written as JSON to ~/.claude/friction/sessions/{date}-{session_id}.json via the session-capture/1 schema
  • Patterns with graduation_score >= 12.0 generate a Tier 3 proposal; skill does not auto-modify CLAUDE.md
  • Noise signals (network failures, user exploration) appear in "Noise Filtered" and are excluded from graduation scoring

© athola, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/abstract/skills/friction-detector of athola/claude-night-market.

Open the folder on GitHubat commit 9f3eb00

Compare with similar skills

Friction Detector next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Friction Detector compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Friction Detector this skillathola/claude-night-market341—~1.8kAutomated safety check: PassMIT
Weekly Engineering Retrogarrytan/gstack136k—~2.4kAutomated safety check: PassMIT
Dough Execute Planterryyin/lizard2.6k—~4.3kAutomated safety check: PassCustom licence
Oral Paper SkillAdkid-Zephyr/oral-paper-skill350—~1.9kAutomated safety check: PassNone
Deck Retroasheshgoplani/agent-deck1k—~1.8kAutomated safety check: PassMIT
Dough Execution Retrospectiveterryyin/lizard2.6k—~4kAutomated safety check: PassCustom licence

Similar skills

  • Builds a weekly engineering retrospective from git history: commit counts, per-person contributions, work patterns and code quality numbers over a chosen window.

    136k GitHub stars~2.4k tokensUpdated today
    Product & Project ManagementAuto-check passed
  • Dough Execute Plan

    terryyin/lizard

    Executes one selected story or bounded retrospective correction through an executable plan, or one authorized planless slice from a selected simple story or a contextual instruction, with…

    2.6k GitHub stars~4.3k tokensUpdated 2 days ago
    Product & Project ManagementAuto-check passed
  • Oral Paper Skill

    Adkid-Zephyr/oral-paper-skill

    Help authors learn from exemplary ICLR, ICML, and NeurIPS papers through source-linked manuscript comparisons, concrete writing and experiment suggestions, and guided reflection.

    350 GitHub stars~1.9k tokensUpdated 21 days ago
    Product & Project ManagementAuto-check passed
  • Deck Retro

    asheshgoplani/agent-deck

    Run a fully local agent-deck retrospective over the user's own transcripts, Recall index and logs.

    1k GitHub stars~1.8k tokensUpdated 3 days ago
    Product & Project ManagementAuto-check passed
  • Reviews planned, completed planless quick, or quick-to-planned execution against original intent, aggregate commits, current whole-product architecture, and tests, including after cleanup.

    2.6k GitHub stars~4k tokensUpdated 2 days ago
    Product & Project ManagementAuto-check passed
  • Criticism Self Criticism

    HughYau/qiushi-skill

    批评与自我批评:在工作完成、阶段验收、收到批评或同类错误反复出现时,对成果和过程做诚实、具体、基于事实的审视,输出可执行的改进项,并处理外来批评而不辩解。触发信号包括 review、复盘、审查、"帮我看看有没有问题"、"你确定吗";任务刚开始或只是单步查询时不触发。

    3.8k GitHub stars~423 tokensUpdated 8 days ago
    Product & Project ManagementAuto-check passed

More from athola/claude-night-market

All 154 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    341 GitHub stars~3.4k tokensUpdated 3 days ago
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    341 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    341 GitHub stars~2.5k tokensUpdated 3 days ago
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    341 GitHub stars~2.5k tokensUpdated 3 days ago
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    341 GitHub stars~2.1k tokensUpdated 3 days ago
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    341 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed

Questions about Friction Detector

What does Friction Detector do?

Detect friction signals; graduate patterns into rules. An agent skill from athola/claude-night-market. Friction Detector is an agent skill from athola/claude-night-market. Detect friction signals; graduate patterns into rules.

When should I use Friction Detector?

Friction Detector fits situations like: session retrospectives; tasks that involve Retrospectives.

How do I install Friction Detector in Claude Code?

Run `npx skills add athola/claude-night-market --skill friction-detector -a claude-code`. Or copy the skill folder (plugins/abstract/skills/friction-detector in athola/claude-night-market) into .claude/skills/friction-detector in your project. Claude Code loads it when a task matches its description.

How do I install Friction Detector in Codex?

Run `npx skills add athola/claude-night-market --skill friction-detector -a codex`. Or copy the skill folder (plugins/abstract/skills/friction-detector in athola/claude-night-market) into .agents/skills/friction-detector in your project. Codex loads it when a task matches its description.

Can I use Friction Detector in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add athola/claude-night-market --skill friction-detector -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/friction-detector, .gemini/skills/friction-detector, .github/skills/friction-detector and .opencode/skills/friction-detector in your project.

What does Friction Detector need to run?

Going by SKILL.md and its folder, Friction Detector needs the command-line tools its instructions call (rg).

Does Friction Detector access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Friction Detector safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Friction Detector use?

Friction Detector is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Friction Detector use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Friction Detector?

Skills that share tags, products or a category with Friction Detector: Weekly Engineering Retro (garrytan/gstack, 136k stars), Dough Execute Plan (terryyin/lizard, 2.6k stars), Oral Paper Skill (Adkid-Zephyr/oral-paper-skill, 350 stars) and Deck Retro (asheshgoplani/agent-deck, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Friction Detector?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 341 GitHub stars. The repository holds 154 skills in this directory. The repository was last updated on October 6, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.