Skip to content

About

Crawl a specific list of pages through a real Chrome — bot checks included — and get an Excel SEO report. Claude Code skill + CLI.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Krawlify Agent

Crawl a specific list of pages through a real Chrome — including sites behind Cloudflare or a similar bot check — and get one Excel workbook of SEO findings.

It is a Claude Code skill with a CLI underneath, so it works either as /krawlify-agent-style agent tooling or as a plain command in a terminal. No server, no database, no build step.

node path/to/krawlify-agent/scripts/crawl.mjs --urls urls.txt
[krawlify] 5 URL(s) to crawl on example.com
[krawlify] opened a crawl tab in your Chrome (tab group: 🕷 Krawlify)
[krawlify] bot check detected on https://example.com/ — waiting up to 60s
[krawlify] bot check cleared after 15s
[krawlify] 1/5 200 https://example.com/pricing
…
[krawlify] report written: D:\work\krawlify-report-example.com-20260802-0124.xlsx

Why it exists

Most crawlers either get a 403 from a protected site or need a headless browser that the site recognises on sight. This one borrows a browser a human is already using — with its real cookies, history and fingerprint — waits for the challenge to clear the way a person would, and then reads the pages you asked for. Nothing else: no link following, no sitemap discovery, no surprise 10,000-page crawl.

What you get

A Summary sheet — run metadata, the bot-check outcome, and every issue category with its severity and count — followed by twelve data sheets:

internal · response-codes · titles · meta · headings · directives · images · broken-assets · redirects · links · external · dates

Titles and meta descriptions are measured in both characters and approximate pixel width; duplicates, missing/multiple H1s, canonical mismatches, noindex, missing or over-long alt text, and broken assets and external links are all counted. Full column reference: references/report-sheets.md.

A compact JSON summary also goes to stdout, so an agent can report findings without opening the workbook.

Install

Requires Node 20.6+ and Google Chrome. Installing pulls three packages (playwright-core, cheerio, exceljs) — no browser download, since it drives the Chrome you already have.

As a CLI

npm install -g krawlify-agent     # or: yarn global add krawlify-agent
                                  #     pnpm add -g krawlify-agent
krawlify-agent --help

Or without installing anything:

npx krawlify-agent --urls urls.txt        # yarn dlx / pnpm dlx work the same

As a Claude Code skill

Claude Code finds skills by directory, so the package installs itself into one:

krawlify-agent install-skill              # → ~/.claude/skills/krawlify-agent
krawlify-agent install-skill --project    # → ./.claude/skills/krawlify-agent
krawlify-agent install-skill --link       # symlink this checkout (for development)

It copies by default, so the skill keeps working after the npm package is upgraded or removed, and installs its own dependencies into the copy. krawlify-agent uninstall-skill takes it back out. Start a new Claude Code session afterwards so the skill is picked up.

From source

git clone https://github.com/kamenarov/krawlify-skill.git
cd krawlify-skill
npm install
cp .env.example .env.local
npm test

Two ways to get a browser

Relay mode (default)

Works inside the Chrome you already have open, via the Krawlify browser extension and its local CDP relay. Crawl tabs appear in the extension's 🕷 Krawlify tab group; the relay only ever reports tabs the client opened itself, so the rest of your browser stays private. Nothing needs closing.

Put the token from the extension's options page into .env.local:

KRAWLIFY_TOKEN=…
# KRAWLIFY_RELAY=https://alpha.krawlify.com   # the default; set it only for your own relay

The Server URL defaults to Krawlify's hosted relay, https://alpha.krawlify.com; point KRAWLIFY_RELAY at http://127.0.0.1:9333 (or wherever) if you run one yourself. .env.local is gitignored and holds a live credential for your browser — never commit it.

Launch mode (--launch)

Starts the installed Chrome on your own profile directory instead. No extension needed, but Chrome holds an exclusive lock on a profile, so every Chrome window must be closed first. The tool checks and says so rather than failing obscurely.

Usage

krawlify-agent --check --urls urls.txt   # verify setup, crawl nothing
krawlify-agent --urls urls.txt           # crawl, write the workbook
krawlify-agent --help                    # every flag

