agentleFS
maee-comaee-co/cc-autoship/skills/monorepo-manager/SKILL.md

monorepo-manager

Skill0 starsChanged 5 months agoMITView on GitHub

Gatekeeper that checks repository consistency and development-flow compliance (in a monorepo it also checks dependency and scope boundaries).

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. Rajan-Metaliya/claude-notes★ 4same 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 repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    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
  1. Distinctive:

    Check repository consistency and development-flow compliance (in a monorepo it also checks dependency and scope boundaries.

    line 15
  2. Distinctive:

    Check that the changed files stay within scope:

    line 61
  3. Very specific:

    Check whether anything under packages/ changed

    line 69
  4. Distinctive:

    Look up that package's owner in the "Shared package owners" section of CLAUDE.md

    line 72
  5. Distinctive:

    Do new directories and files follow the structure in CLAUDE.md?

    line 86
  6. Distinctive:

    Check that it matches one of:

    line 96
  7. Very specific:

    Check each message follows type(scope): description

    line 111
  8. Very specific:

    Search for the corresponding GitHub issue with gh issue list --search "<ID>" and confirm it exists

    line 120
  9. Distinctive:

    If it is not found, emit a caution (an external tracker → GitHub sync may just be lagging)

    line 121
  10. Distinctive:

    Check whether the current working directory is inside a worktree

    line 126
  11. Distinctive:

    PASS: every item ✅ or N/A → proceed as is

    line 184
  12. Distinctive:

    When the trivial-change skip criteria apply, the whole check may be skipped

    line 207

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/monorepo-manager

Check repository consistency and development-flow compliance (in a monorepo it also checks dependency and scope boundaries; in a single-package repo the A checks resolve to N/A and only the B flow-compliance checks do anything). It runs automatically at plan review and before commit-push. It can also be called at any time with /monorepo-manager.

Modes

The mode is chosen by argument. With no argument, both run.

ModeArgumentPurpose
Plan reviewplanCheck the implementation plan during the proposal phase
Pre-commit checkpre-commitCheck the diff before commit-push
Full check(none)Run both

When trivial changes may skip the checks

Any of the following may skip the check content (a worktree and a PR are always required; the hook blocks direct commits on main anyway):

  • 5 lines or fewer changed, and only a typo or wording fix
  • .md files only
  • A trivial update whose commit message starts with docs(*) or chore(*)

A. Monorepo / multi-package integrity (N/A in a single-package repo)

A1. Edits within scope

  1. Determine the scope from the current branch name
    git branch --show-current
    • feat/{ISSUE-ID}-{scope}-{desc} or fix/{ISSUE-ID}-{scope}-{desc} → extract the scope part
    • ISSUE-ID is a GitHub issue number (e.g. 99) or an external tracker ID (ABC-99 for Linear, and so on)
    • A compound scope (feat/99-scope1,scope2-desc) is split on commas into several scopes
    • On the main branch → skip the scope check (B1 warns about it)
  2. Get the list of changed files (branching on the current branch)
    # On a feature/fix branch
    git diff --name-only main...HEAD
    
    # On the main branch (staged, plus the most recent commit)
    git diff --name-only --cached
    # If nothing is staged, the most recent commit
    git diff --name-only HEAD~1..HEAD
  3. Check that the changed files stay within scope:
    • apps/{scope}/ — app-specific changes
    • packages/ — shared packages (the blast radius needs checking; go to A2)
    • .claude/, docs/, root config files — allowed only under the infra scope
  4. Emit a warning for anything outside the scope

A2. Shared package impact

  1. Check whether anything under packages/ changed
  2. If so:
    • Identify which package (packages/ui/, packages/typescript-config/, and so on)
    • Look up that package's owner in the "Shared package owners" section of CLAUDE.md
    • Identify the apps that depend on it from dependencies / devDependencies in package.json
  3. Report it as a caution when there is impact

A3. Dependency consistency

  1. If package.json changed:
    • Is the new dependency justified (is there a duplicate package)?
    • Is the workspace protocol (workspace:*) used correctly?
  2. If turbo.json changed:
    • Confirm the task definition structure is not broken (read it and verify)

A4. Directory structure

  1. Do new directories and files follow the structure in CLAUDE.md?
  2. Are apps under apps/ and shared code under packages/?

B. Development flow compliance

B1. Branch naming

  1. Get the current branch name
  2. Check that it matches one of:
    • feature: feat/{ISSUE-ID}-{scope}-{description}
    • bugfix: fix/{ISSUE-ID}-{scope}-{description}
    • Working directly on main is a warning (the hook blocks commit/push there, so a worktree is required)

B2. Commit message format

  1. Get the messages of the unmerged commits (branching on the current branch)
    # On a feature/fix branch
    git log main..HEAD --format="%s"
    
    # On the main branch (check the most recent commit)
    git log -1 --format="%s"
  2. Check each message follows type(scope): description
    • type: feat / fix / docs / refactor / test / chore
    • scope: an app name, a package name, or infra
    • A compound scope is allowed: type(scope1,scope2): description
  3. On a violation, emit a warning with a correct example

B3. Issue linkage

  1. Extract the issue ID from the branch name (feat/42-... → 42, feat/ABC-42-... → ABC-42)
  2. Search for the corresponding GitHub issue with gh issue list --search "<ID>" and confirm it exists
  3. If it is not found, emit a caution (an external tracker → GitHub sync may just be lagging)
  4. Skip this check on the main branch

B4. Worktree usage (plan review only)

  1. Check whether the current working directory is inside a worktree
    git worktree list
    • Two or more lines of output (main + worktree) with the current directory matching a worktree path means OK
  2. Emit a caution when working directly on main and outside a worktree
  3. Skip for trivial changes

Output format

Write the output in the language of the session (the same language you are answering the user in). The template below is the English sample and is not a set of strings to copy verbatim. Emitting a template in the wrong language means the very first step of /commit-push shows the user a table they cannot read.

Replace the fixed labels using this mapping (use exactly these words so translations do not drift):

日本語English
リポジトリ整合性チェック結果Repository integrity check
A. モノレポ / マルチパッケージ整合性A. Monorepo / multi-package integrity
B. 開発フロー遵守B. Development flow compliance
# / チェック項目 / 結果 / 備考# / Check / Result / Notes
スコープ内編集Edits within scope
共有パッケージ影響Shared package impact
依存関係整合性Dependency consistency
ディレクトリ構成Directory structure
ブランチ命名Branch naming
コミットメッセージCommit message
Issue 紐付けIssue linkage
worktree 運用Worktree usage
総合判定Overall verdict
そのまま進行proceed as is
注意事項を確認の上で進行可may proceed after reviewing the warnings
修正が必要fixes required

Invariant regardless of language (never translate): the verdict values PASS / WARN / BLOCK and the symbols ✅ / ⚠️ / ❌ / N/A (callers branch on these).

Emit the markdown tables below directly (not wrapped in a code block):

Repository integrity check

A. Monorepo / multi-package integrity

#CheckResultNotes
A1Edits within scope✅/⚠️/❌{details}
A2Shared package impact✅/⚠️/N/A{details}
A3Dependency consistency✅/⚠️/N/A{details}
A4Directory structure✅/⚠️{details}

B. Development flow compliance

#CheckResultNotes
B1Branch naming✅/⚠️/❌{details}
B2Commit message✅/⚠️/❌{details}
B3Issue linkage✅/⚠️{details}
B4Worktree usage✅/⚠️/N/A{details}

Overall verdict

  • PASS: every item ✅ or N/A → proceed as is
  • WARN: any ⚠️ → may proceed after reviewing the warnings
  • BLOCK: any ❌ → fixes required

Additional checks in plan review mode (plan)

Against the proposal text in the conversation context, confirm:

  1. The files to be changed stay within scope (A1, applied to the plan)
  2. A test approach is included
  3. An issue will be created (except when the trivial-change skip criteria apply)
  4. Creating a worktree is part of the plan

Where the plan falls short, point out concretely what to fix.


Notes

  • This skill acts as an advisor, not a blocker
  • ❌ (BLOCK) can be overridden at the maintainer's discretion
  • When the trivial-change skip criteria apply, the whole check may be skipped
  • Under Agent Teams, it also runs before each teammate's commit

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.