cursor-sdk
O que ela faz
Dá ao assistente orientação para escrever código que executa agentes do Cursor pelo SDK TypeScript. É para desenvolvedores que querem automatizar o trabalho do Cursor nas próprias ferramentas.
Quando usar
- ✓Quando você quer escrever um app ou script que executa agentes do Cursor.
- ✓Quando você menciona o SDK do Cursor ou suas funções de agente no seu código.
- ✓Quando você quer que um pipeline de automação ou de CI execute agentes do Cursor para você.
Link da skill
https://github.com/cursor/plugins/blob/main/cursor-sdk/skills/cursor-sdk/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Me ajude a escrever um pequeno script Node que execute um agente do Cursor no meu repositório e imprima o resultado.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O assistente oferece um ponto de partida funcional para o SDK, mostra como os agentes rodam na sua máquina ou na nuvem e ajuda a evitar armadilhas comuns de configuração. A documentação oficial do SDK continua sendo a referência.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Onde o agente roda?
Pode rodar localmente, sobre os seus arquivos, ou na nuvem, sobre um repositório clonado, dependendo da configuração.
O agente da nuvem pode abrir pull requests?
Segundo a skill, o runtime da nuvem pode trabalhar em um repositório e abrir pull requests.
A skill defende o uso do SDK?
Não. Ela presume que você já escolheu o SDK e foca em construir a integração.
Detalhes
Descrição original do 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
Popularidade
- Estrelas no GitHub
- 15 mil
- Posição no ranking
- #10929
- Licença
- —
- Atualizada em
- 31/10/2026
Comentários
- …
Mais skills deste repositório
advisor
15 milPermite que seu agente consulte um segundo modelo mais forte em pontos-chave, como antes de uma decisão importante ou quando está travado em um erro, se você ativar.
check-agent-compatibility
15 milExecuta uma verificação completa de quão bem agentes de código de IA conseguem iniciar, verificar e documentar um repositório, e devolve uma única pontuação de compatibilidade com os principais problemas.
cli-for-agents
15 milEnsina seu agente a projetar ou revisar ferramentas de linha de comando para que agentes de IA consigam executá-las sem perguntas, com textos de ajuda claros e exemplos.
continual-learning
15 milMantém suas notas do AGENTS.md atualizadas, entregando o trabalho de revisar conversas passadas a um atualizador de memória dedicado.
Skills parecidas
api-connector-builder
280 milFaz seu agente construir novas conexões com APIs seguindo o padrão já existente. Use quando precisar adicionar mais uma integração sem criar um novo jeito de fazer.
api-design
280 milAjuda seu agente a projetar APIs REST seguindo as melhores práticas. É útil para definir como as APIs se comunicam, como os erros são mostrados e como organizar os dados.
backend-patterns
280 milAjuda seu agente com padrões de arquitetura do lado do servidor e otimização de banco de dados. É útil para construir ou revisar o código que roda no servidor.