friction-review
Skill2 starsChanged 7 days agoMITView on GitHub
Review this project's recent sessions for friction that repeats (search churn, costly tool calls, missing access, unwired checks) and propose fixes.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ThibautBaissac/rails_ai_agentstheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ThibautBaissac/rails_ai_agents★ 665same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- arenaSkill
- codebase-oracleSkill
- geppettoSkill
- lean-subagent-devSkill
- methodologySkill
- overnight-runSkill
- parallel-worktreesSkill
- dependency-security-auditSkill
- dependency-upgradeSkill
- rule-to-hookSkill
- safe-mergeSkill
- agent-friendly-auditSkill
- architectSkill
- brainstormSkill
- engineering-principlesSkill
- grill-meSkill
- improve-codebase-architectureSkill
- lazy-seniorSkill
- reframeSkill
- sharpenSkill
- to-issuesSkill
- to-prdSkill
- handoffSkill
- instructions-auditSkill
- project-setupSkill
- retrospectiveSkill
- session-closeSkill
- which-skillSkill
- wizardSkill
- bug-fixSkill
- ci-cost-and-cadenceSkill
- evaluatorSkill
- flaky-test-huntSkill
- hillclimbSkill
- launch-readinessSkill
- migration-reviewSkill
- mutation-testSkill
- review-triageSkill
- skill-evalSkill
- tddSkill
- verify-appSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Run it again after the next batch of sessions: the review is a loop, and each round measures the changes of the last.
- Distinctive: line 25
Never write a secret, an email, a person's name or a machine path into a proposal, a commit message, a code comment, a test fixture or …
- Distinctive: line 28
Read only this project's transcript folders, never a glob across every project.
- Distinctive: line 70
When the history cannot be read (a missing object, for example), the line says so and the rest still prints.
- Very specific: line 78
If the header shows 0 sessions, or says no transcript folder matches this repository, check that you ran it from the project root (or pass …
- Distinctive: line 104
Ask which to make. AskUserQuestion takes 2 to 4 options per question and up to 4 questions per call: group the candidates, up to 4 per …
- Very specific: line 115
When a change adds text an agent reads (a pointer, a doc, a skill), use writing-for-agents for the style if it is installed.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Friction review
The user typed /friction-review to improve the agent's environment for future sessions: what made the agent slow,
wasteful or blind in this project, measured across the last sessions, so that a candidate is friction that repeats and
not a one-off. You propose changes and make only the ones the user picks. This is not a memory system: every change
lands in a file of the project.
Run it again after the next batch of sessions: the review is a loop, and each round measures the changes of the last.
Privacy, for every step
Session files hold tool results, other people's words, and sometimes secrets or personal data.
- Refer to evidence by pointer: a session file and line. Describe it in a few words of your own; do not quote it.
- Never write a secret, an email, a person's name or a machine path into a proposal, a commit message, a code comment, a test fixture or anything posted.
- A check that proves a fix reproduces the friction with synthetic input, never pasted session text.
- Read only this project's transcript folders, never a glob across every project. The script finds them for you.
friction.mjsredacts what it can recognise. It is a net, not a guarantee.
1. Scope
From the arguments: a whole number N reads the last N sessions; a session id reads that one session; nothing reads the last 30. Anything else: ask which of the two the user means.
2. Run the script
From the project root:
node "${CLAUDE_SKILL_DIR}/friction.mjs" --last <N>
node "${CLAUDE_SKILL_DIR}/friction.mjs" --session <id>Node 20 or later, no dependencies, read only. The other options: --skip <id> leaves a session out (repeat it for
more), --keep-recent keeps the newest session, which is left out by default when it changed in the last 10 minutes
(it is most likely this one), --repo <dir> and --projects <dir>. Exit 2 is a usage error, exit 1 a refusal (not a
git repository, a session id that is not found).
It prints a header (the projects folder, the sessions and their date range, the subagent transcripts, the unreadable lines, the thresholds), then two parts:
- Project: the check commands the project defines, the guardrails (CI files, pre-commit, Claude Code hooks), which guardrail names each check, a "no guardrail" finding when there is no CI and no pre-commit, and the instruction files with their size in tokens. It knows package.json, Make, pyproject.toml, pytest.ini, tox.ini, noxfile.py, Cargo and Go; Gradle, Maven, .NET, Ruby and PHP are out of scope, so read their build files yourself.
- Sessions: per kind, each signal as "n in k of N sessions" with up to three pointers. A pointer is
<folder>/<file>:<line>, the tool and its target; a step from a subagent ends with(subagent: <agent type>).
A transcript is the main session file or one subagent file. Searches before the first edit, repeated reads and repeated commands are counted per transcript, since each agent has its own context. Coding standards and no-ops in steering files are not counted: they need reading.
Four navigation lines show whether scattered or oversized files cost turns:
- Files read in pieces: a file of the project read in 2 or more Read ranges (an offset, a limit or both) in one transcript. The same range read twice is a repeated read, not a second piece.
- New files made with Write: a Write inside the project whose result says it created the file.
- New files in commits: the paths that
git log --diff-filter=Alists over the days of the sessions read. The days are UTC days taken from the modification times of the session files, not from when the work started. Merges, renames and commits with no parent are not counted: the edge commit of a shallow clone lists every file as added. When the history cannot be read (a missing object, for example), the line says so and the rest still prints. - Reads and searches before the first edit in each folder: per transcript, the Read, Grep and Glob calls and the
shell commands that read or search (the first command of a pipe chain is a search,
cat,head,tail,nlorsed -n), counted until the first edit in a folder that transcript has not edited yet. A command that writes a file is not a read: an output redirection (>or>>, but not2>&1,>&2or one for errors only), a heredoc (cat > notes.md <<'EOF') orsed -i. Every edit of the project starts the count again. An edit call counts whatever its result, and edits made through the shell (sed -i, a heredoc) are not seen.
If the header shows 0 sessions, or says no transcript folder matches this repository, check that you ran it from the
project root (or pass --repo) and that the sessions live in the projects folder it names (CLAUDE_CONFIG_DIR moves
it; pass --projects). If there are still none, report the project part alone and say no session was read.
3. Check each count
A count is a lead, not evidence. For each signal you might act on, open two of its pointers and read a few lines
around each. The file is <projects folder>/<folder>/<file>, at that line: the header names the projects folder, and
the folder is printed with the home folder part as ~, so it is the folder there whose name ends with the rest. Drop
a signal whose pointers do not show the friction the count suggests, and say so.
4. Sort into kinds
Sort what holds up into the seven kinds in KINDS.md, each with its "use when" and the change it calls for: navigation, automated checks, coding standards, instruction file too large, tool economy, no-ops in steering files, information access. Read the instruction files for the two kinds the script does not count.
A candidate repeats: it appears in 2 or more sessions, or more than once in one session. Leave out the rest. "No guardrail" is a candidate on its own, whatever the counts.
5. Present, then wait
List the candidates by severity: sessions affected first, then cost (tokens, failed calls, time). For each: the counts, two pointers, the change at the highest layer that works (a check that runs on its own beats a pointer in a doc, which beats a line in CLAUDE.md), and the file it changes. Change nothing yet.
Ask which to make. AskUserQuestion takes 2 to 4 options per question and up to 4 questions per call: group the candidates, up to 4 per question with multiSelect, over several questions, and ask again for more. With one candidate, or without that tool, ask a plain numbered question.
6. Make what the user picks
- One commit per change, following the project's own rules for commits, tests and checks.
- A new check: prove it on a synthetic reproduction first (it fails on input that shows the friction, and passes once
the input is fixed). If
rule-to-hookis installed, use it for a check that becomes a Claude Code hook; without it, add the hook to.claude/settings.jsonby hand and prove it the same way. - A judgment rule for review: if
review-triageis installed, use its checklist format; see KINDS.md. - When a change adds text an agent reads (a pointer, a doc, a skill), use
writing-for-agentsfor the style if it is installed; otherwise keep it short and literal. - Never push.
7. Report
- The sessions read and their date range (from the header).
- What you proposed, what the user picked, and what changed, with the commits.
- What you dropped at step 3, and why.
- The next review: type
/friction-reviewagain after the next N sessions.
How it differs
retrospective, if it is installed, covers one session: the user's corrections and redone work in it.- For code mistakes across the whole history, from review comments, fix commits and what the user typed, the user can
type
/agent-friendly-audit, if it is installed. instructions-auditreviews the instruction files themselves (duplicates, contradictions, stale paths); use it, if it is installed, for the "instruction file too large" kind. This skill only measures their size.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

