agentleFS
bettyguobettyguo/browser-skills/skills/verify-page-loaded/SKILL.md

verify-page-loaded

Skill8 starsChanged 7 months agoMITView on GitHub

Confirms that the current page has finished loading and is ready for interaction. Detects loading spinners, skeleton screens, and content placeholders. Run before extraction skills.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After any navigation, and after any interaction that may have triggered new content (clicking pagination, expanding a section, submitting a …

    line 30
  2. Very specific:

    Sites that block until consent is given: if a cookie banner is also blocking, run dismiss-cookie-banner first.

    line 59

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

Verify Page Loaded

When to invoke

After any navigation, and after any interaction that may have triggered new content (clicking pagination, expanding a section, submitting a form). Especially important before extraction skills — extracting from a half-rendered DOM produces incomplete results.

This skill is vision-forbidden (max_vision_calls: 0). If the deterministic checks fail, the skill returns failed and the agent knows the page is genuinely not ready — vision wouldn't help.

Recipe

  1. wait_for_dom_ready timeout=10s
  2. wait_for_selector selector="body" state=visible timeout=2s
  3. wait extra=200ms
  4. assert no_visible_element selector="[aria-busy='true']" timeout=3s
  5. assert no_visible_element selector=".loading, .spinner, [class*='skeleton']" timeout=3s

Success criteria

  • assert dom_ready
  • assert no_visible_element selector="[aria-busy='true']"
  • assert main_content_present

The main_content_present assertion checks for one of: <main>, [role=main], <article>, or a body height > 200px (heuristic for "something rendered").

When NOT to use

  • On pages that legitimately stay in a loading state (live dashboards, video-call interfaces, etc.). Use a custom skill or rely on agent reasoning.
  • Inside an extraction loop where the page is the same as before; this skill assumes a fresh state.

Known failures

  • Single-page apps with no DOMContentLoaded signal change: rare but happens with React/Vue apps that use shadow DOM heavily. Falls back to the spinner-absence check.
  • Pages with always-present skeleton-style classes: some design systems use .skeleton for normal layout elements, not loading. Authors can override the recipe to remove step 5.
  • Sites that block until consent is given: if a cookie banner is also blocking, run dismiss-cookie-banner first.

Example usage

Agent task: "Get the latest cs.AI papers from arxiv."
→ matcher selects [verify-page-loaded, extract-table-pagination]
→ invoke_skill("verify-page-loaded") → success in 89ms, deterministic_path=true
→ invoke_skill("extract-table-pagination") proceeds against a fully-rendered page

Related skills

  • dismiss-cookie-banner — usually precedes this skill
  • extract-table-pagination — usually follows this skill
  • handle-infinite-scroll — uses similar primitives but with a different success criterion

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.