Skip to main content
guidesSource-backedReview first Safety Privacy

Multi-Directory and Monorepo Setup in Claude Code

How to give Claude Code access to more than one directory: the --add-dir flag, the /add-dir command, and the permissions.additionalDirectories setting, plus how each one handles CLAUDE.md, rules, and skills in monorepos.

by JSONbored·added 2025-10-27·
HarnessClaude Code
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://code.claude.com/docs/en/large-codebases, https://github.com/JSONbored/awesome-claude/blob/main/content/guides/multi-directory-setup.mdx
Safety notes
Any directory you grant with --add-dir, /add-dir, or additionalDirectories is readable and editable by Claude in that session; only add directories you intend Claude to modify.
Privacy notes
Granting a directory exposes its file contents to the session and the model provider; do not add directories containing secrets or unrelated private code.
Author
JSONbored
Claim status
unclaimed
Last verified
2025-10-27

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

Install command

Not provided

Config snippet

Not provided

Copy snippet

Provided

Prerequisites

2 to clear

Platforms

1 listed

Difficulty

45/100

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Prerequisite readiness

Prerequisite readiness

2 prerequisites to line up before setup.

0/2 ready
Install & runtime1Permissions & scopes1

Safety & privacy surface

Safety & privacy surface

1 safety and 1 privacy notes across 1 risk area. Review closely: credentials & tokens.

1 area
  • SafetyCredentials & tokensAny directory you grant with --add-dir, /add-dir, or additionalDirectories is readable and editable by Claude in that session; only add directories you intend Claude to modify.
  • PrivacyCredentials & tokensGranting a directory exposes its file contents to the session and the model provider; do not add directories containing secrets or unrelated private code.

Safety notes

  • Any directory you grant with --add-dir, /add-dir, or additionalDirectories is readable and editable by Claude in that session; only add directories you intend Claude to modify.

Privacy notes

  • Granting a directory exposes its file contents to the session and the model provider; do not add directories containing secrets or unrelated private code.

Prerequisites

  • Claude Code installed and runnable as `claude`.
  • A working directory you start Claude from; additional directories are granted relative to it.

Schema details

Install type
copy
Reading time
6 min
Difficulty score
45
Troubleshooting
Yes
Breaking changes
No
Full copyable content
## Overview

A Claude Code session can read and edit files in its working directory by default. Working across more than one directory comes up in two common situations:

- **A monorepo**, where a change to a shared package needs matching edits in the packages that import it.
- **Separate repositories** checked out side by side, where one task spans both.

Claude Code gives you three ways to grant access beyond the working directory: the `--add-dir` launch flag, the `/add-dir` in-session command, and the `permissions.additionalDirectories` setting. They differ mainly in scope (one session versus committed config) and in what they load from the added directory: file access only, or also that directory's `CLAUDE.md`, rules, and skills.

This guide covers those three mechanisms and the decision that comes before them: where to start Claude.

## Choose where to start Claude

Before adding directories, pick your launch point. Where you run `claude` determines which files Claude can touch without a grant and which `CLAUDE.md` files load at startup.

| Start from      | File access                            | CLAUDE.md loaded at launch                              | Use when                                   |
| :-------------- | :------------------------------------- | :----------------------------------------------------- | :----------------------------------------- |
| Repository root | Every file in the tree                 | Root only; subdirectory files load on demand           | Tasks span multiple packages or subsystems |
| A subdirectory  | That subtree only, until you grant more | That directory's plus every ancestor's                 | Work is scoped to one package or subsystem |

If you start from the repository root of a single large tree, Claude already reaches every file and you do not need to add directories. The mechanisms below matter when you start from a subdirectory, or when a task spans separate checkouts.

Note that project settings in `.claude/settings.json` load only from the directory you start in; they are not inherited from parent directories the way `CLAUDE.md` files are.

## Grant access for one session: `--add-dir` and `/add-dir`

To add a directory at launch, pass `--add-dir`:

```bash
# Start in packages/api and also reach the sibling shared package
claude --add-dir ../shared

# Multiple directories, including a separate repository
claude --add-dir ../shared --add-dir ~/code/other-repo
```

To add a directory after a session has already started, use the `/add-dir` command:

```text
/add-dir ../web
```

