AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Handle Modal Dialog

skill-bettyguo-browser-skills-handle-modal-dialog · by bettyguo

Detects and dismisses blocking modal dialogs (generic confirmations, "are you sure", interstitials, signed-out prompts). Sibling to dismiss-newsletter-popup and dismiss-cookie-banner.

No reviews yet
0 installs
20 views
0.0% view→install

Install

$ agentstack add skill-bettyguo-browser-skills-handle-modal-dialog

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-bettyguo-browser-skills-handle-modal-dialog)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Handle Modal Dialog? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Handle Modal Dialog

When to invoke

A generic catch-all for blocking dialogs that aren't specifically cookie banners or newsletter popups: e.g., a "Continue without saving?" confirmation, an "Are you 13+?" age gate prompt that's not blocking-blocking, a "Choose your region" modal, an "App available — open in app?" interstitial.

The matcher scores this skill highly when the DOM contains role="dialog" or aria-modal="true" AND no cookie-banner / newsletter-popup-specific markers are present (otherwise the more specific skills win).

This skill defaults to "dismiss" — it clicks the close button or the "no thanks" / "stay on web" / "not now" path. If the user task requires accepting the dialog, the agent should not invoke this skill.

Recipe

  1. waitfordom_ready timeout=2s
  2. wait extra=200ms
  3. try_each selectors=[

"[role='dialog'] button[aria-label='close' i]", "[role='dialog'] button[aria-label='dismiss' i]", "[aria-modal='true'] button[aria-label*='close' i]", "button.modal-close", ".modal button:has-text('Close')", ".modal button:has-text('No thanks')", ".modal button:has-text('Not now')", ".modal button:has-text('Stay on web')", ".modal button:has-text('Maybe later')", "[role='dialog'] button:has-text('Cancel')", ".modal button.btn-close", "button[data-dismiss='modal']", "button[data-bs-dismiss='modal']", ] action=click on_success=stop timeout=1500ms

  1. wait extra=300ms

Success criteria

  • assert novisibleelement selector="[role='dialog'][aria-modal='true']" OR nochangewas_needed

When NOT to use

  • The user task is interacting with the modal (filling a quick form, selecting a region, confirming an action). Don't dismiss what the user wants to engage.
  • A login modal — use login-flow instead.
  • A cookie banner that happens to use role="dialog"dismiss-cookie-banner is more specific and runs first per matcher ordering.

Known failures

  • Modals without ARIA semantics (~10% of legacy sites): sites that use plain ` overlays without role="dialog" won't match the markers. Vision fallback or a follow-on exit-tracking-popup`-style skill handles.
  • Modals with intercept-everything backdrops: dismissing the modal via Escape key would work but isn't implemented in v0.1; add keypress primitive in v0.2.
  • Bootstrap 4 vs Bootstrap 5 attribute drift: data-dismiss (BS4) vs data-bs-dismiss (BS5). Both selectors above; one will match.
  • Cascading modals (one closes, another appears): v0.1 dismisses one and returns; the agent must re-invoke if the next state has another modal.

Example usage

Agent task: "Get me the cheapest flight on this page."
→ matcher sees a "We've detected you're outside the US — go to region site?" modal
→ invoke_skill("handle-modal-dialog") → success, "Stay on web" clicked
→ agent continues with the original task

Related skills

  • dismiss-cookie-banner — more specific; runs first when both apply
  • dismiss-newsletter-popup — more specific; runs first when both apply
  • exit-tracking-popup — for "Wait, before you go!" exit-intent dialogs

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.