What problem does it solve? Developers integrating Cursor agents into scripts, CI pipelines, or backend services often hit silent runtime misconfiguration, leaked resources, and conflated error types. This Skill provides the decision framework, invocation patterns, and failure-mode prevention needed to build a working Cursor SDK integration correctly the first time. ## Core Features & Use Cases - Three Invocation Patterns: Covers one-shot Agent.prompt, durable Agent.create with streaming follow-ups, and Agent.resume for continuing agents across process boundaries, in both TypeScript (@cursor/sdk) and Python (cursor-sdk). - Trap Prevention: Documents the five most common integration failures, including silent local-runtime fallback, conflating startup errors with run failures, resource leaks from missing disposal, and unsupported run operations. - Production Guidance: Covers auth via CURSOR_API_KEY, model selection with Cursor.models.list(), MCP server configuration, local vs cloud runtime tradeoffs, and exit-code conventions for CI. - Use Case: A team wants a GitHub Action that asks a Cursor agent to review each pull request. This Skill walks them through choosing the cloud runtime, wiring Agent.prompt with an explicit API key, and setting exit codes based on run status. ## Quick Start Ask the assistant to write a TypeScript script that uses the Cursor SDK to send a one-shot prompt to a cloud agent and print the result.