agentleFS
ray5273ray5273/kr-research-kit/skills/kr-web-browse/SKILL.md

kr-web-browse

Skill2 starsChanged 8 days agoMITView on GitHub

Headless browser wrapper for generic (non-Naver) Korean-facing web pages. Use when another skill needs to fetch an arbitrary HTML page's text or links, or download a binary file (PDF) from a public URL. Wraps the skill-local gstack `browse` binary from `kr-naver-browse` and adds a Node-stdlib `https` downloader with redirect handling. Do not use for Naver blog or Naver search pages — use `kr-naver-browse` instead because it knows Naver's PostView iframe layout.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not use this skill for:

    line 24
  2. Distinctive:

    Fail loud: if the browse binary cannot be resolved.

    line 54

≈ “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

Generic Web Browser

Reusable headless browser helpers for generic non-Naver web pages. Used by kr-analyst-report-discover (Hankyung Consensus list pages, Naver Finance research list pages) and kr-analyst-report-fetch (direct PDF download).

This skill reuses the gstack browse binary vendored under kr-naver-browse/vendor/gstack/ rather than vendoring its own copy — we do not want two gstack builds fighting over the same BROWSE_STATE_FILE. Install kr-naver-browse first so the binary exists, then install this skill.

When To Use

  • Another skill needs to fetch the rendered text of a public web page that is not on Naver.
  • Another skill needs to extract anchor links from a public web page.
  • Another skill needs to download a direct PDF URL to disk.

Do not use this skill for:

  • Naver blog, Naver search, Naver PostView / PostList pages. Those need Naver-specific URL rewrites — use kr-naver-browse.
  • Pages that require authentication or cookies. v1 does not support cookie jars. If a fetch returns a login wall, treat the page as unavailable.

Exports

scripts/browse-web.js exposes (Node stdlib only, no npm):

ExportWhat it does
resolveBrowseBinary()Locates the gstack browse binary via the same resolver kr-naver-browse uses ($GSTACK_BROWSE_BIN, skill-local vendor dir, $CLAUDE_HOME/$CODEX_HOME install dir). Throws if none found.
browseText(url, opts)Runs goto, wait --load, text; returns trimmed text or null if extraction was empty after one retry.
browseLinks(url, opts)Same shape as browseText but for the links command. Returns "text → url" lines.
downloadFile(url, destPath, opts)Pure Node https.get download with up-to-5 redirects and gzip/deflate handling. Writes to destPath. Does NOT use the browse binary.

opts supports { timeoutMs, verbose }. downloadFile adds { maxRedirects, headers }.

Operating Rules

  1. Enforce the 1-second inter-request delay between browseText / browseLinks calls. The gstack binary is shared with kr-naver-browse and both skills agree on the delay.
  2. Download PDFs via Node https, not via the browse binary. Headless Chromium cannot reliably stream binary content back to stdout. Use downloadFile for direct .pdf URLs.
  3. Never use this module for Naver URLs. There is no URL rewriter here — Naver's desktop PostView routes will return empty.
  4. Fail loud if the browse binary cannot be resolved. Do not fall back to a generic fetch library — the skill chain expects rendered text from a headless browser.
  5. Do not persist cookies. v1 treats every request as anonymous. A gated page should be recorded upstream as requiresAuth: true and skipped.

Invocation

This skill is not meant to be invoked directly. Other skills require it:

const { browseText, downloadFile } = require(
  "../../kr-web-browse/scripts/browse-web.js"
);

const html = browseText("https://consensus.hankyung.com/...");
downloadFile("https://.../report.pdf", "./tmp/report.pdf");

A smoke test is available:

node skills/kr-web-browse/scripts/browse-web.js --test

It will fetch https://example.com via the browse binary and download a small public file to verify the binary + downloader both work.

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.