Either way, Claude can read and edit files in the added directory for the rest of that session. Neither change is persisted; the next session starts from your working directory again.

By default, a directory added this way does **not** load its `CLAUDE.md`, `.claude/rules/`, or `CLAUDE.local.md`. To also load those memory files, set the `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` environment variable:

```bash
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir ../shared-config
```

With the variable set, Claude loads `CLAUDE.md`, `.claude/CLAUDE.md`, `.claude/rules/*.md`, and `CLAUDE.local.md` from the added directory. (`CLAUDE.local.md` is skipped if you exclude `local` from `--setting-sources`.) Skills in an added directory load on demand regardless of this variable.

## Grant access permanently: `additionalDirectories`

To make sibling access part of the project so everyone working in this area gets it, use the `permissions.additionalDirectories` setting in `.claude/settings.json`:

```json
{
  "permissions": {
    "additionalDirectories": [
      "../shared",
      "../web"
    ]
  }
}
```

Relative paths resolve against the directory you start Claude from. With the configuration above, a session launched in `packages/api/` can read and edit files in `packages/shared/` and `packages/web/` without any flag.

Commit the setting to `.claude/settings.json` for everyone, or put it in `.claude/settings.local.json` for a personal, gitignored selection.

Unlike `--add-dir`, the `additionalDirectories` setting grants **file access only**. It never loads the added directory's `CLAUDE.md`, rules, or skills, and the `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` variable has no effect on it. If you need a sibling's instructions or skills loaded, add it with `--add-dir` instead.

## Reference: which mechanism loads what

| Added with                             | Scope               | Read/edit access | Loads CLAUDE.md and rules                  | Loads skills |
| :------------------------------------- | :------------------ | :--------------- | :----------------------------------------- | :----------- |
| `additionalDirectories` setting        | Committed / local config | Yes         | Never                                      | Never        |
| `--add-dir` flag                       | One session         | Yes              | Only with `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` | Yes          |
| `/add-dir` command                     | Rest of the session | Yes              | Only with `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` | Yes          |

Pick based on intent: `additionalDirectories` for stable, team-wide sibling access where you only need files; `--add-dir` / `/add-dir` for one-off access, or when you want the sibling's conventions and skills in context too.

## Monorepo layout that scales

Adding directories is one of several settings that keep Claude focused in a large codebase. A typical monorepo combines them:

- **Layer `CLAUDE.md` files by directory.** A root file sets repository-wide rules; each package adds its own. Claude loads the root plus the package you start in, and pulls in a subdirectory's file on demand when it reads there. Keep each file focused on its own area so context is not spent on unrelated subsystems.
- **Exclude irrelevant `CLAUDE.md` files** with `claudeMdExcludes` (glob patterns matched against absolute paths) for packages you never touch, such as other teams' code or vendored subtrees.
- **Block reads of generated and vendored code** with `Read` deny rules in `permissions.deny`, for example `"Read(./**/dist/**)"` and `"Read(./vendor/**)"`. Searches already respect `.gitignore`, so this is for checked-in artifacts.
- **Grant sibling access** with `additionalDirectories` when a change spans packages.

A committed `packages/api/.claude/settings.json` that combines these:

```json
{
  "permissions": {
    "additionalDirectories": [
      "../shared"
    ],
    "deny": [
      "Read(./**/dist/**)",
      "Read(./**/build/**)"
    ]
  }
}
```

Because project settings load only from your starting directory, each subdirectory's `.claude/settings.json` must be self-contained rather than layered on a root file.

## Worktrees and sparse paths

If you start sessions in a new git worktree with `--worktree`, the entire repository is checked out by default. In a large repository, the `worktree.sparsePaths` setting uses git sparse-checkout to write only the listed directories (plus root-level files) to disk:

```json
{
  "worktree": {
    "sparsePaths": [
      ".claude",
      "packages/api",
      "packages/shared"
    ],
    "symlinkDirectories": [
      "node_modules"
    ]
  }
}
```

Paths are relative to the repository root regardless of where you launch Claude. List directories, not individual files; root-level files like lock files and `tsconfig.base.json` are always included. Add `.claude` if you want the repository root's `.claude/` available inside the worktree. Pair with `symlinkDirectories` to avoid duplicating large directories such as `node_modules` across worktrees.

