chrome-automation▌
zc277584121/marketing-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Automate browser tasks in the user's real Chrome session via the agent-browser CLI.
Skill: Chrome Automation (agent-browser)
Automate browser tasks in the user's real Chrome session via the agent-browser CLI.
Prerequisite: agent-browser must be installed and Chrome must have remote debugging enabled. See
references/agent-browser-setup.mdif unsure.
Core Principle: Reuse the User's Existing Chrome
This skill operates on a single Chrome process — the user's real browser. There is no session management, no separate profiles, no launching a fresh Playwright browser.
Always Start by Listing Tabs
Before opening any new page, always list existing tabs first:
agent-browser --auto-connect tab list
This returns all open tabs with their index numbers, titles, and URLs. Check if the page you need is already open:
- If the target page is already open → switch to that tab directly instead of opening a new one. The user likely has it open because they are already logged in and the page is in the right state.
agent-browser --auto-connect tab <index> - If the target page is NOT open → open it in the current tab or a new tab.
agent-browser --auto-connect open <url>
Why This Matters
- The user's Chrome has their cookies, login sessions, and browser state
- Opening a new page when one is already available wastes time and may lose login state
- Many marketing platforms (social media dashboards, ad managers, CMS tools) require login — reusing an existing logged-in tab avoids re-authentication
Connection
Always use --auto-connect to connect to the user's running Chrome instance:
agent-browser --auto-connect <command>
This auto-discovers Chrome with remote debugging enabled. If connection fails, guide the user through enabling remote debugging (see references/agent-browser-setup.md).
Common Workflows
1. Navigate and Interact
# List tabs to find existing pages
agent-browser --auto-connect tab list
# Switch to an existing tab (if found)
agent-browser --auto-connect tab <index>
# Or open a new page
agent-browser --auto-connect open https://example.com
agent-browser --auto-connect wait --load networkidle
# Take a snapshot to see interactive elements
agent-browser --auto-connect snapshot -i
# Click, fill, etc.
agent-browser --auto-connect click @e3
agent-browser --auto-connect fill @e5 "some text"
2. Extract Data from a Page
# Get all text content
agent-browser --auto-connect get text body
# Take a screenshot for visual inspection
agent-browser --auto-connect screenshot
# Execute JavaScript for structured data
agent-browser --auto-connect eval "JSON.stringify(document.querySelectorAll('table tr').length)"
3. Replay a Chrome DevTools Recording
The user may provide a recording exported from Chrome DevTools Recorder (JSON, Puppeteer JS, or @puppeteer/replay JS format). See Replaying Recordings below.
Step-by-Step Interaction Guide
Taking Snapshots
Use snapshot -i to see all interactive elements with refs (@e1, @e2, ...):
agent-browser --auto-connect snapshot -i
The output lists each interactive element with its role, text, and ref. Use these refs for subsequent actions.
Step Type Mapping
| Action | Command |
|---|---|
| Navigate | agent-browser --auto-connect open <url> (optionally wait --load networkidle, but some sites like Reddit never reach networkidle — skip if open already shows the page title) |
| Click | snapshot -i → find ref → click @eN |
| Fill standard input | click @eN → fill @eN "text" |
| Fill rich text editor | click @eN → keyboard inserttext "text" |
| Press key | press <key> (Enter, Tab, Escape, etc.) |
| Scroll | scroll down <amount> or scroll up <amount> |
| Wait for element | wait @eN or wait "<css-selector>" |
| Screenshot | screenshot or screenshot --annotate |
| Get page text | get text body |
| Get current URL | get url |
| Run JavaScript | eval <js> |
How to Distinguish Input Types
- Standard input/textarea → use
fill - Contenteditable div / rich text editor (LinkedIn message box, Gmail compose, Slack, CMS editors) → click/focus first, then use
keyboard inserttext
Ref Lifecycle
Refs (@e1, @e2, ...) are invalidated when the page changes. Always re-snapshot after:
- Clicking links or buttons that trigger navigation
- Submitting forms
- Triggering dynamic content loads (AJAX, SPA navigation)
Verification
After each significant action, verify the result:
agent-browser --auto-connect snapshot -i # check interactive state
agent-browser --auto-connect screenshot # visual verification
Replaying Recordings
Accepted Formats
-
JSON (recommended) — structured, can be read progressively:
# Count steps jq '.steps | length' recording.json # Read first 5 steps jq '.steps[0:5]' recording.json -
@puppeteer/replay JS (
import { createRunner }) -
Puppeteer JS (
require('puppeteer'),page.goto,Locator.race)
How to Replay
- Parse the recording — understand the full intent before acting. Summarize what the recording does.
- List tabs first — check if the target page is already open.
- Navigate — execute
navigatesteps, reusing existing tabs when possible. - For each interaction step:
- Take a snapshot (
snapshot -i) to see current interactive elements - Match the recording's
aria/...selectors against the snapshot - Fall back to
text/..., then CSS class hints, then screenshot - Do not rely on ember IDs, numeric IDs, or exact XPaths — these change every page load
- Take a snapshot (
- Verify after each step — snapshot or screenshot to confirm
Iframe-Heavy Sites
snapshot -i operates on the main frame only and cannot penetrate iframes. Sites like LinkedIn, Gmail, and embedded editors render content inside iframes.
Detecting Iframe Issues
snapshot -ireturns unexpectedly short or empty results- Recording references elements not appearing in snapshot output
get text bodycontent doesn't match what a screenshot shows
Workarounds
-
Use
evalto access iframe content:agent-browser --auto-connect eval --stdin <<'EVALEOF' const frame = document.querySelector('iframe[data-testid="interop-iframe"]'); const doc = frame.contentDocument; const btn = doc.querySelector('button[aria-label="Send"]'); btn.click(); EVALEOFNote: Only works for same-origin iframes.
-
Use
keyboardfor blind input: If the iframe element has focus,keyboard inserttext "..."sends text regardless of frame boundaries. -
Use
get text bodyto read full page content including iframes. -
Use
screenshotfor visual verification when snapshot is unreliable.
When to Ask the User
If workarounds fail after 2 attempts on the same step, pause and explain:
- The page uses iframes that cannot be accessed via snapshot
- Which element you need and what you expected
- Ask the user to perform that step manually, then continue
Handling Unexpected Situations
Handle Automatically (do not stop):
- Popups or banners → dismiss them (
find text "Dismiss" clickorfind text "Close" click) - Cookie consent dialogs → accept or dismiss
- Tooltip overlays → close them first
- Element not in snapshot → try
find text "..." click, or scroll to reveal withscroll down 300
Pause and Ask the User:
- Login / authentication is required
- A CAPTCHA appears
- Page structure is completely different from expected
- A destructive action is about to happen (deleting data, sending real content) — confirm first
- Stuck for more than 2 attempts on the same step
- All iframe workarounds have failed
When pausing, explain clearly: what step you are on, what you expected, and what you see.
Key Commands Reference
| Command | Description |
|---|---|
tab list |
List all open tabs with index, title, and URL |
tab <index> |
Switch to an existing tab by index |
tab new |
Open a new empty tab |
tab close |
Close the current tab |
open <url> |
Navigate to URL |
snapshot -i |
List interactive elements with refs |
click @eN |
Click element by ref |
fill @eN "text" |
Clear and fill standard input/textarea |
type @eN "text" |
Type without clearing |
keyboard inserttext "text" |
Insert text (best for contenteditable) |
press <key> |
Press keyboard key |
scroll down/up <amount> |
Scroll page in pixels |
wait @eN |
Wait for element to appear |
wait --load networkidle |
Wait for network to settle |
wait <ms> |
Wait for a duration |
screenshot [path] |
Take screenshot |
screenshot --annotate |
Screenshot with numbered labels |
eval <js> |
Execute JavaScript in page |
get text body |
Get all text content |
get url |
Get current URL |
set viewport <w> <h> |
Set viewport size |
find text "..." click |
Semantic find and click |
close |
Close browser session |
Known Limitations
- Iframe blindness:
snapshot -icannot see inside iframes. See Iframe-Heavy Sites. find textstrict mode: Fails when multiple elements match. Usesnapshot -ito locate the specific ref instead.fillvs contenteditable:fillonly works on<input>and<textarea>. For rich text editors, usekeyboard inserttext.evalis main-frame only: To interact with iframe content, traverse viadocument.querySelector('iframe').contentDocument...
Multi-Platform Operations
When the user requests an action across multiple platforms (e.g., "publish this article to Dev.to, LinkedIn, and X"), do NOT attempt all platforms in a single conversation. Instead, launch sequential Agent subagents, one per platform.
Why Subagents
Each platform operation consumes ~25-40K tokens (reference file + snapshots + interactions). Running 3-5 platforms in one context risks hitting the 200K token limit and degrading late-platform accuracy. Each subagent gets its own fresh 200K context window.
How to Execute
- Prepare the content — confirm the post text, title, tags, and any platform-specific adaptations with the user.
- For each platform, launch a
general-purposeAgent subagent with a prompt that includes:- The full content to publish
- Instructions to read the relevant reference file (e.g.,
Read /path/to/skills/chrome-automation/references/x.md) - Instructions to read the agent-browser skill file for command reference
- The specific task (post, comment, reply, etc.)
- Any platform-specific instructions (e.g., "use these hashtags on LinkedIn")
- Run subagents sequentially (one at a time), because they all share the same Chrome browser via
--auto-connect. Parallel subagents would cause tab conflicts. - After each subagent completes, report the result to the user before launching the next one.
Prompt Template for Subagents
You are automating a browser task on [PLATFORM].
First, read these files for context:
- /absolute/path/to/skills/chrome-automation/references/[platform].md
- /absolute/path/to/.claude/skills/agent-browser/SKILL.md (agent-browser command reference)
Then connect to the user's Chrome browser using `agent-browser --auto-connect` and perform the following task:
[TASK DESCRIPTION]
Content to publish:
[CONTENT]
Important:
- Always list tabs first (`tab list`) and reuse existing logged-in tabs
- Re-snapshot after every navigation or action
- Confirm with the user before submitting/publishing (destructive action)
- If login is required or a CAPTCHA appears, stop and explain
When NOT to Use Subagents
- Single platform — just do it directly in the current conversation.
- Read-only tasks (browsing, searching, extracting data) — context usage is lighter; a single conversation can handle 2-3 platforms.
Platform References
When automating tasks on specific platforms, consult the relevant reference document for page structure details, common operations, and known quirks:
| Platform | Reference | Key Notes |
|---|---|---|
references/reddit.md |
Custom faceplate-* components; networkidle never reached; unlabeled comment textbox; find text fails due to duplicate elements |
|
| X (Twitter) | references/x.md |
open often times out (use tab list to reuse existing tabs); click timestamp for post detail (not username); DraftJS contenteditable input (data-testid="tweetTextarea_0"); avoid networkidle |
references/linkedin.md |
Ember.js SPA; Enter submits comments (use Shift+Enter for newlines); comment box and compose box share the same label; avoid networkidle; messaging overlay may block content |
|
| Dev.to | references/devto.md |
Fast server-rendered HTML (Forem/Rails); standard <textarea> for comments/posts (Markdown); 5 reaction types; Algolia-powered search; networkidle works normally |
| Hacker News | references/hackernews.md |
Minimal plain HTML; all form fields are unlabeled; link "reply" navigates to separate page; networkidle works instantly; rate limiting on posts/comments |
For installation and Chrome setup instructions, see
references/agent-browser-setup.md.
How to use chrome-automation on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add chrome-automation
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches chrome-automation from GitHub repository zc277584121/marketing-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate chrome-automation. Access the skill through slash commands (e.g., /chrome-automation) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★48 reviews- ★★★★★Xiao Torres· Dec 12, 2024
Useful defaults in chrome-automation — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Pratham Ware· Dec 4, 2024
chrome-automation is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Noah Thomas· Dec 4, 2024
Keeps context tight: chrome-automation is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Yash Thakker· Nov 23, 2024
Keeps context tight: chrome-automation is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Xiao Flores· Nov 23, 2024
chrome-automation is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Noah Anderson· Nov 3, 2024
chrome-automation has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Noah Huang· Oct 22, 2024
Keeps context tight: chrome-automation is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Dhruvi Jain· Oct 14, 2024
chrome-automation has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Min Iyer· Oct 14, 2024
Useful defaults in chrome-automation — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Oshnikdeep· Sep 21, 2024
Solid pick for teams standardizing on skills: chrome-automation is focused, and the summary matches what you get after install.
showing 1-10 of 48