Skip to content
←INDEX / 提示詞庫
TUTORIAL/Claude Code / Codex/進階

從 Cursor 搬家到 Claude Code / Codex:遷移盤點 + 起步設定 prompt

讓 agent 自動把你的 Cursor 專案(.cursorrules、.cursor/rules、.cursor/mcp.json)盤點清楚,產出一份逐步遷移計畫,並生成對應的 CLAUDE.md 或 AGENTS.md、slash command、MCP 設定,讓你第一天就不會「比 Cursor 還笨」。

SakuyaPromptCraft 主筆 · 寫於 2026-06-08
AI 教學 / 腳本Claude Code / Codex進階預期輸出說明≈ 703 tokens · 實際用量依工具與輸入而異
Last reviewed2026-06-08Read~11 MIN

01PROMPT

You are helping me migrate this repository from Cursor to {{TARGET_TOOL}} (either Claude Code or OpenAI Codex CLI). Do NOT make any code changes — this is a configuration migration only. Work in two phases and stop after Phase 1 for my approval.

## Phase 1 — Inventory (read-only)
Scan the repo for existing Cursor configuration and report what you find. Look specifically for:
- `.cursorrules` (single-file rules)
- `.cursor/rules/*` (rule files / project rules)
- `.cursor/mcp.json` (MCP server definitions)
- Any `.cursorignore` file
- Project conventions implied by the code that AREN'T written down anywhere (e.g. test command, lint/typecheck command, package manager, framework, directory structure, naming conventions)

Produce an inventory table: `Source file | What it configures | Where it maps to in {{TARGET_TOOL}} | Notes`.

Mapping rules to apply:
- `.cursorrules` and `.cursor/rules/*` → persistent project memory: `CLAUDE.md` for Claude Code, `AGENTS.md` for Codex (at repo root).
- Reusable command-shaped rules ("always do X when I ask for Y") → custom slash commands under `.claude/commands/<name>.md` (Claude Code) — Codex has no equivalent slash-command file, so fold these into AGENTS.md sections instead.
- `.cursor/mcp.json` servers → MCP config: for Claude Code suggest the `claude mcp add` commands; for Codex put them under `[mcp_servers]` in `~/.codex/config.toml`.
- `.cursorignore` → note that the agent already respects `.gitignore`; flag anything extra that needs documenting.

List anything in the Cursor setup that does NOT cleanly map (Cursor-editor-specific features) and say so honestly instead of inventing an equivalent.

## Phase 2 — Generate the new config (after I approve)
For {{TARGET_TOOL}}, write the actual files:
1. A complete `{{MEMORY_FILE}}` (CLAUDE.md or AGENTS.md) with these sections: **Project overview** (1 short paragraph), **Tech stack**, **Commands** (exact build / test / lint / typecheck commands you discovered or that I provide: {{KEY_COMMANDS}}), **Code style & conventions**, **Architecture / directory map**, **Do / Don't** (gotchas). Convert any Cursor-specific phrasing into tool-neutral instructions. Keep it tight — bullet points over prose.
2. If Claude Code: draft `.claude/commands/` files for each reusable workflow you found, with frontmatter `description`.
3. The MCP migration commands or config block.

Then give me a short "day-one workflow note" explaining the mindset shift: in Cursor I approve each edit inline; in {{TARGET_TOOL}} I should let a batch of edits run and review the resulting `git diff` at the end, and use plan mode / read-only exploration first on anything non-trivial.

Do not fabricate features. If you are unsure whether {{TARGET_TOOL}} supports something, say "unsure — verify in docs" rather than guessing.

把方括號 [ ] 內的變數換成你的內容,丟進 Claude Code / Codex。

◆ 直接開到工具Claude(記得貼)
RUN站內試跑 / TRY IT
▶ 站內試跑

不用離開網站,直接看這組 prompt 跑出來長怎樣(AI 即時生成,扣 1 點)。

SKILL安裝成 SKILL / INSTALL
安裝成 SKILLClaude Code Agent Skill

不只複製貼上 — 下載後放到 ~/.claude/skills/cursor-to-claude-code-codex-migration-kickoff/SKILL.md,之後每個 session 自動可用(觸發時自動載入)。

macOS / Linux
mkdir -p ~/.claude/skills/cursor-to-claude-code-codex-migration-kickoff && mv ~/Downloads/SKILL.md ~/.claude/skills/cursor-to-claude-code-codex-migration-kickoff/SKILL.md
Windows PowerShell
New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\skills\cursor-to-claude-code-codex-migration-kickoff" | Out-Null; Move-Item "$env:USERPROFILE\Downloads\SKILL.md" "$env:USERPROFILE\.claude\skills\cursor-to-claude-code-codex-migration-kickoff\SKILL.md"