From a checkout, node scripts/crawl.mjs … is the same command.

urls.txt is one URL per line; blank lines and # comments are ignored. The workbook is written to the directory you ran the command in, as krawlify-report-<host>-<YYYYMMDD-HHmm>.xlsx.

A run checks three things in order and exits with a distinct code if one is missing:

Check Exit Fix
dependencies installed 4 npm install
relay token (or --launch) 5 fill in .env.local
a usable URL list 2 pass --urls
Chrome running (launch mode only) 3 close every Chrome window

Flags worth knowing:

Flag What it does
--wait-full hold the tab open for the whole minute — for a captcha or login you solve by hand
--challenge-wait <ms> change the 60 s ceiling on the bot-check wait
--no-check-assets / --no-check-external skip status checks; much faster on link-heavy pages
--delay <ms> politeness delay between fetches (default 250)
--out <path> / --out-dir <dir> where the workbook goes
--fetch-mode auto|request|page how pages are fetched (see below)
--launch, --profile, --profile-name launch mode and which Chrome profile it borrows

How it works

  1. Get a browser — connect to the relay, or launch Chrome on a profile.
  2. Face the challenge once in a real visible tab. Detection is deliberately strict about clearing: Cloudflare blanks the title while it works, so "the title no longer says Just a moment" is not enough — a real title and a non-error document status are also required, or you capture a half-built interstitial. After clearing, the page is given a bounded moment to actually render.
  3. Fetch each listed URL through that same session — same cookie jar, same IP, same UA as the tab that solved the check. Redirects are followed by hand so every hop is recorded.
  4. Audit each page with Cheerio: titles, meta descriptions, H1–H6, canonical, robots directives, JSON-LD dates, word count, links and assets.
  5. Roll up duplicates and inlinks across the set, then write the workbook.

If a page comes back looking like an interstitial mid-crawl, the tab goes back to it and waits again (up to three times per run) rather than recording a wall of 403s.

The fetchMode: "page" caveat

Fetching through the browser's request API needs the browser to hand its cookie jar over (Storage.getCookies). A relay that does not implement that makes the tool fall back to fetching from inside the crawl tab — same cookies and IP, but fetch() follows redirects itself, so no redirect chain is captured and the redirects sheet is empty by construction. The run says so in its summary. What the extension needs to add is written up in references/extension-request.md.

Limitations

  • No discovery. It crawls the list and nothing else — no link following, no sitemap parsing, no depth. Inlink counts and duplicate detection are therefore scoped to that list.
  • No JavaScript rendering of the fetched pages. The challenge is faced in a live tab, but each listed page is fetched and parsed as HTML.
  • --headless cannot solve a captcha — nobody can click a checkbox in a window that isn't there.
  • It is your real browser. Cookies the crawl picks up land in your everyday profile, and any site you're logged into is logged in for the crawl too.

Crawl responsibly

Point it at sites you own or are authorised to audit. It defaults to one request at a time with a delay between them; raise --delay if a host is slow or rate-limits you. It does not read robots.txt — the URL list is an explicit instruction from a human, not a discovered frontier — so it is on you not to list pages you have no business fetching.

Development

npm test        # node --test, no framework

Layout:

SKILL.md            how an agent should use this
scripts/crawl.mjs   CLI entry: preflight checks, then loads the crawler
src/run.mjs         the crawl itself
src/browser.mjs     relay connect / Chrome launch, challenge detection
src/httpFetch.mjs   redirect-chain fetching, in-page fallback
src/parse.mjs       HTML extraction (Cheerio)
src/audit/*         per-page auditors and thresholds
src/columns.mjs     sheet definitions and cell formatting
src/report.mjs      workbook writer (ExcelJS)
references/         deeper docs, loaded on demand

The crawl logic is ported from the Krawlify app's crawler and made standalone — no database, queue, or web framework. Krawlify itself lives at krawlify.com, and the hosted relay this skill talks to by default is https://alpha.krawlify.com.

License

MIT — see LICENSE.

About

Crawl a specific list of pages through a real Chrome — bot checks included — and get an Excel SEO report. Claude Code skill + CLI.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages