codeowners
Skill2 starsChanged 4 months agoMITView on GitHub
Generate or update a CODEOWNERS file mapping paths to owning people or teams, so the right reviewers are auto-requested on PRs. Use when the user says "add a CODEOWNERS file", "set up code owners", "who should review which files", "auto-assign reviewers", or "map directories to teams".
In this repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Decide create vs update: If a CODEOWNERS exists, preserve its existing rules and only add/adjust what's missing.
- Very specific: line 31
Never invent owner handles — use only the teams/users the user supplies.
- Very specific: line 35
After writing, summarize the mapping, note that owners must have write access for auto-request to work, and list any # TODO placeholders …
≈ “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
Ownership signals
!ls CODEOWNERS .github/CODEOWNERS docs/CODEOWNERS 2>/dev/null && echo "(existing CODEOWNERS above — update it, don't replace blindly)"
!ls -d */ 2>/dev/null | head -30
!git shortlog -sne --all 2>/dev/null | head -15
Instructions
Generate or update a CODEOWNERS file. Use the owners/teams in $ARGUMENTS if given; otherwise propose a structure from the repo layout and ask the user to fill in the actual owners — don't invent team or user handles.
Method
- Read the repo structure (top-level dirs and the major subsystems) to identify the areas that warrant distinct ownership — frontend, backend, infra, docs, CI config, shared libs. The
git shortlogabove hints at who works where, but ownership is a human/policy decision: use it only as a suggestion, never as the assignment. - Decide create vs update. If a CODEOWNERS exists, preserve its existing rules and only add/adjust what's missing. Otherwise create one at the conventional path (
.github/CODEOWNERSfor GitHub;CODEOWNERSat root, or GitLab's.gitlab/CODEOWNERS). - Write rules most-general to most-specific. The last matching pattern wins (GitHub semantics), so put a catch-all
*default at the top and progressively more specific paths below it. Use the platform's path syntax (gitignore-style globs, leading/to anchor, trailing/for directories). - Assign real owners —
@org/teamor@userhandles the user provides. Where the user hasn't named an owner for an area, leave a clearly-marked# TODO: ownerplaceholder rather than guessing a handle that may not exist. - Keep it maintainable — prefer teams over individuals (resilient to people leaving), group related paths, and don't over-specify every file. Cover the high-traffic and sensitive areas (auth, infra, CI, security) deliberately.
Rules
- Never invent owner handles — use only the teams/users the user supplies; mark unknown owners as a
# TODOfor the maintainer to fill. - Order rules correctly for the platform (last-match-wins on GitHub): general defaults first, specific overrides last, or the specific rules get shadowed.
- Validate that every owner is a syntactically valid handle and every path pattern matches something real in the repo; flag patterns that match nothing.
- Preserve existing rules when updating; don't drop ownership someone is relying on.
- After writing, summarize the mapping, note that owners must have write access for auto-request to work, and list any
# TODOplaceholders the user still needs to fill.
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.