Note that `sparsePaths` and `symlinkDirectories` are read from your starting directory before the worktree is created; after creation the session's working directory is the worktree root, so put permission rules and hooks you need inside worktrees in the repository root's `.claude/settings.json`.

## Scoping a change that spans packages

Configuration controls what Claude can see; how you scope the task affects the result:

- **Hand over the whole change in one session.** Giving Claude the shared edit and its call sites together keeps decisions consistent across packages instead of being re-derived per package.
- **Save the plan to a file before editing.** A long cross-package session compacts its context along the way; a plan written to a markdown file in the repository survives where conversation history may not.

## Troubleshooting

- **Claude says it cannot edit a sibling package.** You started in a subdirectory without granting the sibling. Add it with `--add-dir`, `/add-dir`, or `additionalDirectories`, or start Claude from the repository root.
- **A sibling's `CLAUDE.md` is being ignored.** The `additionalDirectories` setting never loads memory files. Use `--add-dir` with `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1`, or layer a `CLAUDE.md` in your own tree instead.
- **A relative path resolves to the wrong place.** Relative paths resolve against the directory you start Claude in, not the repository root (sparse paths are the exception). Confirm your launch directory, or use an absolute path.
- **Settings in `.claude/settings.json` are not taking effect.** Project settings load only from the directory you start in. A root settings file does not apply when you launch from a subdirectory.

## Related resources

