scrapybara-python-template: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from Scrapybara/scrapybara-python-template. It costs 1,684 tokens per session, scanned A, original, MIT.

A set of project instructions for using Scrapybara, a Python toolkit that starts and manages remote desktop computers for AI agents.

In plain words
What is it for?
Use it when writing or reviewing code that creates, controls, pauses, resumes, or stops Scrapybara desktop instances.
Why use it?
It provides the correct client setup, instance types, operations, and Python imports needed to work with the toolkit.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is Scrapybara/scrapybara-python-template's own configuration. It tells Cursor how to work on scrapybara-python-template itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything scrapybara-python-template configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Scrapybara/scrapybara-python-template. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Scrapybara/scrapybara-python-template/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/Scrapybara/scrapybara-python-template

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/scrapybara/scrapybara-python-template/cursorrules/github.svg)](https://agentmods.dev/rules/scrapybara/scrapybara-python-template/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/scrapybara/scrapybara-python-template/cursorrules"><img src="https://agentmods.dev/badge/rules/scrapybara/scrapybara-python-template/cursorrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/scrapybara/scrapybara-python-template/cursorrules"><img src="https://agentmods.dev/badge/rules/scrapybara/scrapybara-python-template/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,684 This file is loaded in full into every session.
When invoked 1,684 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01684 $0.01684
Opus 5.5 $0.00674 $0.00674
Sonnet 5.5 $0.00337 $0.00337
Haiku 4.5 $0.00168 $0.00168

Measured 2mo ago against content hash 579d868b7bca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cursorrules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursorrules · 207 lines

How it starts

The opening of the file, as written. The whole thing — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are working with Scrapybara, a Python SDK for deploying and managing remote desktop instances for AI agents. Use this guide to properly interact with the SDK.

CORE SDK USAGE:

  • Initialize client: from scrapybara import Scrapybara; client = Scrapybara(api_key="KEY")
  • Instance lifecycle: instance = client.start_ubuntu(timeout_hours=1) instance.pause() # Pause to save resources instance.resume(timeout_hours=1) # Resume work instance.stop() # Terminate and clean up
  • Instance types: ubuntu_instance = client.start_ubuntu(): supports bash, computer, edit, browser browser_instance = client.start_browser(): supports computer, browser windows_instance = client.start_windows(): supports computer

TYPE IMPORTS:

  • Core types: from scrapybara import Scrapybara
  • Instance types: from scrapybara.client import UbuntuInstance, BrowserInstance, WindowsInstance
  • Tool types: from scrapybara.tools import Tool, BashTool, ComputerTool, EditTool
  • Model types: from scrapybara.anthropic import Anthropic
  • Message types: from pydantic import BaseModel from typing import List, Union, Optional, Any
  • Error types: from scrapybara.core.api_error import ApiError

CORE INSTANCE OPERATIONS:

  • Screenshots: instance.screenshot().base_64_image
  • Bash commands: instance.bash(command="ls -la")
  • Mouse control: instance.computer(action="move_mouse", coordinates=[x, y])
  • Click actions: instance.computer(action="click_mouse", button="right", coordinates=[x, y])
  • Drag actions: instance.computer(action="drag_mouse", path=[[x1, y1], [x2, y2]])
  • Scroll actions: instance.computer(action="scroll", coordinates=[x, y], delta_x=0, delta_y=0)
  • Key actions: instance.computer(action="press_key", keys=[keys])
  • Type actions: instance.computer(action="type_text", text="Hello world")
  • Wait actions: instance.computer(action="wait", duration=3)
  • Get cursor position: instance.computer(action="get_cursor_position").output
  • File operations: instance.file.read(path="/path/file"), instance.file.write(path="/path/file", content="data")

ACT SDK (Primary Focus):

  • Purpose: Enables building computer use agents with unified tools and model interfaces
  • Core components:
  1. Model: Handles LLM integration (currently Anthropic) from scrapybara.anthropic import Anthropic model = Anthropic() # Or model = Anthropic(api_key="KEY") for own key
  2. Tools: Interface for computer interactions
    • BashTool: Run shell commands
    • ComputerTool: Mouse/keyboard control
    • EditTool: File operations tools = [ BashTool(instance), ComputerTool(instance), EditTool(instance), ]
  3. Prompt:
    • system: system prompt, recommend to use UBUNTU_SYSTEM_PROMPT, BROWSER_SYSTEM_PROMPT, WINDOWS_SYSTEM_PROMPT
    • prompt: simple user prompt
    • messages: list of messages
    • Only include either prompt or messages, not both response = client.act( model=Anthropic(), tools=tools, system=UBUNTU_SYSTEM_PROMPT, prompt="Task", on_step=handle_step ) messages = response.messages steps = response.steps text = response.text output = response.output usage = response.usage

MESSAGE HANDLING:

  • Response Structure: Messages are structured with roles (user/assistant/tool) and typed content
  • Content Types:
  • TextPart: Simple text content TextPart(type="text", text="content")
  • ImagePart: Base64 or URL images ImagePart(type="image", image="base64...", mime_type="image/png")
  • ReasoningPart: Model reasoning content ReasoningPart( type="reasoning", id="id", reasoning="reasoning", signature="signature", instructions="instructions" )
  • ToolCallPart: Tool invocations ToolCallPart( type="tool-call", tool_call_id="id", tool_name="bash", args={"command": "ls"} )
  • ToolResultPart: Tool execution results ToolResultPart( type="tool-result", tool_call_id="id", tool_name="bash", result="output", is_error=False )

Read the full file on GitHub · 207 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 207 lines · 1,684 tokens per session scan A 579d868b7bca

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Scrapybara/scrapybara-python-template (8 stars, last pushed 1mo ago), licensed MIT. It adds 1,684 tokens to every session, about $0.0067 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesScrapybara/scrapybara-python-templateCursor rule81mo agoMITA1,684Cursor
ponytailDietrichGebert/ponytailCursor rule185k8d agoMITA604Cursor
angular-20angular/angularCursor rule101kyesterdayMITA0Cursor
dev-standardapache/supersetCursor rule75ktodayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor
shared-plane-packagesprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor