agentleFS
Faaz17Faaz17/Agents-and-Skills/skills/data/wsb-data-pipeline/SKILL.md

wsb-data-pipeline

Skill1 starsChanged 2 months agoMITView on GitHub

Scrape r/wallstreetbets posts for specific stock/forex tickers (TSLA, AAPL, XAUUSD, NVDA, GME) over historical date ranges and export Post Title, Date, Upvotes, Number of Comments, and Ticker Mentions to an Excel workbook. Use when the user asks to collect, update, or re-run WSB Reddit data for the herd-behavior research project, or asks about ticker date ranges, the data source, or output columns for that dataset.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always run the bundled script — do not hand-write scraping/Excel code, the script already handles pagination, rate-limit backoff, caching, …

    line 16
  2. Very specific:

    If the user wants different ranges or aliases, edit the TICKERS dict at the top of scripts/scrape_wsb.py rather than building one-off …

    line 40
  3. Very specific:

    After scraping, do not manually edit output/wsb_ticker_data.xlsx — re-run the script with updated ranges/aliases instead, so the file stays …

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WSB Data Pipeline

Collects historical r/wallstreetbets post data per ticker into output/wsb_ticker_data.xlsx (one sheet per ticker) for the herd-behavior sentiment research (see Research Points.docx).

Data source

Reddit's live API/search does not return multi-year-old posts reliably. This pipeline uses the Arctic Shift API (https://arctic-shift.photon-reddit.com/api/posts/search), a free public mirror of the Pushshift historical Reddit archive, instead. No Reddit credentials are required.

Running the pipeline

Always run the bundled script — do not hand-write scraping/Excel code, the script already handles pagination, rate-limit backoff, caching, and deduping.

cd "<project root>"
.venv/Scripts/python.exe scripts/scrape_wsb.py                 # all 5 tickers, full configured ranges
.venv/Scripts/python.exe scripts/scrape_wsb.py --ticker GME     # one ticker only
.venv/Scripts/python.exe scripts/scrape_wsb.py --ticker TSLA --after 2024-01-01 --before 2024-02-01  # custom range
.venv/Scripts/python.exe scripts/scrape_wsb.py --no-cache       # force re-fetch, ignore cached API pages

On Windows PowerShell use .\.venv\Scripts\python.exe instead of the forward-slash form.

Each run merges into the existing output/wsb_ticker_data.xlsx (sheets for tickers not re-run are preserved), so a single ticker can be refreshed without re-scraping the rest.

Configured ticker ranges (in scripts/scrape_wsb.py, TICKERS dict)

TickerAliases searchedDate range
TSLATSLA, Teslalast 5 years (2021-06-30 to 2026-06-30)
AAPLAAPL, Applelast 3 years (2023-06-30 to 2026-06-30)
XAUUSDXAUUSD, XAU/USD, Goldlast 3 years (2023-06-30 to 2026-06-30)
NVDANVDA, Nvidia, NVIDIAlast 4 years (2022-06-30 to 2026-06-30)
GMEGME, GameStop2020-01-01 to 2021-12-31 (fixed, per research scope)

If the user wants different ranges or aliases, edit the TICKERS dict at the top of scripts/scrape_wsb.py rather than building one-off scripts.

Output columns

Post Title, Date (UTC, ISO YYYY-MM-DD), Upvotes (Reddit score), Number of Comments, Ticker Mentions (regex word-boundary count of the ticker's aliases across title + selftext — use this as the per-post mention intensity, not a list of tickers).

Things to watch for

  • Long runs: TSLA/NVDA over multi-year windows can mean hundreds of API pages. Run tickers one at a time (--ticker X) if you want incremental progress/output rather than waiting for all 5.
  • Caching: raw API pages are cached under cache/<alias>/<after_ts>.json. A re-run with the same date range is fast and free of API calls; use --no-cache only if the underlying data may have changed.
  • Rate limits: the script checks the X-Ratelimit-Remaining response header and sleeps automatically when low — do not remove this or run multiple scrape processes in parallel against the same API.
  • XAUUSD is barely discussed on WSB by exact ticker; the "Gold" alias is included to catch gold-related posts, but expect a much smaller dataset than the equities.
  • After scraping, do not manually edit output/wsb_ticker_data.xlsx — re-run the script with updated ranges/aliases instead, so the file stays reproducible from scripts/scrape_wsb.py.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.