data-pipeline

Implement Scrapy data pipelines for validation, cleaning, de-duplication, and export.

2|2|Updated Nov 4, 2025
One-click install
npx skills add https://github.com/gizix/cc_projects --skill data-pipeline-gizix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-pipeline
Source: https://github.com/gizix/cc_projects/tree/main/scrapy-template/.claude/skills/data-pipeline
Command: npx skills add https://github.com/gizix/cc_projects --skill data-pipeline-gizix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides building efficient, robust Scrapy pipelines for data validation, cleaning, storage, and export.

Core Features & Use Cases

  • Pipeline Architecture: Demonstrates ordering of validation, cleaning, de-duplication, storage, and export pipelines.
  • Storage Patterns: Examples for database-backed pipelines and file exports (CSV/JSON).
  • Error Handling: Adds reliable error handling and logging for resilience.

Quick Start

Use a basic pipeline skeleton to validate and export scraped data, then extend with your own storage layer.

Frequently Asked Questions about data-pipeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate and clean scraped data in Scrapy before export?

Scrapy pipelines validate and clean scraped items through multi-stage processing: configure item validation to enforce required fields and types, add cleaning logic to normalize data, de-duplicate records, and handle errors gracefully. Pipelines execute in defined order, allowing you to chain validation, transformation, and storage steps before exporting to CSV, JSON, or databases.

Can I export scraped data to multiple formats like CSV and JSON simultaneously?

Yes. Scrapy pipelines support multi-format export by chaining storage pipelines that write to CSV, JSON, or databases in parallel. Each pipeline processes the same validated item and writes to its target format, letting you maintain multiple exports from a single scraping job without duplicating scraping logic.

What's the best way to handle database storage in Scrapy pipelines?

Implement database-backed pipelines within Scrapy's pipeline architecture by opening connections in the pipeline's open_spider method and executing inserts or updates as items flow through. Structure your pipeline to handle connection errors, transactions, and de-duplication rules, keeping database logic reusable across projects with different schemas.

How do I order multiple pipelines to process items correctly in Scrapy?

Scrapy pipelines execute in priority order defined by ITEM_PIPELINES settings. Structure your pipeline sequence as validation first, then cleaning, de-duplication, and finally storage or export. Configure the order explicitly so that errors caught early prevent corrupt data from reaching storage, and later stages work only with valid, cleaned items.

Why would my scraped data fail to export, and how do I debug it?

Export failures typically stem from validation errors, type mismatches, or storage issues. Add reliable error handling and logging in each pipeline stage to capture which items fail and why. Log validation rejections, normalization steps, and database or file-write errors, then inspect logs to identify malformed data from specific sites or schemas before re-running exports.

Does Scrapy handle image downloads and storage in pipelines?

Scrapy includes built-in image handling pipelines for downloading and storing images alongside metadata. Configure image pipelines to filter by size, format, and source, then store images to disk or cloud storage while maintaining references in your main data export, coordinating with validation and de-duplication pipelines.