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.
In this repository14 other files it gives its agents.
- date-picker-widgetSkill
- detect-captchaSkill
- dismiss-cookie-bannerSkill
- exit-tracking-popupSkill
- extract-table-paginationSkill
- fill-multi-step-formSkill
- handle-infinite-scrollSkill
- handle-modal-dialogSkill
- login-flowSkill
- pagination-next-pageSkill
- searchable-dropdownSkill
- search-and-filterSkill
- upload-download-fileSkill
- verify-page-loadedSkill
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
- Distinctive: line 28
After a few seconds on a content site (news, blogs, retail), a popup appears offering a newsletter signup.
≈ “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.
Files
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
- wait_for_dom_ready timeout=2s
- wait extra=200ms
- 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
- 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.
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
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.