02CONTEXT / 使用情境

適用情境:團隊或個人從 Cursor 轉到 Claude Code 或 Codex 的第一天。為什麼有效:① 強制 agent 先做唯讀盤點再動手,避免它一上來就亂改;② 把『.cursorrules → CLAUDE.md/AGENTS.md』『.cursor/rules → slash command』『.cursor/mcp.json → claude mcp add / config.toml』這些真實對應關係寫死進指令,agent 不用自己亂猜;③ 明確要求『不確定就說不確定』,避免它幻想不存在的功能。技巧:先只跑 Phase 1 看盤點對不對,再放它生成檔案。所有提到的功能(CLAUDE.md、AGENTS.md、slash commands、MCP、plan mode)都是 2026 年兩個工具實際存在的能力。

03SAMPLE / 期待成果

## Phase 1 — Inventory | Source | Configures | Maps to (Claude Code) | Notes | |---|---|---|---| | .cursorrules | 全域風格 + 架構規則 | CLAUDE.md 根目錄 | 含 3 條 Cursor 專屬措辭,已標記需改寫 | | .cursor/rules/testing.md | 「改完一定跑 vitest」 | CLAUDE.md『Commands』+ DoD | 命令型,併入 memory | | .cursor/mcp.json (postgres, github) | 2 個 MCP server | `claude mcp add` × 2 | token 走 env,勿寫死 | | (未寫下) pnpm + Next.js 15 | 推斷自 lockfile | CLAUDE.md『Tech stack』 | 確認用 pnpm 不是 npm | Unmapped: Cursor 的 inline Tab 補全 = 編輯器功能,Claude Code 無對應(屬正常)。 → 確認無誤後我再生成 CLAUDE.md / commands / MCP 指令。

這是預期成果的文字說明。請查看本文實測說明,並以自己的輸入素材小規模試用。

04VARIABLES / 變數說明

01[TARGET_TOOL]

要遷移到的目標工具,填「Claude Code」或「OpenAI Codex CLI」其中一個

02[MEMORY_FILE]

目標工具的記憶檔名:Claude Code 填 CLAUDE.md、Codex 填 AGENTS.md

03[KEY_COMMANDS]

你專案的關鍵指令(build / test / lint / typecheck),若不確定可留空讓 agent 從程式碼推斷

05RESOLVER · 變數代入器0 / 3

填下面的欄位,上方 prompt 會即時替換 [方括號] 內容。填好後按「複製組好的 prompt」直接丟進工具。

修飾
Assembled · 填剩餘變數…
You are helping me migrate this repository from Cursor to {{TARGET_TOOL}} (either Claude Code or OpenAI Codex CLI). Do NOT make any code changes — this is a configuration migration only. Work in two phases and stop after Phase 1 for my approval.

## Phase 1 — Inventory (read-only)
Scan the repo for existing Cursor configuration and report what you find. Look specifically for:
- `.cursorrules` (single-file rules)
- `.cursor/rules/*` (rule files / project rules)
- `.cursor/mcp.json` (MCP server definitions)
- Any `.cursorignore` file
- Project conventions implied by the code that AREN'T written down anywhere (e.g. test command, lint/typecheck command, package manager, framework, directory structure, naming conventions)

Produce an inventory table: `Source file | What it configures | Where it maps to in {{TARGET_TOOL}} | Notes`.

Mapping rules to apply:
- `.cursorrules` and `.cursor/rules/*` → persistent project memory: `CLAUDE.md` for Claude Code, `AGENTS.md` for Codex (at repo root).
- Reusable command-shaped rules ("always do X when I ask for Y") → custom slash commands under `.claude/commands/<name>.md` (Claude Code) — Codex has no equivalent slash-command file, so fold these into AGENTS.md sections instead.
- `.cursor/mcp.json` servers → MCP config: for Claude Code suggest the `claude mcp add` commands; for Codex put them under `[mcp_servers]` in `~/.codex/config.toml`.
- `.cursorignore` → note that the agent already respects `.gitignore`; flag anything extra that needs documenting.

List anything in the Cursor setup that does NOT cleanly map (Cursor-editor-specific features) and say so honestly instead of inventing an equivalent.

## Phase 2 — Generate the new config (after I approve)
For {{TARGET_TOOL}}, write the actual files:
1. A complete `{{MEMORY_FILE}}` (CLAUDE.md or AGENTS.md) with these sections: **Project overview** (1 short paragraph), **Tech stack**, **Commands** (exact build / test / lint / typecheck commands you discovered or that I provide: {{KEY_COMMANDS}}), **Code style & conventions**, **Architecture / directory map**, **Do / Don't** (gotchas). Convert any Cursor-specific phrasing into tool-neutral instructions. Keep it tight — bullet points over prose.
2. If Claude Code: draft `.claude/commands/` files for each reusable workflow you found, with frontmatter `description`.
3. The MCP migration commands or config block.

