Work with multiple repositories in Cursor: multi-root workspaces, monorepo patterns, selective indexing, and cross-project context.

MITAuto-check passedDevelopment

Install Cursor Multi Repo

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-multi-repo -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace cursor-multi-repo --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/cursor-multi-repo .claude/skills/cursor-multi-repo && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cursor-multi-repo
GitHub stars
2.8k
Token cost
~2k tokens
SKILL.md length
545 words
Files
6 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Work with multiple repositories in Cursor: multi-root workspaces, monorepo patterns, selective indexing, and cross-project context.

  • Works in 3 steps: Start with one repository, add another… → Use repository-specific rules/ignore… → Keep changes separated by repository and…
  • Cursor multi repo
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 10 more sections
  • Calls cursor

What it does

Cursor Multi Repo is an agent skill from jeremylongshore/tons-of-skills-marketplace. Work with multiple repositories in Cursor: multi-root workspaces, monorepo patterns, selective indexing, and cross-project context. Triggers on "cursor multi repo", "cursor multiple projects", "cursor monorepo", "cursor workspace", "multi-root workspace".

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/errors.md`, `references/examples.md` and `references/indexing-strategy.md`). Compatibility notes: Designed for Claude Code

It sits in Development, covering Monorepo tooling. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Cursor multi repo
  • Cursor multiple projects
  • Cursor monorepo
  • Cursor workspace

Example prompts

  • “cursor multi repo”
  • “cursor multiple projects”
  • “cursor monorepo”
  • “/cursor-multi-repo”

Requirements

  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(cmd:*)

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Start with one repository, add another root only for a defined cross-repository task, and remove it afterward.
  2. Use repository-specific rules/ignore files and verify indexing scope before asking a cross-repo question.
  3. Keep changes separated by repository and use each repository's normal review and test process.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(cmd:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cursor

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.cursor.com
    • code.visualstudio.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Cursor Multi Repo loads about 2k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 68 tokens; SKILL.md has 545 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 545 words, ~1,994 tokens.

Download SKILL.mdSave it as .claude/skills/cursor-multi-repo/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
cursor-multi-repo
description
Work with multiple repositories in Cursor: multi-root workspaces, monorepo patterns, selective indexing, and cross-project context. Triggers on "cursor multi repo", "cursor multiple projects", "cursor monorepo", "cursor workspace", "multi-root workspace".
allowed-tools
Read, Write, Edit, Bash(cmd:*)
compatibility
Designed for Claude Code
version
1.19.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, cursor, cursor-multi

Cursor Multi-Repo

Overview

Configure multi-root workspaces so Cursor sees only repositories and files needed for the task, preserving repository ownership and context boundaries.

Prerequisites

  • Explicit authorization for each repository and a data-classification review for shared roots.
  • Reviewed rules and ignore files in each root; only necessary filesystem permissions.

Instructions

  1. Start with one repository, add another root only for a defined cross-repository task, and remove it afterward.
  2. Use repository-specific rules/ignore files and verify indexing scope before asking a cross-repo question.
  3. Keep changes separated by repository and use each repository's normal review and test process.

Output

  • A deliberately scoped multi-root workspace with documented context and ownership boundaries.

Error Handling

ConditionSafe response
Unrelated repository appears in contextRemove the root, start a new chat, and verify indexing scope.
Rules conflict across rootsApply the most restrictive relevant rule and resolve the conflict through repository owners.
Memory/indexing becomes slowClose inactive roots rather than disabling ignore or security controls.

Examples

To change an API contract and its client, open only those two repositories, attach the contract file explicitly, and create separate reviewed commits. Close the client root when the cross-repo validation is complete.

Work with multiple repositories and monorepo structures in Cursor. Covers multi-root workspaces, selective indexing, cross-project context, and rule inheritance patterns.

Multi-Root Workspaces

Open multiple project roots in a single Cursor window:

Creating a Workspace
  1. Open first project: File > Open Folder > select project A
  2. Add second project: File > Add Folder to Workspace... > select project B
  3. Save workspace: File > Save Workspace As... > mywork.code-workspace
Workspace File Structure
json
// mywork.code-workspace
{
  "folders": [
    { "path": "/home/dev/api-service" },
    { "path": "/home/dev/web-frontend" },
    { "path": "/home/dev/shared-lib" }
  ],
  "settings": {
    "editor.tabSize": 2,
    "files.exclude": {
      "**/node_modules": true,
      "**/dist": true
    }
  }
}

Open workspace: cursor mywork.code-workspace or double-click the file.

How Indexing Works with Multi-Root
  • Each folder root is indexed independently
  • @Codebase searches across all open roots
  • @Files paths include the root name: @api-service/src/routes/users.ts
  • Closing a folder removes it from the index

Monorepo Patterns

Opening Full Monorepo
bash
cursor /path/to/monorepo

Pros: @Codebase searches everything, cross-package references work naturally Cons: Slow indexing on large monorepos, lots of irrelevant search results

Show full SKILL.md (221 more words)Show less
bash
# Open just the package you're working on
cursor /path/to/monorepo/packages/api

Pros: Fast indexing, focused search results Cons: No automatic cross-package context

Hybrid: Focused + Selective .cursorignore
bash
# Open the monorepo root but exclude what you don't need
cursor /path/to/monorepo
gitignore
# .cursorignore at monorepo root
# Only index packages you're actively working on

# Exclude everything in packages/
packages/*/

# Except the ones you want indexed:
!packages/api/
!packages/shared/

# Always exclude
node_modules/
dist/
build/
.turbo/

This indexes only packages/api/ and packages/shared/, keeping search focused.

Cross-Project Context

Referencing Files Across Roots

In a multi-root workspace, use the root folder name as prefix:

@api-service/src/types/user.ts @web-frontend/src/hooks/useAuth.ts

The User type in the API doesn't match the frontend hook.
Show me the differences and suggest how to share the type.
Sharing Types Between Projects

Use project rules to guide cross-project imports:

yaml
# .cursor/rules/monorepo-imports.mdc (in monorepo root)
---
description: "Monorepo import conventions"
globs: ""
alwaysApply: true
---
# Import Rules
- Shared types: import from @myorg/shared (never relative paths across packages)
- Shared UI: import from @myorg/ui
- Never import directly from another app package (apps/api → apps/web is forbidden)
- Each package declares its own dependencies in package.json

Rules Inheritance

Monorepo: Root + Package Rules
monorepo/
├── .cursor/rules/
│   ├── global.mdc              # alwaysApply: true (applies everywhere)
│   └── security.mdc            # alwaysApply: true
├── packages/
│   ├── api/
│   │   └── .cursor/rules/
│   │       └── api-patterns.mdc  # Scoped to api/ files
│   ├── web/
│   │   └── .cursor/rules/
│   │       └── react-patterns.mdc  # Scoped to web/ files
│   └── shared/

Behavior:

  • Root rules apply to all files in the monorepo
  • Package-level rules apply only when editing files in that package
  • If both match, both are included in context
Multi-Root: Independent Rules

In a multi-root workspace, each root has its own .cursor/rules/:

# Workspace contains:
api-service/
  .cursor/rules/express-patterns.mdc    # Only applies to api-service files

web-frontend/
  .cursor/rules/react-patterns.mdc      # Only applies to web-frontend files

Rules do NOT cross workspace roots. Each project's rules are independent.

Selective Indexing Strategies

Strategy 1: Single Package Focus
bash
cursor packages/api/
# Only indexes packages/api/
# Fast, focused, no cross-package noise
gitignore
# .cursorignore at monorepo root
packages/*/
!packages/api/
!packages/shared/
!packages/config/
Strategy 3: Full Monorepo with Heavy Exclusions
gitignore
# .cursorignore
node_modules/
dist/
build/
.turbo/
.next/
coverage/
*.lock
*.min.js
**/*.test.ts       # Optional: exclude tests from indexing
**/fixtures/       # Test fixtures
**/migrations/     # Database migrations (reference via @Files)

Performance Optimization

Memory Management

Each open workspace root consumes memory for indexing. Minimize open roots:

# Instead of opening 5 repos:
cursor repo1/ repo2/ repo3/ repo4/ repo5/   # Heavy

# Open only what you need:
cursor repo1/                                # Light
# Add repo2/ only when needed via File > Add Folder
Large Monorepo Tips
1. Use .cursorignore aggressively
2. Open specific packages, not the root
3. Close workspace folders you're not actively editing
4. Start new chats when switching between packages
5. Use @Files for cross-package references instead of @Codebase

Enterprise Considerations

  • Repository access: Multi-root workspaces respect filesystem permissions. Cursor cannot index repos the user cannot read.
  • Indexing scope: Only open workspace folders are indexed. Opening a shared drive or network mount may be slow.
  • Rule governance: In monorepos, root-level rules serve as team-wide governance. Package-level rules add specificity.
  • CI alignment: .cursor/rules/ should be reviewed in PRs like any other configuration change.

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/.curated/cursor-multi-repo of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/errors.md
  • references/examples.md
  • references/indexing-strategy.md
  • references/monorepo-patterns.md
  • references/multi-root-workspace.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Cursor Multi Repo next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cursor Multi Repo compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cursor Multi Repo this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2kAutomated safety check: PassMIT
Nx Importnrwl/nx29k6 repos~3.5kAutomated safety check: PassMIT
Nx Workspacenomcopter/react-mosaic4.8k8 repos~1.9kAutomated safety check: PassCustom licence
Electron Multi-Process ArchitectureiOfficeAI/AionUi33k1 repos~1.8kAutomated safety check: PassApache-2.0
Nx Run Tasksnomcopter/react-mosaic4.8k8 repos~613Automated safety check: PassCustom licence
Astro Developerwithastro/astro63k1 repos~1.5kAutomated safety check: PassCustom licence

Similar skills

  • Nx Import

    nrwl/nx

    Import, merge, or combine repositories into an Nx workspace using nx import.

    29k GitHub starsUsed in 6 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Nx Workspace

    nomcopter/react-mosaic

    Explore and understand Nx workspaces. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 8 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Tells the agent where new code belongs in an Electron multi-process project and which APIs each process may use, with rules for new bridges, services, agents and workers.

    33k GitHub starsUsed in 1 repo~1.8k tokens
    DevelopmentAuto-check passed
  • Nx Run Tasks

    nomcopter/react-mosaic

    Helps with running tasks in an Nx workspace. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 8 repos~613 tokens
    DevelopmentAuto-check passed
  • Astro Developer

    withastro/astro

    Official

    Comprehensive guide for developing in the Astro monorepo. An agent skill from withastro/astro.

    63k GitHub starsUsed in 1 repo~1.5k tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about Cursor Multi Repo

What does Cursor Multi Repo do?

Work with multiple repositories in Cursor: multi-root workspaces, monorepo patterns, selective indexing, and cross-project context. Cursor Multi Repo is an agent skill from jeremylongshore/tons-of-skills-marketplace. Work with multiple repositories in Cursor: multi-root workspaces, monorepo patterns, selective indexing, and cross-project context.

When should I use Cursor Multi Repo?

Cursor Multi Repo fits situations like: Cursor multi repo; Cursor multiple projects; Cursor monorepo; Cursor workspace.

How do I install Cursor Multi Repo in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-multi-repo -a claude-code`. Or copy the skill folder (skills/.curated/cursor-multi-repo in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/cursor-multi-repo in your project. Claude Code loads it when a task matches its description.

How do I install Cursor Multi Repo in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-multi-repo -a codex`. Or copy the skill folder (skills/.curated/cursor-multi-repo in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/cursor-multi-repo in your project. Codex loads it when a task matches its description.

Can I use Cursor Multi Repo in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-multi-repo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cursor-multi-repo, .gemini/skills/cursor-multi-repo, .github/skills/cursor-multi-repo and .opencode/skills/cursor-multi-repo in your project.

What does Cursor Multi Repo need to run?

Going by SKILL.md and its folder, Cursor Multi Repo needs the command-line tools its instructions call (cursor). Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(cmd:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Cursor Multi Repo access the network?

SKILL.md names 2 domains. As links in the text: docs.cursor.com and code.visualstudio.com. This is read from the text; nothing was executed.

Is Cursor Multi Repo safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cursor Multi Repo use?

Cursor Multi Repo is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cursor Multi Repo use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Cursor Multi Repo?

Skills that share tags, products or a category with Cursor Multi Repo: Nx Import (nrwl/nx, 29k stars), Nx Workspace (nomcopter/react-mosaic, 4.8k stars), Electron Multi-Process Architecture (iOfficeAI/AionUi, 33k stars) and Nx Run Tasks (nomcopter/react-mosaic, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cursor Multi Repo?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.