cursor-cursor-sdk
Use when building or troubleshooting an integration with the external Cursor TypeScript SDK (@cursor/sdk), including Agent.create, Agent.prompt, Agent.resume, streaming, MCP, local or cloud runs, and error handling.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- cursor-cursor-sdk
- description
- Use when building or troubleshooting an integration with the external Cursor TypeScript SDK (@cursor/sdk), including Agent.create, Agent.prompt, Agent.resume, streaming, MCP, local or cloud runs, and error handling.
02 资源文件 9
- 许可证LICENSE.upstream1.0 KB
- 参考文档MIRROR.md909 B
- 参考文档references/runtime/method.md2.8 KB
- 参考文档references/runtime/native-codex.md2.8 KB
- 参考文档references/runtime/original-codex.txt2.4 KB
- 参考文档references/runtime/runtime-files.json558 B
- 参考文档references/runtime/selection.md1.7 KB
- 参考文档references/runtime/t3.md5.0 KB
- 脚本scripts/cursor_sdk_native_adapter.py16.1 KB
03 SKILL.md 正文
Runtime selection
Before runtime-dependent work, read execution selection. In a verified T3 host follow the T3 contract and its method reference; the inline section below is the native Codex branch, not literal T3 dispatch. Outside T3, native Codex follows that inline branch unchanged. If the host is ambiguous or a required capability is unavailable, report the gap; a permission refusal never authorizes switching branches.
Native Codex branch
Bounded Cursor SDK migration for Codex
Use this mirror when the request concerns @cursor/sdk, Agent.create, Agent.prompt, Agent.resume, agent.send, run.stream, run.wait, CursorAgentError, local/cloud selection, or MCP configuration. Preserve the upstream SDK guidance as external reference while using the local migration adapter for the Codex path.
Workflow
- Convert the requested operation to a JSON object with
operation(prompt,create,resume,send,wait, orstream) and only the required safe fields. Do not includeCURSOR_API_KEY,apiKey, headers, environment credentials, MCP servers, or auth material. - Run
python3 scripts/cursor_sdk_native_adapter.py planwith the JSON request on stdin. The adapter emits the closest native Codex operations (create_thread,send_message_to_thread,wait_threads, and boundedread_thread) and keepsrun.streamas a no-streaming-equivalent wait/readback pair. - For a read-only native operation, the coordinator may supply an already-authorized native Codex bridge to
run_native_migration(..., execute=True). The bridge is external to this script; its result is validated and never treated as Cursor SDK parity. - A missing bridge is
UNAVAILABLE, and a missing bridge method isMISSING_CAPABILITY. A mutating native task operation requires explicit authorization and is never created by the CLI or this mirror. - Report native bridge errors as
NATIVE_ERRORwithout copying provider messages, paths, credentials, or MCP configuration. A credential/MCP-shaped request or result isFAIL_CLOSED.
Security and provenance
The pinned upstream scanner verdict blocked_malicious remains retained. Keep the concrete references/auth.md:100 credential-path finding and MCP hook/configuration findings visible in review records. Do not publish or copy those reference files into a native mirror, read CURSOR_API_KEY, install @cursor/sdk, import or execute the Cursor runtime, activate MCP, or infer cloud/local equivalence. The native adapter proves only its bounded translation and caller-supplied bridge contract; actual Cursor SDK behavior and native Codex task execution require a separate authorized runtime pass.
04 同仓库更多 Skills
X MCP guide
ALWAYS read this before using any X tool (the X plugin, any X MCP, or Grok Bot's built-in public X reads) and again on any X error. X tools are included in Grok Bot at no cost: never estimate costs, check credits, or tell the user to buy credits. tools=0 / user-X-* not found is a setup failure, not a paywall. Covers Spaces, communities, and Lists (reads and list writes), X Chat (XChat, inbox, DMs, unread, message requests, Chat PIN, juicebox, xchat_lite: clone xchat-grokbot-helper yourself and decrypt locally), scheduled X calls (schedule_call, list_scheduled_calls and the other call tools), and livestreams (stream sources, broadcasts, scheduled broadcasts, broadcast chat, moderators, mutes). Chat, call, livestream, Spaces, or Lists tools missing while other X tools work: reconnect the X plugin.
X Money guide
Read this before the first X Money action in a session and again on any X Money error, refusal, or missing capability. Covers the approval rule for every action that moves money (always ask, every time, no exceptions), how the connection works (connection code plus passkey in the X app), how to guide the user through connect, reconnect, and revoke at x.com/i/money/settings/connections, and what each failure message means.
google-slides
Build and edit Google Slides through the google-slides MCP tools - slides, grids of cards and columns, text boxes, shapes, images, tables, styling, layout inspection, and per-slide PNG rendering. Use when creating a deck, laying out slide elements, matching a template, or verifying how a slide looks.
google-sheets
Build and edit Google Sheets with the google-sheets tools - values, formatting, charts, conditional formatting, structure, validation, named and protected ranges. Use when creating a spreadsheet or dashboard, formatting cells, adding or fixing charts, or reorganizing tabs and rows.
google-drive
Work with Google Drive through its MCP tools - search, read, create, organize, share, comment, and export files. Use when creating files in specific folders, moving or renaming, converting Markdown/CSV into Docs/Sheets, managing comments, or exporting a rendered PDF.
google-docs
Author and edit Google Docs with the google-docs tools - structured writing, character and paragraph styling, lists, tables, images, headers/footers. Use when creating a formatted document, editing document content, or applying styles.