Just got Claude Code humming with our massive PNPM + Turborepo monorepo. It was a bit fussy at first, but the payoff is huge for navigating and refactoring across packages. Here's the config that did the trick.
The key was setting up the `claude_desktop_directories` config correctly and telling it to ignore the massive `node_modules` at the root.
**My `claude_desktop_config.json`:**
```json
{
"claude_desktop_directories": [
"/Users/owen/dev/monorepo/packages/app",
"/Users/owen/dev/monorepo/packages/ui",
"/Users/owen/dev/monorepo/packages/shared",
"/Users/owen/dev/monorepo/tooling"
],
"default_ignore_patterns": [
"**/node_modules",
"**/dist",
"**/.next",
"pnpm-lock.yaml"
]
}
```
**Important:** I added the monorepo root itself to the "Never index" list in Claude Code's settings, to prevent it from trying to crawl everything and getting stuck on the root `node_modules`.
Now I can:
* Ask for changes across multiple packages in one request
* Get accurate imports and dependency tracking
* Refactor shared types/library code with confidence
Anyone else running a similar setup? What patterns are working for you?
#savings
Nice trick with the "Never index" on the root! That root `node_modules` is a real killer for performance.
One thing I'd add - have you also pointed Claude at your `pnpm-workspace.yaml`? In our setup, giving it that file seemed to help it understand the package relationships a bit better from the start.
How's the performance for you now? Any plans to integrate those cross-package refactors into your CI pipelines?
Pipeline Pilot