agentleFS
bettyguobettyguo/browser-skills/skills/dismiss-newsletter-popup/SKILL.md

dismiss-newsletter-popup

Skill8 starsChanged 7 months agoMITView on GitHub

Dismisses newsletter / "subscribe" / "sign up for emails" popups that appear after a short delay or scroll trigger on content sites.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a few seconds on a content site (news, blogs, retail), a popup appears offering a newsletter signup.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

Dismiss Newsletter Popup

When to invoke

After a few seconds on a content site (news, blogs, retail), a popup appears offering a newsletter signup. The dismiss controls are typically: a small "x" in the corner, a "no thanks" link, or pressing Escape.

The matcher fires this skill when the DOM contains a newsletter marker and the page is not in initial-load (these popups typically appear after a delay).

Recipe

  1. wait_for_dom_ready timeout=2s
  2. wait extra=200ms
  3. try_each selectors=[ "[class*='newsletter' i] button[aria-label*='close' i]", "[id*='newsletter' i] button[aria-label*='close' i]", "[class*='subscribe' i] button[aria-label*='close' i]", "[class*='newsletter' i] button:has-text('No thanks')", "[class*='subscribe' i] button:has-text('No thanks')", "[class*='newsletter' i] button:has-text('Maybe later')", "button.newsletter-dismiss", "button.email-signup-close", "[data-testid*='newsletter-close']", "[data-testid*='email-signup-close']", ] action=click on_success=stop timeout=1000ms
  4. press_key key=Escape

Success criteria

  • assert no_visible_element selector="[class*='newsletter' i][role='dialog']" OR no_change_was_needed

When NOT to use

  • The user explicitly wants to subscribe — don't auto-dismiss.

Known failures

  • Popups that block scroll until interacted with: Escape doesn't always close them; the close button is small and unlabeled. Vision fallback for these.
  • Popups inside cross-origin iframes: can't be clicked through Playwright's default context.
  • Multiple newsletter popups stacked: v0.1 dismisses one; agent re-invokes for the next.

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.