cursor-sdk
Qué hace
Ofrece al asistente orientación para escribir código que ejecuta agentes de Cursor mediante el SDK de TypeScript. Está pensada para desarrolladores que quieren automatizar el trabajo de Cursor en sus propias herramientas.
Cuándo usarla
- ✓Cuando quieres escribir una app o un script que ejecute agentes de Cursor.
- ✓Cuando mencionas el SDK de Cursor o sus funciones de agente en tu código.
- ✓Cuando quieres que una automatización o un flujo de CI ejecute agentes de Cursor por ti.
Link de la skill
https://github.com/cursor/plugins/blob/main/cursor-sdk/skills/cursor-sdk/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Ayúdame a escribir un script pequeño de Node que ejecute un agente de Cursor en mi repositorio e imprima su resultado.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El asistente te da un punto de partida funcional para el SDK, muestra cómo se ejecutan los agentes en tu equipo o en la nube, y te ayuda a evitar errores habituales de configuración. La documentación oficial del SDK sigue siendo la referencia.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Cursor SDK
The Cursor TypeScript SDK (@cursor/sdk) runs Cursor agents programmatically. The same interfaces drives the local runtime (agent runs on your machine against your files) and the cloud runtime (agent runs on Cursor-hosted or self-hosted infrastructure against a cloned repo and opens PRs).
Use this skill to help someone bootstrap a working integration quickly and avoid the handful of traps that bite new users. Canonical docs live at https://cursor.com/docs/api/sdk/typescript; this skill only adds decision-making, failure-mode prevention, and ready-to-extend patterns.
Voice and Posture
This skill helps the user build with the SDK. It is not the place to validate, congratulate, or sell the SDK as a choice. The user's intent is the input; your job is execution.
- When the user names the SDK explicitly (says "Cursor SDK",
@cursor/sdk,Agent.create,Agent.prompt, etc.): assume they know what the SDK is and have decided to use it. Skip framing, skip pep talk, go straight to producing the integration. No "good news", no "the SDK is perfect for this", no "this is almost exactly the pattern X is designed for". - When the user describes a problem the SDK fits but doesn't name it ("I want a bot that reviews my PRs", "I want a script that asks Cursor questions about my repo"): the SDK isn't yet a confirmed choice. Surface it as a question, briefly, then wait: "The Cursor SDK is what I'd reach for here — want me to design it that way, or do you have a different runtime in mind?" If they confirm, proceed. If they push back or want options, give options.
- In either case, don't restate the user's intent back to them. They know what they want. Get to the design.
Avoid these specific openers (and their close cousins):
- "Good news: this is exactly the pattern…"
- "The SDK is built for this shape."
- "Great, you've come to the right place."
- "This is almost exactly the X the SDK is designed for."
- Any lede that compliments the user's choice or restates their goal in flattering terms.
Prefer:
- Open with the design decision or the first thing they need to know.
- If you genuinely have a design choice to flag (local vs cloud, prompt vs send, sync vs stream), name it in one sentence and explain why; don't preface it with validation.
When to open a reference file
Keep this page short. Read a reference file only when the user's task clearly falls inside it:
| If the user is... | Read |
|---|---|
| Picking between local and cloud runtime, or not sure which they should use | references/runtime-choice.md |
| Debugging auth (401s, "Missing CURSOR_API_KEY", team-vs-user keys, local vs prod) | references/auth.md |
Handling errors, retries, rate limits, CursorAgentError, result.status === error |
references/error-handling.md |
| Consuming streams, picking event types, cancelling, or deciding stream vs wait | references/streaming.md |
| Configuring MCP servers (HTTP, stdio, cloud vs local transport, auth injection) | references/mcp.md |
Using sub-agents, resume, artifacts, listing/inspecting agents, Agent.messages |
references/advanced.md |
| Building a specific integration (CI review bot, scheduled triage, chat, webhook) | references/patterns.md |
Everything below is the minimum needed for 80% of tasks.
The Three Invocation Patterns
Almost every SDK integration collapses to one of three shapes. Pick the one that fits the job, don't mix them.
1. Agent.prompt(...) — one-shot
import { Agent } from "@cursor/sdk";
const result = await Agent.prompt("Refactor src/utils.ts for readability", {
apiKey: process.env.CURSOR_API_KEY!,
model: { id: "composer-2" },
local: { cwd: process.cwd() },
});
console.log(result.status, result.result);
Use for fire-and-forget scripts, GitHub Actions steps, or any "send this prompt, get a result, e
Preguntas frecuentes
¿Dónde se ejecuta el agente?
Puede ejecutarse en local con tus archivos, o en la nube con un repositorio clonado, según la configuración.
¿El agente de la nube puede abrir pull requests?
Según la skill, el entorno de ejecución en la nube puede trabajar con un repositorio y abrir pull requests.
¿La skill defiende el SDK?
No. Parte de que ya has elegido el SDK y se centra en construir la integración.
Detalles
Descripción original del autor
Guide users building apps, scripts, CI pipelines, or automations on top of the Cursor TypeScript SDK (`@cursor/sdk`). Use this skill whenever the user mentions integrating, installing, or writing code against the Cursor SDK; whenever they say `Agent.create`, `Agent.prompt`, `Agent.resume`, `agent.send`, `run.stream`, `CursorAgentError`, or `@cursor/sdk`; whenever they ask to run Cursor agents programmatically from a script, CI/CD pipeline, GitHub Action, backend service, or any other code that isn't the Cursor IDE itself; and whenever they want to pick between local and cloud runtime, configur
repo: cursor/plugins
Popularidad
- Estrellas en GitHub
- 15 mil
- Posición en el ranking
- #10929
- Licencia
- —
- Actualizada
- 31/10/2026
Comentarios
- …
Más skills de este repositorio
advisor
15 milPermite que tu agente consulte a un segundo modelo más potente en puntos clave, como antes de una decisión importante o si se atasca con un error, si lo activas.
check-agent-compatibility
15 milRevisa si los agentes de IA pueden arrancar, verificar y documentar un repositorio, y devuelve una puntuación de compatibilidad con los problemas principales.
cli-for-agents
15 milEnseña a tu agente a diseñar o revisar herramientas de línea de comandos para que los agentes de IA las ejecuten sin preguntas, con textos de ayuda claros y ejemplos.
continual-learning
15 milMantiene tus notas de AGENTS.md al día entregando la revisión de chats anteriores a un actualizador de memoria dedicado.
Skills parecidas
api-connector-builder
280 milHace que tu agente cree nuevas conexiones de API siguiendo el patrón existente. Úsalo para añadir una integración más sin inventar otra forma de hacer las cosas.
api-design
280 milAyuda a tu agente a diseñar APIs REST según las buenas prácticas. Es útil para definir cómo se comunican las APIs, cómo se muestran los errores y cómo organizar los datos.
backend-patterns
280 milAyuda a tu agente con patrones de arquitectura del lado del servidor y optimización de bases de datos. Es útil para crear o revisar código que se ejecuta en el servidor.