agentleFS
ScrapeGraphAIScrapeGraphAI/Scrapegraph-ai/AGENTS.md

Scrapegraph-ai

AGENTS.md32k starsChanged 22 months agoMITView on GitHub

Instructions for AI coding agents (Claude Code, Codex, Cursor, Copilot agents, …) working on ScrapeGraphAI. Human contributors should read CONTRIBUTING.md; everything here is in addition to it. main is never written to directly. All work is based on and merged into pre/beta. pre/beta is the prerelease branch: pushes to it publish a beta prerelease via semantic-release (see .releaserc.yml). main only receives releases when a maintainer promotes pre/beta. Checklist before you commit: If a task genuinely requires targeting main (e.g. a…

  • Reads credentials
  • Commits and pushes

We split this AGENTS.md into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a task genuinely requires targeting main (e.g.

    line 38
  2. Very specific:

    Never hand-edit uv.lock; regenerate it with uv lock / uv sync and commit the result only when you actually changed dependencies in …

    line 50
  3. Very specific:

    Run at least make lint and the tests covering what you touched.

    line 62
  4. Very specific:

    When adding a node or graph, register it in the corresponding __init__.py and add a test under tests/ next to the existing ones for that …

    line 121
  5. Distinctive:

    Prefer small, reviewable diffs.

    line 128
  6. Distinctive:

    Do not add dependencies unless the task requires it — say why in the PR.

    line 129
  7. Distinctive:

    Write all commits, PR titles/bodies, issue comments, code comments and docstrings in English.

    line 130
  8. Distinctive:

    Do not delete or rewrite existing tests to make a change pass.

    line 132
  9. Very specific:

    If a test is already failing on pre/beta, mention it rather than silently fixing unrelated things in the same PR.

    line 133
  10. Distinctive:

    Never commit other people's in-progress work: check git status and stage only the files belonging to your change.

    line 135

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md 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
AGENTS.md

AGENTS.md

Instructions for AI coding agents (Claude Code, Codex, Cursor, Copilot agents, …) working on ScrapeGraphAI. Human contributors should read CONTRIBUTING.md; everything here is in addition to it.


1. Golden rule: everything goes to pre/beta

main is never written to directly. All work is based on and merged into pre/beta.

pre/beta is the prerelease branch: pushes to it publish a beta prerelease via semantic-release (see .releaserc.yml). main only receives releases when a maintainer promotes pre/beta.

# 1. always start from an up-to-date pre/beta
git fetch origin
git checkout -b feat/my-change origin/pre/beta

# 2. commit your work
git add <only the files you touched>
git commit -m "feat(nodes): add X"

# 3. push and open the PR against pre/beta
git push -u origin feat/my-change
gh pr create --base pre/beta --title "feat(nodes): add X" --body "..."

Checklist before you commit:

  • The branch is based on origin/pre/beta (git merge-base --is-ancestor origin/pre/beta HEAD).
  • The PR base is pre/beta, not main.
  • No commits directly on main or pre/beta, no force-push to either.
  • One logical change per branch/PR.

If a task genuinely requires targeting main (e.g. a hotfix on a released version), stop and ask a maintainer first.

2. Environment setup

Python >=3.12, dependencies managed with uv:

uv sync                     # create the venv and install deps
uv run pre-commit install   # install the git hooks

Never hand-edit uv.lock; regenerate it with uv lock / uv sync and commit the result only when you actually changed dependencies in pyproject.toml.

3. Checks to run before pushing

make lint         # ruff + black --check + isort --check-only
make type-check   # mypy (strict)
make test         # pytest with coverage
make pre-commit   # run all hooks on all files

Run at least make lint and the tests covering what you touched. Report the real result: if something fails or you skipped a step, say so in the PR description instead of implying a clean run.

Style: PEP 8 + Google Python docstrings, black formatting, line length 88. Match the conventions of the surrounding file rather than introducing new ones.

4. Commit messages

Commits are parsed by semantic-release (Conventional Commits, conventionalcommits preset), so the message decides the next version number. Use:

feat:     ✨ new feature          -> minor bump
fix:      🐛 bug fix              -> patch bump
docs:     📚 documentation
style:    💅 formatting only
refactor: ♻️  no behaviour change
perf:     ⚡ performance
test:     🧪 tests
build:    📦 build system / deps
ci:       🤖 CI configuration
chore:    🧹 everything else

Format: type(optional-scope): imperative summary, optional body, and BREAKING CHANGE: in the footer for incompatible changes. Reference issues with Fixes #123.

5. Files agents must not touch

  • CHANGELOG.md and the version field in pyproject.toml — owned by semantic-release; editing them by hand breaks releases.
  • Git tags and release notes on GitHub.
  • .github/workflows/* — only when the task is explicitly about CI.
  • Anything under htmlcov/, coverage.xml, .pytest_cache/, __pycache__/: build artifacts, never commit them.

Also: never commit secrets. API keys go in a local .env (git-ignored) and are read via os.getenv; examples and tests must use placeholders such as OPENAI_APIKEY from the environment.

6. Repository layout

scrapegraphai/
├── graphs/        # pipelines (SmartScraperGraph, SearchGraph, …)
├── nodes/         # single graph steps (FetchNode, ParseNode, GenerateAnswerNode, …)
├── models/        # LLM wrappers and token/model metadata
├── docloaders/    # loaders (ChromiumLoader, …)
├── prompts/       # prompt templates
├── helpers/       # shared constants and schemas
├── integrations/  # third-party / managed-API integrations
└── utils/         # utilities (html cleanup, tokenization, …)
examples/          # runnable usage examples, one folder per graph
tests/             # pytest suite, mirrors the package layout
docs/              # documentation sources

When adding a node or graph, register it in the corresponding __init__.py and add a test under tests/ next to the existing ones for that layer. New user-facing features need an entry in examples/ and, when they change public behaviour, a docs update.

7. Working style expected from agents

  • Prefer small, reviewable diffs; do not reformat or "clean up" untouched files.
  • Do not add dependencies unless the task requires it — say why in the PR.
  • Write all commits, PR titles/bodies, issue comments, code comments and docstrings in English.
  • Do not delete or rewrite existing tests to make a change pass.
  • If a test is already failing on pre/beta, mention it rather than silently fixing unrelated things in the same PR.
  • Never commit other people's in-progress work: check git status and stage only the files belonging to your change.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 1 mentionFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 4 mentionsJun 2026: 2 mentionsJul 2026: 1 mentionAug 2026: 4 mentionsSep 2026: 14 mentionsOct 2026: 6 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the ScrapeGraphAI/Scrapegraph-ai repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about ScrapeGraphAI/Scrapegraph-ai

The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 52

Talked about on YouTube, GitHub, Bluesky, Hacker News, Stack Overflow and the web (52 times).

On YouTube · 25

20 more on YouTube

On GitHub · 21

16 more on GitHub

On Bluesky · 3

On Hacker News · 1

On Stack Overflow · 1

On the web · 1

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

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.