codeownership
Skill627 starsChanged 7 days agoMITView on GitHub
Maintain CODEOWNERS file and team directories. Provides resolve-codeowners.js to annotate files with their owner team — useful to split a large PR by team. Use when working with "**/team-*/**" or splitting monolithic files.
In this repository70 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- analyticsSkill
- batch-feature-devSkill
- ci-runnersSkill
- ci-workflow-refsSkill
- cleanupSkill
- client-idsSkill
- cloud-sync-moduleSkill
- coin-families-contractSkill
- coin-modulesSkill
- commentsSkill
- configurationSkill
- console-logSkill
- create-changesetSkill
- create-prSkill
- data-layer-advancedSkill
- debug-rn-native-crashSkill
- dependency-patchesSkill
- detect-data-leaksSkill
- device-intent-executorSkill
- devtools-import-boundarySkill
- dialogs-sliceSkill
- docs-migrateSkill
- docs-update-or-createSkill
- domain-dataSkill
- e2e-desktop-add-or-updateSkill
- e2e-desktop-onboardSkill
- e2e-earnSkill
- e2e-mobile-add-or-updateSkill
- e2e-mobile-onboardSkill
- e2e-swapSkill
- errorsSkill
- feature-devSkill
- fix-ciSkill
- flow-packageSkill
- get-pr-commentsSkill
- git-conventionsSkill
- i18n-keysSkill
- impacting-prsSkill
- knip-migrationSkill
- ldls-nativeSkill
- ldls-webSkill
- ledger-wallet-cliSkill
- legacy-migrationSkill
- mvvm-architectureSkill
- new-packageSkill
- package-public-apiSkill
- pnpm-resolutionSkill
- prefer-set-hasSkill
- pre-reviewSkill
- react-generalSkill
- rebuild-to-fix-lib-import-errorsSkill
- remove-feature-flagSkill
- run-buildsSkill
- run-e2e-ciSkill
- runner-imagesSkill
- run-testsSkill
- slack-pr-messageSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 21
Use resolve-codeowners.js to annotate any list of files with their CODEOWNERS team — handy when splitting a large PR by team owner.
- Very specific: line 46
After editing CODEOWNERS, or moving or deleting files it names, run the CI check locally:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Codeownership
Why
- To reduce cross-team review bottlenecks
What
- Make ownership of team specific directories clear
- Organise some directories into team-specific sub-directories
- Maintain CODEOWNERS files when team specific directories are added or removed
- Split monolithic files or folders that have been identified as being touched by too many teams
Resolving ownership for a list of files
Use resolve-codeowners.js to annotate any list of files with their CODEOWNERS team — handy when splitting a large PR by team owner. It uses the same matcher as the CI check in validate-codeowners, so it resolves exactly as GitHub does (case-sensitive, no install needed).
# From a git diff
git diff --name-only HEAD~1 | node .agents/skills/codeownership/resolve-codeowners.js
# Explicit file list
node .agents/skills/codeownership/resolve-codeowners.js apps/ledger-live-desktop/src/foo.ts libs/env/src/bar.ts
# Override CODEOWNERS location
node .agents/skills/codeownership/resolve-codeowners.js --codeowners /path/to/CODEOWNERS <files...>Output format (same columns as CODEOWNERS, but resolved to actual files):
apps/ledger-live-desktop/src/main/index.ts @ledgerhq/platform
apps/ledger-live-desktop/src/renderer/foo.ts @ledgerhq/wallet-xp
.github/workflows/e2e.yml @ledgerhq/wallet-ci @ledgerhq/qaa
random/unknown/file.xyz (no owner)Semantics: last-rule-wins; ownerless entries appear as (no owner).
Checking CODEOWNERS before pushing
After editing CODEOWNERS, or moving or deleting files it names, run the CI check locally:
node .agents/skills/codeownership/resolve-codeowners.js --checkIt fails on rules that match no file, never take effect, re-own narrower rules from a later position, or use an unanchored name that matches in several places. Put defaults such as **/tsconfig* near the top; team-specific rules come after them.
Target
Splitting a monolithic file
- Split
[foo].tsinto[foo]/team-[name]/*.ts
Maintaining team specific directories
Example
/shared/feature-flags/src/flags/ contains team-coin-integration, team-engagement, team-live-devices, etc.
CODEOWNERS defines the owner for each of these:
**/team-coin-integration/ @ledgerhq/coin-integration
**/team-engagement/ @ledgerhq/engagement
**/team-live-devices/ @ledgerhq/live-devicesDoes 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.

