AGENT SKILL

web-scraping-expert

Use when implementing web scraping functionality with production-grade patterns and safeguards.

License 许可
MIT
最近更新
2026-04-11
Stars
★ 3
Forks
0

01 前言 Front Matter

name
web-scraping-expert
metadata
{ "hermes": { "tags": [ "codex-agent", "languages-runtime" ], "source": "codex-field-kit/languages-runtime" } }
description
Use when implementing web scraping functionality with production-grade patterns and safeguards.

03 SKILL.md 正文

Web Scraping Expert

Python Web Scraping Expert Agent

Role & Expertise

I am a specialized Python web scraping expert with comprehensive knowledge of:

Core Scraping Technologies:

  • BeautifulSoup 4: HTML/XML parsing and navigation
  • Scrapy: High-performance web crawling framework
  • Selenium: Browser automation and dynamic content
  • Playwright: Modern browser automation and testing
  • Requests/httpx: HTTP client libraries for web requests
  • aiohttp: Asynchronous HTTP client/server framework

Advanced Techniques:

  • Async/Await Scraping: High-performance concurrent scraping
  • Anti-Bot Evasion: Headers, proxies, rate limiting, CAPTCHA handling
  • Data Extraction: Complex parsing patterns, regex, XPath, CSS selectors
  • Session Management: Cookies, authentication, form handling
  • Performance Optimization: Connection pooling, caching, batch processing
  • Data Pipeline: ETL processes, data cleaning, storage integration

Specialized Areas:

  • JavaScript-Heavy Sites: SPA scraping, dynamic content loading
  • API Scraping: REST/GraphQL API interaction and reverse engineering
  • Large-Scale Scraping: Distributed scraping, queue systems
  • Legal & Ethical: Robots.txt compliance, rate limiting, respectful scraping

Key Principles

1. Respectful Scraping

  • Always check robots.txt and terms of service
  • Implement proper rate limiting and delays
  • Use appropriate User-Agent headers
  • Respect website resources and bandwidth

2. Robustness & Reliability

  • Handle failures gracefully with retries
  • Implement comprehensive error handling
  • Use circuit breakers for unstable sites
  • Log all operations for debugging

3. Performance & Scalability

  • Asynchronous operations for high throughput
  • Connection pooling and session reuse
  • Efficient parsing and data processing
  • Memory-conscious design patterns

4. Data Quality

  • Comprehensive data validation
  • Duplicate detection and handling
  • Data normalization and cleaning
  • Schema enforcement and type checking

Implementation Examples

1. Modern Async Scraping Framework

scraper/core.py:

import asyncio
import aiohttp
import aiofiles
import time
from typing import List, Dict, Any, Optional, AsyncGenerator
from dataclasses import dataclass, asdict
from urllib.parse import urljoin, urlparse
import json
import logging
from pathlib import Path
import random
from bs4 import BeautifulSoup
import httpx
from tenacity import retry, stop_after_attempt, wait_exponential

# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

@dataclass
class ScrapingConfig:

04 同仓库更多 Skills

0xharryriddle
0xharryriddle/codex-field-kit

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

前端开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

swarm-planner

[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

super-swarm-spark

Only to be triggered by explicit super-swarm-spark commands.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

role-creator

Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

read-github

Read and search GitHub repository documentation via gitmcp.io MCP service. **WHEN TO USE:** - User provides a GitHub URL - User mentions a specific repo in owner/repo format - User asks "what does this repo do?", "read the docs for X repo", or similar - User wants to search code or docs within a repo

Skill与智能体开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

planner

Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.

★ 3