Then give me a short "day-one workflow note" explaining the mindset shift: in Cursor I approve each edit inline; in {{TARGET_TOOL}} I should let a batch of edits run and review the resulting `git diff` at the end, and use plan mode / read-only exploration first on anything non-trivial.

Do not fabricate features. If you are unsure whether {{TARGET_TOOL}} supports something, say "unsure — verify in docs" rather than guessing.
FAQ · 常見問題

「從 Cursor 搬家到 Claude Code / Codex:遷移盤點 + 起步設定 prompt」這組提示詞要怎麼用?

這組 prompt 專為 Claude Code / Codex 設計。把 prompt 內 3 個方括號 [變數] 換成你自己的內容,貼進 Claude Code / Codex 執行即可。難度中等,照變數說明填好後即可上手。

「從 Cursor 搬家到 Claude Code / Codex:遷移盤點 + 起步設定 prompt」是免費的嗎?

完整 prompt 免費開放閱讀,不用註冊;可保存瀏覽器收藏,登入後可一鍵複製與留言。

用 Claude Code / Codex 依這組 prompt 生成的成果可以商用嗎?

prompt 文字本身你可自由使用與修改。但 AI 生成物(圖/音樂/影片/文字)的商用授權,取決於你在 Claude Code / Codex 使用的方案與其官方服務條款,請以該工具的授權規範為準。

RELATED你可能也需要

PRO01
TUTORIALSuno v5.5FEATURED
r/SunoAI (anonymous studio engineer)2026-06-12

Suno 工程師思維:4 步驟做出不像 AI 的歌

5.0(1)

Studio engineer 視角拆解 Suno 致命弱點(油炸 vocals、高頻 artifact)+ 4 步驟 DAW workflow + Suno Studio 修音 prompt

高階
Read

免費02
TUTORIALClaude 4.5 SonnetFEATURED
r/ClaudeAI2026-05-14

5 個 6 月 stuck 下來的 Claude 每週 workflow

提案產生器 / 會議處理器 / 內容再利用 / 週五回顧 / 收工 reset — 試了 40 個只有這 5 個沒被丟掉、各省 30+ 分鐘 / 次。

進階
Read

PRO03
TUTORIALClaude 4.5 SonnetFEATURED
r/PromptEngineering2026-05-14

7 個跨 model A/B 測過的 prompt 技巧(不是 vibes)

六個月在 Claude / GPT-4 / Gemini 上用人工 rater A/B 測 200+ prompt 後寫的。包含 persona+constraint stacking / anti-example / role reversal QA / cognitive scaffold / emotional priming / uncertainty CoT / steelman first。

高階
Read

免費04
TUTORIALChatGPTFEATURED
r/ChatGPTPromptGenius2026-05-14

5 個信任檢查單行 prompt(沒有 role-play)

一年的 role-play system prompt + 14-step framework 後總結:真正改變品質的是 5 個單行 prompt。沒有 role、沒有 markdown、沒有「you are an expert」。

入門
Read

免費 · 全文開放閱讀

完整 prompt 已經開放.

免登入閱讀全文、保存瀏覽器收藏;登入後可一鍵複製與留言討論。不用信用卡。

不想註冊?

留個 email,下次有新 prompt 會寄一封簡短摘要給你。退訂一鍵、不轉賣。

每週一期,新上架提示詞 + 模型測試心得。每封信底部都有一鍵取消訂閱。

或訂 RSS feed(30 秒一次的人味選擇)

COMMENTS · 討論區0 則
登入 後可留言。還沒帳號?註冊
目前沒有留言。第一個說說你的經驗。
EMBED · 嵌入 blog / Note一行 iframe HTML、貼進文章即顯示此 prompt 卡片+

適合:部落格、Medium、Notion 公開頁、Substack — 任何支援 iframe / HTML 嵌入的地方。對方點「看完整」會回到本站、是 prompt 庫的免費 backlink。

<iframe src="https://prompt.luvai.net/embed/cursor-to-claude-code-codex-migration-kickoff" width="100%" height="380" frameborder="0" style="border:1px solid #e0dcd0;border-radius:4px;" loading="lazy" title="PromptCraft Embed"></iframe>
預覽 embed →380px tall · responsive width
發現這個 prompt 過時 / 跑不動 / 有錯字? 回報給我們 →