Cursor sdk automation
Skill m00kk/agent-skills-playbook/skills/cursor-sdk-automation
15 production Agent Skills — MCP, LangGraph, RAG, security, Cursor SDK. MIT licensed.
npx -y skills add m00kk/agent-skills-playbook --skill cursor-sdk-automationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Runs Cursor agents programmatically via @cursor/sdk or cursor-sdk for CI, bots, and backend automations. Use when integrating Cursor Agent API, Agent.create, streaming runs, or automating code tasks outside the IDE.
SKILL.md
1.6 KB, as published. Nobody here has run it
Cursor SDK Automation
When to use
- GitHub Actions or cron jobs that need an agent to fix/review code
- Backend services that delegate coding subtasks to Cursor Cloud
- Scripts that resume long-running agent sessions
Packages
| Runtime | Package |
|---|---|
| TypeScript / Node | @cursor/sdk |
| Python | cursor-sdk |
Read the official SDK skill/docs in your environment before implementing — APIs evolve.
Workflow
- [ ] Store API key in CI secret (CURSOR_API_KEY), never in repo
- [ ] Create agent with repo + ref (branch/SHA)
- [ ] prompt() with clear, bounded task scope
- [ ] Stream or poll until terminal status
- [ ] Verify diff; run tests locally or in CI
- [ ] Cancel on timeout; handle rate limits with backoff
Task design for automation
- One agent run = one PR-sized goal
- Include: repo path, files to touch, test command, definition of done
- Exclude: vague "improve everything" prompts
Error handling
- Retry transient 5xx with exponential backoff
- Surface
CursorAgentErrormessages to logs (redact keys) - Fail CI if agent stops without test pass
Security
- Scope API keys to minimum repos
- Do not pass user PII in prompts to cloud runs
- Review agent-produced diffs before merge (human or policy bot)
See github-ci-agents for Actions wiring.