bus-factor
Skill7 starsChanged 4 days agoMITView on GitHub
Measures a repo's bus factor from git blame and history, finds knowledge silos, and plans the handover. Use when asked for the bus or truck factor, which code only one person knows, or what happens if someone leaves or quits.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- milad-ahmd/bus-factorword for word, first seen Nov 29, 2026
- dataGriff/skillstheir own version, first seen Nov 1, 2026
- philpalmieri/engineering-manager-skillstheir own version, first seen May 19, 2026
Other versions3 projects use a version of this.
Word for word · 1
- milad-ahmd/bus-factor★ 0100% same
Edited · 0
None found.
Wrote their own version · 2
- philpalmieri/engineering-manager-skills★ 1same name
- dataGriff/skills★ 0same 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 repository71 other files it gives its agents.
- docs/llms.txtllms.txt
- a11y-fixerSkill
- ad-copy-generatorSkill
- agent-guardrailsSkill
- agent-memory-keeperSkill
- ai-slop-detectorSkill
- api-to-sdkSkill
- app-store-optimizerSkill
- architecture-doctorSkill
- brand-voice-guideSkill
- bug-detectiveSkill
- changelog-from-gitSkill
- codebase-explainerSkill
- codebase-time-machineSkill
- codebase-valuationSkill
- commit-craftSkill
- commit-roastSkill
- competitor-spySkill
- content-repurposerSkill
- copy-paste-detectorSkill
- cost-cutterSkill
- dead-code-funeralSkill
- demo-recorderSkill
- dependency-doctorSkill
- dependency-weigh-inSkill
- dev-wrappedSkill
- dockerize-anythingSkill
- domain-modelerSkill
- durable-agent-workflowsSkill
- e2e-flow-testerSkill
- email-campaign-writerSkill
- env-secrets-guardSkill
- gh-actions-auditorSkill
- github-portfolioSkill
- hook-generatorSkill
- incident-commanderSkill
- influencer-outreachSkill
- instagram-growth-managerSkill
- issue-triageSkill
- landing-page-roasterSkill
- launch-post-writerSkill
- meeting-notes-to-ticketsSkill
- merge-conflict-resolverSkill
- migration-wizardSkill
- name-checkerSkill
- plan-grillerSkill
- pre-commit-setupSkill
- prompt-injection-scannerSkill
- pr-reviewer-proSkill
- readme-glow-upSkill
- repo-cardSkill
- repo-dietSkill
- roast-my-githubSkill
- screenshot-to-componentSkill
- seo-blog-writerSkill
- skill-creator-proSkill
- skill-finderSkill
- skills-doctorSkill
- social-analytics-reporterSkill
- social-media-calendarSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 70
Treat line counts or blame share as performance.
- Distinctive: line 72
Read a high bus factor as proof that knowledge is shared.
≈ “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
Bus Factor
"Our bus factor is 1" is a joke until that person goes on leave. This skill finds the code only one person knows, puts a number on it, and turns the number into a handover plan.
1. Run the scan
python3 scripts/bus_factor.py # headline, riskiest files and dirs, "only you know"
python3 scripts/bus_factor.py src/ services/api # limit to paths
python3 scripts/bus_factor.py --svg bus-factor.svg # shareable card, no names
python3 scripts/bus_factor.py --svg bus-factor.svg --no-credit # same card without the small "made with agent-skills" line
python3 scripts/bus_factor.py --json # every file, dir and person
python3 scripts/bus_factor.py --days 180 --alias "jdoe@laptop.local=Jane Doe" --max-files 5000The script only reads. It blames each text file at HEAD with git blame --line-porcelain -w (whitespace-only changes keep the original author) and reads git log --use-mailmap for the last --days (default 365). Git applies .mailmap to both. --alias FROM=TO merges an email or name into the person named TO. If the repo sets blame.ignoreRevsFile, git skips those formatting commits too. It blames the 2,000 largest files by default and prints a Capped: line when it stops early. --now YYYY-MM-DD fixes the window end so runs can be compared. Docs are skipped unless --include-docs.
Exit codes: 0 report written · 2 not a git repository, no commits, a git error, or nothing to scan.
2. Explain the headline
The rules are also printed in the JSON under rules:
| Term | Meaning |
| knows a file | owns at least 20% of its lines and committed anywhere in the repo during the window, or made 2 or more commits to that file in the window (one typo fix doesn't count) |
| single owner | one person owns at least 80% of the lines and at most one other person touched the file in the window; knowledge at risk = lines x owner share |
| orphaned | nobody active knows the file, so the knowledge has already left |
| bus factor | the smallest number of people whose departure leaves more than 50% of the scanned lines orphaned |
Small teams get an exact search over combinations of people. Bigger ones fall back to the greedy loop of Avelino et al., "A novel approach for estimating truck factors" (ICPC 2016): remove the top author until less than half the code is covered. Their top author is whoever authors the most files and authorship comes from a degree-of-authorship model; here it is lines known, from blame plus recency. The report names the method; a greedy result is an upper bound.
Say what the number means for this repo in one or two sentences, for example "if Author A and Author B both left, 58% of the code would have nobody active who knows it". Point out the "already orphaned" share and any owners with no commits in the window, because that knowledge is already gone. Mention when the scan was capped.
3. Pick the 3-5 riskiest areas
Rank directories and files by knowledge at risk x churn (commits in the window, in the JSON). Code that is risky and changes often comes first. Risky code nobody touches can wait for a walkthrough doc. Read the top files before you plan anything: what they do, how they are tested, and what breaks if they are wrong (payments, auth, data migrations, deploy scripts).
4. Propose a handover per area
For each area, give concrete steps that fit in the next sprint:
- Pairing: two or three sessions where the owner and a second person (the user picks who) change something real in that area together. Suggest a small open ticket to use.
- A walkthrough doc, one page per area, written by the second person after pairing and reviewed by the owner. It covers what the code does, its entry points and invariants, the known traps, and how to test it locally.
- Review rotation through a CODEOWNERS change that adds a second reviewer. Show the diff and do not apply it.
- Tests where behaviour lives only in the owner's head (no tests, or only happy-path tests). List the cases the owner should explain so someone else can write them.
-/billing/ @owner-handle
+/billing/ @owner-handle @second-handleGitHub, GitLab and Bitbucket all read a CODEOWNERS file, but where it lives and its syntax differ between them, so check the host's docs before suggesting the exact path.
Then say how to measure progress: re-run in a quarter with the same --days and compare the bus factor, the single-owner share and the riskiest directories.
Report
The headline and the method, the 3-5 areas with their numbers (lines, owner share, churn, knowers), the handover steps per area, and the CODEOWNERS diff. Use the Author labels unless the user asked for names. If they want the card, give the SVG path.
Do not
- Name people unless the user asks with
--show-authors, and never publish a named report or card without their go-ahead. - Rank, blame or shame individuals. A single owner usually means someone built something nobody else was given time to learn; the fix is time and pairing.
- Treat line counts or blame share as performance. Blame counts surviving lines, not effort, design work, reviews or mentoring.
- Apply CODEOWNERS or branch-protection changes, or open tickets, without the user asking.
- Read a high bus factor as proof that knowledge is shared. Recent commits are a proxy for knowing the code, not a test of it.
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.

