file-coupling
Skill4 starsChanged 6 months agoApache-2.0View on GitHub
Find files that habitually change together, from captured step history. Use before editing a file to learn what usually needs changing with it, or to find hidden structural coupling.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- blameSkill
- logSkill
- showSkill
- blameSkill
- bug-blameSkill
- context-primerSkill
- logSkill
- regent-skillsSkill
- rewindSkill
- showSkill
- skill-factorySkill
- style-factorySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 39
If the user named a path, report only pairs involving it.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Report which files co-occur in the same captured steps, and how often.
Git can only see files that landed in the same commit. re_gent sees every file an agent touched in the same turn — a much sharper signal, because a turn is one intention.
Gather
List sessions, then read their steps as JSON:
rgt sessions --format json
rgt log --json --session <session-id> -n 200Each step carries files (paths written that turn), timestamp, and messages
(the prompt behind it). Repeat per session so the sample spans the project, not
one conversation.
Compute
For every step with two or more files, count each unordered pair. Then for each pair report:
- together — steps containing both
- coupling —
together / steps containing either(Jaccard). This is the number to sort by; raw counts just rank whatever changes most.
Ignore steps whose file list is enormous (a dependency install or a formatter run touches everything and couples nothing). More than ~20 files in one step is usually machine noise, not intent.
If the user named a path, report only pairs involving it.
Report
A table sorted by coupling, strongest first:
| File | Couples with | Together | Coupling |
Then, for the top two or three pairs, quote the prompt from one step where they
moved together — from that step's messages. The number says that they are
coupled; the prompt says why, and only re_gent can answer the second.
Close with the actionable line: which files the user should expect to edit alongside the one they asked about.
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.

