crawl4weibo AGENTS.md

crawl4weibo AGENTS.md is an instructions file for Codex, OpenCode from Praeviso/crawl4weibo. It costs 518 tokens per session, scanned A, original, MIT.

Repository instructions for Crawl4Weibo, a Python library that collects data from Weibo, a Chinese social-media platform.

In plain words
What is it for?
Use them when developing the library, running its crawler examples, checking code quality, or testing request and retry behavior.
Why use it?
They give coding agents the correct setup, test, formatting, and project-structure rules for making safe changes.

Instructions file for CodexOpenCode

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/praeviso/crawl4weibo/agents-md
Clone the repo
git clone --depth 1 https://github.com/Praeviso/crawl4weibo

Made for: Codex, OpenCode.

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 crawl4weibo AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/praeviso/crawl4weibo/agents-md.svg)](https://agentmods.dev/instructions/praeviso/crawl4weibo/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/praeviso/crawl4weibo/agents-md"><img src="https://agentmods.dev/badge/instructions/praeviso/crawl4weibo/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 518 This file is loaded in full into every session.
When invoked 518 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 $0.00518 $0.00518
Opus 5 $0.00259 $0.00259
Sonnet 5 $0.00104 $0.00104
Haiku 4.5 $0.00052 $0.00052

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

Security

Grade A, and why

crawl4weibo AGENTS.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 5d 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.

AGENTS.md · 21 lines

How it starts

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

Repository Guidelines

Project Structure & Module Organization

The library code lives in crawl4weibo/, with core/ managing request orchestration and retry logic, models/ exposing typed results, utils/ housing shared helpers, and exceptions/ defining recoverable error types. Tests mirror runtime modules inside tests/, living assets and walkthroughs are under docs/ and examples/ (start with examples/simple_example.py for a smoke run).

Build, Test, and Development Commands

  • uv sync --dev Install project and development extras into the local uv-managed virtualenv.
  • uv run python examples/simple_example.py Run the basic crawling demo against live data.
  • uv run pytest Execute the full suite (markers: unit, integration, slow).
  • uv run pytest -m "unit and not slow" Run a fast gate before opening a PR.
  • uv run ruff check crawl4weibo --fix && uv run ruff format crawl4weibo Enforce linting, import order, and formatting defaults.

Coding Style & Naming Conventions

Follow PEP 8 with four-space indentation, 88-character lines, and double-quoted strings (ruff enforces these). Prefer descriptive snake_case for functions and attributes, keep constants uppercase, and leave response keys unchanged to reflect upstream payloads. Add type hints on new public APIs and keep IO-heavy logic inside core/ helpers so models remain lightweight.

Testing Guidelines

Place new tests in tests/ using the test_*.py pattern and Test* classes. Mark slow or network-consuming flows with @pytest.mark.slow or @pytest.mark.integration so they can be filtered. Prefer running suites through uv run pytest so the same environment is used locally and in CI. Cover both success and failure paths for request handlers, and include fixtures or notes when relying on real Weibo calls. Aim for meaningful coverage that exercises serialization and retry behavior rather than chasing a fixed percentage.

Commit & Pull Request Guidelines

Use Conventional Commit style subjects (feat:, fix:, docs:) in the imperative, under 72 characters, mirroring existing history. Each PR should describe the change, call out API or behavior impacts, link any tracked issues, and attach test evidence (pytest, ruff, or demos). Request reviews early for changes touching rate-limiting or authentication to ensure shared understanding before merge.

Read the full file on GitHub · 21 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. 5d ago First seen · 21 lines · 518 tokens per session scan A 08d235b039d3

Subscribe to this mod's changes

crawl4weibo AGENTS.md is an instructions file published in the GitHub repository Praeviso/crawl4weibo (43 stars, last pushed 5d ago), licensed MIT. It adds 518 tokens to every session, about $0.0026 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.