SpotifyScraper CLAUDE.md

SpotifyScraper CLAUDE.md is an instructions file for Claude Code from AliAkhtari78/SpotifyScraper. It costs 862 tokens per session, scanned A, original, MIT.

Project instructions for AI coding agents and developers working on SpotifyScraper, a Python library that extracts public Spotify data without the official API. They describe the project’s structure, rules, workflow, and commands.

In plain words
What is it for?
Use them when adding features, checking design decisions, running project commands, or understanding how Spotify data is extracted and modeled.
Why use it?
They give contributors a shared reference for changing the code without breaking its architecture or compatibility requirements.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

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.

agentmods
npx agentmods add instructions/aliakhtari78/spotifyscraper/claude-md
Clone the repo
git clone --depth 1 https://github.com/AliAkhtari78/SpotifyScraper

Made for: Claude Code.

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 SpotifyScraper CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aliakhtari78/spotifyscraper/claude-md.svg)](https://agentmods.dev/instructions/aliakhtari78/spotifyscraper/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/aliakhtari78/spotifyscraper/claude-md"><img src="https://agentmods.dev/badge/instructions/aliakhtari78/spotifyscraper/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 862 This file is loaded in full into every session.
When invoked 862 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.00862 $0.00862
Opus 5 $0.00431 $0.00431
Sonnet 5 $0.00172 $0.00172
Haiku 4.5 $0.00086 $0.00086

Measured 6d ago against content hash e3a37a3bca3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

SpotifyScraper CLAUDE.md 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 6d 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.

CLAUDE.md · 54 lines

How it starts

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

CLAUDE.md

Guidance for AI coding agents (and humans) working on SpotifyScraper.

What this project is

A Python library that extracts public Spotify data (tracks, albums, artists, playlists, shows, episodes) without the official API. v3 is a clean-room rewrite; the stable v2 line lives on the v2.x branch.

Architecture rules (do not violate)

  1. Sans-io core. All Spotify intelligence — URL parsing, token extraction, request building, payload→model parsing — lives in pure, sync-agnostic functions. Only the thin client facades in _sync/ and _async/ know about I/O.
  2. One runtime dependency. Core depends on httpx only. New functionality that needs another package goes behind an optional extra (media, browser) with a lazy import and a helpful ImportError.
  3. Two-tier extraction ladder. Tier 1: anonymous bearer token (bootstrapped from any embed page's __NEXT_DATA__) → Spotify pathfinder GraphQL. Tier 2 (fallback): parse the entity's own embed page. Tier-1-only model fields are | None. GraphQL persisted-query hashes live ONLY in api/pathfinder.py.
  4. Typed throughout. Frozen slotted dataclasses for models, to_dict() JSON-safe; mypy --strict must pass; exceptions come from the errors.py hierarchy — never return error strings or error dicts.
  5. Hermetic tests by default. Network tests are @pytest.mark.live and excluded by default. Never commit fixtures containing live accessToken, clientId, or cookie values — scrub them (see scripts/capture_fixtures.py once it exists).

Workflow

  • Spec-first. Every non-trivial change goes through OpenSpec: propose (/opsx:propose) → apply (/opsx:apply) → archive (/opsx:archive). Specs live in openspec/.
  • Conventional commits are enforced by a commit-msg hook (template: .gitmessage).
  • One OpenSpec change = one PR into v3 (until v3 merges to master).

Commands

Command Purpose
uv sync Install/refresh the dev environment
make lint / make format ruff check / autofix + format
make type mypy strict on src/
make test hermetic test suite
make cov tests with coverage (85% floor)
make live live Spotify smoke tests (network)
uv build build wheel + sdist

Read the full file on GitHub · 54 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. 6d ago First seen · 54 lines · 862 tokens per session scan A e3a37a3bca3a

Subscribe to this mod's changes

SpotifyScraper CLAUDE.md is an instructions file published in the GitHub repository AliAkhtari78/SpotifyScraper (301 stars, last pushed 2d ago), licensed MIT. It adds 862 tokens to every session, about $0.0043 per session on Opus 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-30.