scrapy

scrapy is a cursor rule for Cursor from Solihatun1/AI-Cursor-Scraping-Assistant. It costs 955 tokens per session, scanned A, a copy of scrapy, MIT.

A set of coding rules for Scrapy, a Python framework for building web crawlers that collect data from websites. It covers project structure, naming, organization, performance, security, testing, and common mistakes.

In plain words
What is it for?
Use it when creating or changing Scrapy spiders, especially to follow the required project layout, naming rules, prerequisites, and scraper-specific guidance.
Why use it?
It gives scraper development a consistent structure and highlights practices that help avoid fragile, unsafe, or difficult-to-maintain crawlers.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when creating or changing Scrapy spiders, especially to follow the required project layout, naming rules, prerequisites, and scraper-specific guidance.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/solihatun1/ai-cursor-scraping-assistant/scrapy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Solihatun1/AI-Cursor-Scraping-Assistant

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 scrapy

README.md
[![agentmods](https://agentmods.dev/badge/rules/solihatun1/ai-cursor-scraping-assistant/scrapy.svg)](https://agentmods.dev/rules/solihatun1/ai-cursor-scraping-assistant/scrapy)
Your own site
<a href="https://agentmods.dev/rules/solihatun1/ai-cursor-scraping-assistant/scrapy"><img src="https://agentmods.dev/badge/rules/solihatun1/ai-cursor-scraping-assistant/scrapy.svg" alt="Measured on agentmods" height="20"></a>
Per session 955 This file is loaded in full into every session.
When invoked 955 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 100% copy Near-identical to another mod 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.00955 $0.00955
Opus 5 $0.00477 $0.00477
Sonnet 5 $0.00191 $0.00191
Haiku 4.5 $0.00096 $0.00096

Measured 8d ago against content hash 5a189ed49eb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

scrapy 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 8d 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.

Origin

This is a copy

100% identical to scrapy — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

cursor-rules/scrapy.mdc · 81 lines

How it starts

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


description: This rule provides comprehensive best practices for Scrapy development, including code organization, performance, security, testing, and common pitfalls to avoid. It aims to guide developers in building robust, efficient, and maintainable web scraping applications with Scrapy. globs: **/*.py

Scrapy Best Practices

This document outlines the recommended best practices for developing Scrapy web scraping applications. Following these guidelines will help you create robust, efficient, secure, and maintainable scrapers.

Before start developing a Scrapy spider, follow the prerequisites.mdc rule.

Only after reading the prerequisites.mdc files and executing the steps included in it, you can start building the Scrapy spider.

When asked to build a Scrapy spider, read the scraper-models.mdc rule for understanding the type of scraper to create.

Never change the starting URL of the scraper, even in case of errors during the process, but always use the one given by the user.

1. Code Organization and Structure

1.1. Directory Structure

  • Project Root: Contains scrapy.cfg, project directory, and any README.md, LICENSE, or other project-level files.
  • Project Directory (e.g., my_project):
    • __init__.py: Marks the directory as a Python package.
    • items.py: Defines the data structures (Scrapy Items) for the scraped data.
    • middlewares.py: Contains the Scrapy middleware components, used for request/response processing.
    • pipelines.py: Defines the data processing pipelines, used for cleaning, validating, and storing the scraped data.
    • settings.py: Configures the Scrapy project, including settings for pipelines, middleware, concurrency, etc.
    • spiders/:
      • __init__.py: Marks the directory as a Python package.
      • my_spider.py: Contains the spider definitions (Scrapy Spiders) responsible for crawling and scraping data.

Read the full file on GitHub · 81 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. 8d ago First seen · 81 lines · 955 tokens per session scan A 5a189ed49eb9

Subscribe to this mod's changes

scrapy is a cursor rule published in the GitHub repository Solihatun1/AI-Cursor-Scraping-Assistant (6 stars, last pushed 6mo ago), licensed MIT. It adds 955 tokens to every session, about $0.0048 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to scrapy, differing in 0 lines, and is treated as a copy.