- [Set up Claude Code in a monorepo or large codebase](https://code.claude.com/docs/en/large-codebases)
- [Settings reference](https://code.claude.com/docs/en/settings)
- [Memory and project instructions](https://code.claude.com/docs/en/memory)

About this resource

Overview

A Claude Code session can read and edit files in its working directory by default. Working across more than one directory comes up in two common situations:

  • A monorepo, where a change to a shared package needs matching edits in the packages that import it.
  • Separate repositories checked out side by side, where one task spans both.

Claude Code gives you three ways to grant access beyond the working directory: the --add-dir launch flag, the /add-dir in-session command, and the permissions.additionalDirectories setting. They differ mainly in scope (one session versus committed config) and in what they load from the added directory: file access only, or also that directory's CLAUDE.md, rules, and skills.

This guide covers those three mechanisms and the decision that comes before them: where to start Claude.

Choose where to start Claude

Before adding directories, pick your launch point. Where you run claude determines which files Claude can touch without a grant and which CLAUDE.md files load at startup.

Start from File access CLAUDE.md loaded at launch Use when
Repository root Every file in the tree Root only; subdirectory files load on demand Tasks span multiple packages or subsystems
A subdirectory That subtree only, until you grant more That directory's plus every ancestor's Work is scoped to one package or subsystem

If you start from the repository root of a single large tree, Claude already reaches every file and you do not need to add directories. The mechanisms below matter when you start from a subdirectory, or when a task spans separate checkouts.

Note that project settings in .claude/settings.json load only from the directory you start in; they are not inherited from parent directories the way CLAUDE.md files are.

Grant access for one session: --add-dir and /add-dir

To add a directory at launch, pass --add-dir:

# Start in packages/api and also reach the sibling shared package
claude --add-dir ../shared

# Multiple directories, including a separate repository
claude --add-dir ../shared --add-dir ~/code/other-repo

To add a directory after a session has already started, use the /add-dir command:

/add-dir ../web

Either way, Claude can read and edit files in the added directory for the rest of that session. Neither change is persisted; the next session starts from your working directory again.

By default, a directory added this way does not load its CLAUDE.md, .claude/rules/, or CLAUDE.local.md. To also load those memory files, set the CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD environment variable:

CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir ../shared-config

With the variable set, Claude loads CLAUDE.md, .claude/CLAUDE.md, .claude/rules/*.md, and CLAUDE.local.md from the added directory. (CLAUDE.local.md is skipped if you exclude local from --setting-sources.) Skills in an added directory load on demand regardless of this variable.

Grant access permanently: additionalDirectories

To make sibling access part of the project so everyone working in this area gets it, use the permissions.additionalDirectories setting in .claude/settings.json:

{
  "permissions": {
    "additionalDirectories": [
      "../shared",
      "../web"
    ]
  }
}

Relative paths resolve against the directory you start Claude from. With the configuration above, a session launched in packages/api/ can read and edit files in packages/shared/ and packages/web/ without any flag.

Commit the setting to .claude/settings.json for everyone, or put it in .claude/settings.local.json for a personal, gitignored selection.

Unlike --add-dir, the additionalDirectories setting grants file access only. It never loads the added directory's CLAUDE.md, rules, or skills, and the CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD variable has no effect on it. If you need a sibling's instructions or skills loaded, add it with --add-dir instead.

Reference: which mechanism loads what

Added with Scope Read/edit access Loads CLAUDE.md and rules Loads skills
additionalDirectories setting Committed / local config Yes Never Never
--add-dir flag One session Yes Only with CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 Yes
/add-dir command Rest of the session Yes Only with CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 Yes

Pick based on intent: additionalDirectories for stable, team-wide sibling access where you only need files; --add-dir / /add-dir for one-off access, or when you want the sibling's conventions and skills in context too.

Monorepo layout that scales

Adding directories is one of several settings that keep Claude focused in a large codebase. A typical monorepo combines them:

  • Layer CLAUDE.md files by directory. A root file sets repository-wide rules; each package adds its own. Claude loads the root plus the package you start in, and pulls in a subdirectory's file on demand when it reads there. Keep each file focused on its own area so context is not spent on unrelated subsystems.
  • Exclude irrelevant CLAUDE.md files with claudeMdExcludes (glob patterns matched against absolute paths) for packages you never touch, such as other teams' code or vendored subtrees.
  • Block reads of generated and vendored code with Read deny rules in permissions.deny, for example "Read(./**/dist/**)" and "Read(./vendor/**)". Searches already respect .gitignore, so this is for checked-in artifacts.
  • Grant sibling access with additionalDirectories when a change spans packages.

A committed packages/api/.claude/settings.json that combines these:

{
  "permissions": {
    "additionalDirectories": [
      "../shared"
    ],
    "deny": [
      "Read(./**/dist/**)",
      "Read(./**/build/**)"
    ]
  }
}

Because project settings load only from your starting directory, each subdirectory's .claude/settings.json must be self-contained rather than layered on a root file.

Worktrees and sparse paths

If you start sessions in a new git worktree with --worktree, the entire repository is checked out by default. In a large repository, the worktree.sparsePaths setting uses git sparse-checkout to write only the listed directories (plus root-level files) to disk:

{
  "worktree": {
    "sparsePaths": [
      ".claude",
      "packages/api",
      "packages/shared"
    ],
    "symlinkDirectories": [
      "node_modules"
    ]
  }
}

Paths are relative to the repository root regardless of where you launch Claude. List directories, not individual files; root-level files like lock files and tsconfig.base.json are always included. Add .claude if you want the repository root's .claude/ available inside the worktree. Pair with symlinkDirectories to avoid duplicating large directories such as node_modules across worktrees.

Note that sparsePaths and symlinkDirectories are read from your starting directory before the worktree is created; after creation the session's working directory is the worktree root, so put permission rules and hooks you need inside worktrees in the repository root's .claude/settings.json.

Scoping a change that spans packages

Configuration controls what Claude can see; how you scope the task affects the result:

  • Hand over the whole change in one session. Giving Claude the shared edit and its call sites together keeps decisions consistent across packages instead of being re-derived per package.
  • Save the plan to a file before editing. A long cross-package session compacts its context along the way; a plan written to a markdown file in the repository survives where conversation history may not.

Troubleshooting

  • Claude says it cannot edit a sibling package. You started in a subdirectory without granting the sibling. Add it with --add-dir, /add-dir, or additionalDirectories, or start Claude from the repository root.
  • A sibling's CLAUDE.md is being ignored. The additionalDirectories setting never loads memory files. Use --add-dir with CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1, or layer a CLAUDE.md in your own tree instead.
  • A relative path resolves to the wrong place. Relative paths resolve against the directory you start Claude in, not the repository root (sparse paths are the exception). Confirm your launch directory, or use an absolute path.
  • Settings in .claude/settings.json are not taking effect. Project settings load only from the directory you start in. A root settings file does not apply when you launch from a subdirectory.

Related resources

Source citations

Add this badge to your README

Show that Multi-Directory and Monorepo Setup in Claude Code is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/guides/multi-directory-setup.svg)](https://heyclau.de/entry/guides/multi-directory-setup)

How it compares

Multi-Directory and Monorepo Setup in Claude Code side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

2 trust signals differ across this comparison (Source provenance, Submitter).

Field

How to give Claude Code access to more than one directory: the --add-dir flag, the /add-dir command, and the permissions.additionalDirectories setting, plus how each one handles CLAUDE.md, rules, and skills in monorepos.

Open dossier

A practical walkthrough of structuring CLAUDE.md across a monorepo: how files load up the directory tree and on demand in subdirectories, path-scoped rules, imports, excluding other teams' files, and keeping per-package context lean.

Open dossier

Set up sparse context for large codebases in Claude Code: scoped directories, CLAUDE.md hierarchy, subagents, and avoiding whole-repo loading.

Open dossier

Configure Claude Code in JetBrains IDEs for large repositories: terminal rendering fixes, synchronized output, sparse context, and plugin workflows for IntelliJ-based teams.

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceDiffersSource-backedSource-backedSubmission linkedSource submissionSubmission linkedSource submission
SubmitterDiffersJPette1783kiannidevkiannidev
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Brand
Categoryguidesguidesguidesguides
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorJSONboredJPette1783kiannidevkiannidev
Added2025-10-272026-06-052026-06-142026-06-14
Platforms
Claude Code
Claude Code
Claude Code
Claude Code
Source repo
Safety notesAny directory you grant with --add-dir, /add-dir, or additionalDirectories is readable and editable by Claude in that session; only add directories you intend Claude to modify.CLAUDE.md is context, not enforcement; for rules that must always hold (block a path, run a check before commit), use a PreToolUse hook or managed settings, not prose. Conflicting instructions across nested CLAUDE.md files cause Claude to pick one arbitrarily; review the hierarchy periodically to remove contradictions. Managed-policy CLAUDE.md cannot be excluded by individual settings; keep organization-wide rules there when they must always apply.Sparse context reduces accidental edits outside the intended package but does not replace code review—verify diff scope before merge. Do not disable permission prompts to speed up large-repo exploration. When using subagents for exploration, constrain file access to approved directories.Large-repo sessions amplify token usage—use sparse context and compaction hygiene to avoid runaway costs. JetBrains terminals on 2026.1+ use synchronized output; avoid custom ANSI themes that fight IDE rendering. Do not mount entire monorepo secrets into agent sessions; scope working directories per module.
Privacy notesGranting a directory exposes its file contents to the session and the model provider; do not add directories containing secrets or unrelated private code.CLAUDE.md and loaded rules are sent to the model provider every session; keep secrets and sensitive data out of them, and use CLAUDE.local.md (gitignored) for personal notes. @path imports load the referenced files into context at launch; do not import files containing credentials. In large monorepos, other teams' CLAUDE.md may load unexpectedly; use claudeMdExcludes to avoid pulling in unrelated or sensitive context.Large-repo CLAUDE.md files may reference internal service names across business units; scope instructions to teams that should see them. Sparse setups often use multiple CLAUDE.md files; ensure nested files do not leak restricted submodule details to broader teams. Exploration subagents may still read sensitive paths if permissions are too broad—align with least-privilege directory scope.IDE-integrated sessions expose package names, module paths, and dependency graphs in prompts. Usage and session data follow the same data-usage policies as terminal Claude Code. Shared JetBrains licenses on VDI pools can leak session resumes—use per-developer config directories.
Prerequisites
  • Claude Code installed and runnable as `claude`.
  • A working directory you start Claude from; additional directories are granted relative to it.
  • A monorepo or multi-package repository where you use Claude Code.
  • Edit access to root and per-package CLAUDE.md files and .claude/rules/ directories.
  • An understanding of which instructions are repo-wide versus package-specific.
  • A monorepo or large codebase where whole-repo context is impractical.
  • Documented package boundaries, ownership maps, or architecture overviews.
  • Permission to configure multi-directory or scoped working sets in Claude Code.
  • Representative tasks spanning one package—not the entire tree.
  • JetBrains IDE 2025.2+ or 2026.1+ with the Claude Code plugin approved.
  • A large repository with documented sparse-context or monorepo CLAUDE.md hierarchy.
  • Sufficient heap for indexing; pilot on a representative module before org-wide rollout.
  • Team policy for MCP servers and permissions synced to IDE sessions.
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.