技能 cursor
🖥️
cursor
安全 🌐
網路存取⚙️
外部命令📁
檔案系統存取
從終端機控制 Cursor 編輯器
在終端機和圖形介面之間切換開啟檔案會降低您的開發效率。此技能提供所有 Cursor CLI 命令,讓您直接從命令列開啟檔案、比較程式碼和管理擴充功能。
支援: Claude Codex Code(CC)
1
下載技能 ZIP
2
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
3
開啟並開始使用
測試它
正在使用「cursor」。 如何在 Cursor 中開啟特定行的檔案?
預期結果:
- 使用 cursor /path/to/file.ts:42 在第 42 行開啟
- 使用 cursor /path/to/file.ts:42:10 加入欄位置
- 檔案會在該位置開啟並定位游標
正在使用「cursor」。 如何將 Cursor 用作我的 git 編輯器?
預期結果:
- 執行:git config --global core.editor 'cursor --wait'
- --wait 旗標確保 git 等待您關閉檔案
- 提交訊息現在會在 Cursor 中開啟
正在使用「cursor」。 列出我所有的 Cursor 擴充功能
預期結果:
- 執行:cursor --list-extensions
- 顯示所有已安裝的擴充功能 ID
- 將這些 ID 與 --install-extension 或 --uninstall-extension 一起使用
安全審計
安全v5 • 1/17/2026
This is a pure documentation skill containing only markdown reference material for Cursor CLI commands. All 77 static findings are false positives. The 'backtick execution' detections are markdown code fences, not shell execution. The SSH reference is documentation only. No executable code, no network calls, no actual filesystem operations.
2
已掃描檔案
366
分析行數
3
發現項
5
審計總數
風險因素
🌐 網路存取 (1)
⚙️ 外部命令 (62)
SKILL.md:8 SKILL.md:12-14 SKILL.md:14-19 SKILL.md:19-21 SKILL.md:21-24 SKILL.md:24-26 SKILL.md:26-29 SKILL.md:29-31 SKILL.md:31-34 SKILL.md:34-36 SKILL.md:36-39 SKILL.md:39-41 SKILL.md:41-44 SKILL.md:44-46 SKILL.md:46-51 SKILL.md:51-53 SKILL.md:53-56 SKILL.md:56-58 SKILL.md:58-61 SKILL.md:61-63 SKILL.md:63-66 SKILL.md:66-68 SKILL.md:68-73 SKILL.md:73-75 SKILL.md:75-78 SKILL.md:78-80 SKILL.md:80-85 SKILL.md:85-87 SKILL.md:87-90 SKILL.md:90-92 SKILL.md:92-95 SKILL.md:95-97 SKILL.md:97-102 SKILL.md:102-104 SKILL.md:104-109 SKILL.md:109-111 SKILL.md:111-114 SKILL.md:114-116 SKILL.md:116-119 SKILL.md:119-121 SKILL.md:121-124 SKILL.md:124-126 SKILL.md:126-131 SKILL.md:131-133 SKILL.md:133-136 SKILL.md:136-138 SKILL.md:138-141 SKILL.md:141-143 SKILL.md:143-146 SKILL.md:146-148 SKILL.md:148-153 SKILL.md:153-155 SKILL.md:155-158 SKILL.md:158-160 SKILL.md:160-165 SKILL.md:165-167 SKILL.md:167-170 SKILL.md:170-172 SKILL.md:172-177 SKILL.md:177-179 SKILL.md:179-184 SKILL.md:184-186
📁 檔案系統存取 (2)
審計者: claude 查看審計歷史 →
品質評分
38
架構
100
可維護性
85
內容
21
社群
100
安全
83
規範符合性
你能建構什麼
無需離開終端機即可開啟專案
直接從 shell 在特定檔案或資料夾上啟動 Cursor,無需使用滑鼠或圖形介面
設定 git 編輯器整合
將 Cursor 設定為您的 git 提交訊息編輯器,以獲得更好的撰寫體驗
標準化擴充功能安裝
建立腳本以使用 CLI 命令在團隊成員之間安裝所需的擴充功能
試試這些提示
開啟當前目錄
如何從終端機在 Cursor 中開啟當前目錄?
跳轉至特定行
在 Cursor 編輯器中開啟 src/app.ts 的第 142 行
比較兩個檔案
告訴我如何使用 Cursor 差異模式比較 old.js 和 new.js
批次安裝擴充功能
透過 CLI 在 Cursor 中安裝多個擴充功能的命令是什麼?
最佳實務
- 從腳本呼叫 Cursor 時使用 --wait 旗標,以確保在繼續之前儲存檔案
- 使用 'git config --global core.editor cursor --wait' 將 Cursor 設定為 git 編輯器
- 使用 --user-data-dir 進行可攜式設定或管理多個 Cursor 設定檔
避免
- 在未先驗證路徑是否存在的情況下開啟檔案可能導致靜默失敗
- 僅使用一個檔案路徑使用差異模式會導致錯誤
- 在自動化腳本中忘記 --wait 會在需要儲存檔案時導致競態條件
常見問題
此技能是否適用於所有作業系統?
Cursor 可在 Windows、macOS 和 Linux 上使用。CLI 路徑可能因作業系統而異。
如果找不到 cursor 命令怎麼辦?
請確保已安裝 Cursor 且 CLI 已加入系統 PATH。您可能需要重新安裝 Cursor。
我可以在 VS Code 而不是 Cursor 中使用這個嗎?
Cursor 是 VS Code 的分支。對於 VS Code,請使用 'code' 而不是 'cursor',因為命令類似。
如何一次安裝多個擴充功能?
對每個擴充功能 ID 執行 cursor --install-extension,或建立 shell 腳本來循環處理清單。
使用這些命令時我的程式碼會被傳送到任何地方嗎?
此技能僅提供文件說明。Cursor 編輯器根據其自身的隱私設定處理資料。
我可以自訂鍵盤快捷鍵嗎?
在 macOS 上,按鍵綁定儲存在 ~/Library/Application Support/Cursor/User/keybindings.json 中。