spencerpauly/awesome-cursor-skills

switching-projects

Switch the current Cursor workspace to a different project directory using the cursor-app-control MCP.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill switching-projects

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Switch Project

Use this skill when the user wants to switch to a different project, open another codebase, or move the current conversation to a different workspace root.

How It Works

Cursor has a built-in MCP server called cursor-app-control with a tool called move_agent_to_root that changes the agent's active workspace directory. This lets you switch projects mid-conversation without opening a new window.

Steps

  1. Ask or infer the target project — if the user says "switch to my-app", search for it. Common project locations:
  • ~/Documents/development/
  • ~/projects/
  • ~/code/
  • ~/repos/

List directories in the likely parent folder to find the project:

bash
   ls ~/Documents/development/

If ambiguous, ask the user which project they mean.

  1. Switch the workspace — call the cursor-app-control MCP tool:
   Tool: move_agent_to_root
   Arguments: { "rootPath": "/Users/<username>/Documents/development/<project-name>" }

This updates the visible workspace, file tree, and default working directory for all subsequent commands.

  1. Orient in the new project — after switching, briefly describe what you see:
  • Read the project's package.json, README.md, or equivalent to understand the stack.
  • Run git status to show the current branch and state.
  • List the top-level directory structure.

Creating a New Project

If the user wants to start a new project and switch to it:

  1. Call create_project with the desired path — this creates the directory and initializes a git repo.
  2. Call move_agent_to_root to switch into it.
  3. Begin scaffolding.

Notes

  • This only works if the cursor-app-control MCP server is enabled.
  • The switch happens in the current conversation — no new window is opened.
  • All file paths in subsequent tool calls will resolve relative to the new root.
  • You can switch back to the original project the same way.

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills