Token导航 LogoToken导航

Agent Skill · 研究检索

go-rod-master(走竿大师)

go-rod-master 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

go-rod-master 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 37,435。

总安装 1,738周安装 71GitHub Stars 35,683下载 557核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:go-rod-master(走竿大师)
来源仓库:https://github.com/sickn33/antigravity-awesome-skills
仓库路径:skills/go-rod-master
安装命令:
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill go-rod-master
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill go-rod-master

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息,支持关键词匹配和线索定位。适合在需要快速定位候选结果的任务场景中使用。可结合任务目标提供相关技术资料或代码片段参考。输出结果需人工复核,避免直接依赖工具返回结论。安装前建议确认来源仓库维护状态和权限范围。go-rod-master 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/go-rod-master

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill go-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

go-rod-master 怎么安装?

在终端执行 npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill go-rod-master。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

go-rod-master 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

go-rod-master 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

go-rod-master 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

go-rod-master 用的人多吗?

公开数据是累计安装 1,738 次,近一周安装 71 次,下载 557 次,GitHub 35,683 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

go-rod-master 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 35,683 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
go-rod-master

走竿大师 · 本页

1,73835,683操作浏览器未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Go-Rod Browser Automation Master

Overview

Rod is a high-level Go driver built directly on the Chrome DevTools Protocol for browser automation and web scraping. Unlike wrappers around other tools, Rod communicates with the browser natively via CDP, providing thread-safe operations, chained context design for timeouts/cancellation, auto-wait for elements, correct iframe/shadow DOM handling, and zero zombie browser processes.

The companion library go-rod/stealth injects anti-bot-detection evasions based on puppeteer-extra stealth, hiding headless browser fingerprints from detection systems.

When to Use This Skill

  • Use when the user asks to scrape, automate, or test a website using Go.
  • Use when the user needs a headless browser for dynamic/SPA content (React, Vue, Angular).
  • Use when the user mentions stealth, anti-bot, avoiding detection, Cloudflare, or bot detection bypass.
  • Use when the user wants to work with the Chrome DevTools Protocol (CDP) directly from Go.
  • Use when the user needs to intercept or hijack network requests in a browser context.
  • Use when the user asks about concurrent browser scraping or page pooling in Go.
  • Use when the user is migrating from chromedp or Playwright Go and wants a simpler API.

Safety & Risk

Risk Level: 🔵 Safe

  • Read-Only by Default: Default behavior is navigating and reading page content (scraping/testing).
  • Isolated Contexts: Browser contexts are sandboxed; cookies and storage do not persist unless explicitly saved.
  • Resource Cleanup: Designed around Go's defer pattern — browsers and pages close automatically.
  • No External Mutations: Does not modify external state unless the script explicitly submits forms or POSTs data.

Installation

# Core rod library
go get github.com/go-rod/rod@latest

# Stealth anti-detection plugin (ALWAYS include for production scraping)
go get github.com/go-rod/stealth@latest

Rod auto-downloads a compatible Chromium binary on first run. To pre-download:

go run github.com/nichochar/go-rod.github.io/cmd/launcher@latest

Core Concepts

Browser Lifecycle

Rod manages three layers: Browser → Page → Element.

// Launch and connect to a browser
browser := rod.New().MustConnect()
defer browser.MustClose()

// Create a page (tab)
page := browser.MustPage("https://example.com")

// Find an element
el := page.MustElement("h1")
fmt.Println(el.MustText())

Must vs Error Patterns

Rod provides two API styles for every operation:

StyleMethodUse Case
MustMustElement(), MustClick(), MustText()Scripting, debugging, prototyping. Panics on error.
ErrorElement(), Click(), Text()Production code. Returns error for explicit handling.

Production pattern:

el, err := page.Element("#login-btn")
if err != nil {
    return fmt.Errorf("login button not found: %w", err)
}
if err := el.Click(proto.InputMouseButtonLeft, 1); err != nil {
    return fmt.Errorf("click failed: %w", err)
}

Scripting pattern with Try:

err := rod.Try(func() {
    page.MustElement("#login-btn").MustClick()
})
if errors.Is(err, context.DeadlineExceeded) {
    log.Println("timeout finding login button")
}

Context & Timeout

Rod uses Go's context.Context for cancellation and timeouts. Context propagates recursively to all child operations.

// Set a 5-second timeout for the entire operation chain
page.Timeout(5 * time.Second).
    MustWaitLoad().
    MustElement("title").
    CancelTimeout(). // subsequent calls are not bound by the 5s timeout
    Timeout(30 * time.Second).
    MustText()

Element Selectors

Rod supports multiple selector strategies:

// CSS selector (most common)
page.MustElement("div.content > p.intro")

// CSS selector with text regex matching
page.MustElementR("button", "Submit|Send")

// XPath
page.MustElementX("//div[@class='content']//p")

// Search across iframes and shadow DOM (like DevTools Ctrl+F)
page.MustSearch(".deeply-nested-element")

Auto-Wait

Rod automatically retries element queries until the element appears or the context times out. You do not need manual sleeps:

// This will automatically wait until the element exists
el := page.MustElement("#dynamic-content")

// Wait until the element is stable (position/size not changing)
el.MustWaitStable().MustClick()

// Wait until page has no pending network requests
wait := page.MustWaitRequestIdle()
page.MustElement("#search").MustInput("query")
wait()

Stealth & Anti-Bot Detection (go-rod/stealth)

IMPORTANT: For any production scraping or automation against real websites, ALWAYS use stealth.MustPage() instead of browser.MustPage(). This is the single most important step for avoiding bot detection.

How Stealth Works

The go-rod/stealth package injects JavaScript evasions into every new page that:

  • Remove navigator.webdriver — the primary headless detection signal.
  • Spoof WebGL vendor/renderer — presents real GPU info (e.g., "Intel Inc." / "Intel Iris OpenGL Engine") instead of headless markers like "Google SwiftShader".
  • Fix Chrome plugin array — reports proper PluginArray type with realistic plugin count.
  • Patch permissions API — returns "prompt" instead of bot-revealing values.
  • Set realistic languages — reports en-US,en instead of empty arrays.
  • Fix broken image dimensions — headless browsers report 0x0; stealth fixes this to 16x16.

Usage

Creating a stealth page (recommended for all production use):

import (
    "github.com/go-rod/rod"
    "github.com/go-rod/stealth"
)

browser := rod.New().MustConnect()
defer browser.MustClose()

// Use stealth.MustPage instead of browser.MustPage
page := stealth.MustPage(browser)
page.MustNavigate("https://bot.sannysoft.com")

With error handling:

page, err := stealth.Page(browser)
if err != nil {
    return fmt.Errorf("failed to create stealth page: %w", err)
}
page.MustNavigate("https://example.com")

Using stealth.JS directly (advanced — for custom page creation):

// If you need to create the page yourself (e.g., with specific options),
// inject stealth.JS manually via EvalOnNewDocument
page := browser.MustPage()
page.MustEvalOnNewDocument(stealth.JS)
page.MustNavigate("https://example.com")

Verifying Stealth

Navigate to a bot detection test page to verify evasions:

page := stealth.MustPage(browser)
page.MustNavigate("https://bot.sannysoft.com")
page.MustScreenshot("stealth_test.png")

Expected results for a properly stealth-configured browser:

  • WebDriver: missing (passed)
  • Chrome: present (passed)
  • Plugins Length: 3 (not 0)
  • Languages: en-US,en

Implementation Guidelines

1. Launcher Configuration

Use the launcher package to customize browser launch flags:

import "github.com/go-rod/rod/lib/launcher"

url := launcher.New().
    Headless(true).             // false for debugging
    Proxy("127.0.0.1:8080").    // upstream proxy
    Set("disable-gpu", "").     // custom Chrome flag
    Delete("use-mock-keychain"). // remove a default flag
    MustLaunch()

browser := rod.New().ControlURL(url).MustConnect()
defer browser.MustClose()

Debugging mode (visible browser + slow motion):

l := launcher.New().
    Headless(false).
    Devtools(true)
defer l.Cleanup()

browser := rod.New().
    ControlURL(l.MustLaunch()).
    Trace(true).
    SlowMotion(2 * time.Second).
    MustConnect()

2. Proxy Support

// Set proxy at launch
url := launcher.New().
    Proxy("socks5://127.0.0.1:1080").
    MustLaunch()

browser := rod.New().ControlURL(url).MustConnect()

// Handle proxy authentication
go browser.MustHandleAuth("username", "password")()

// Ignore SSL certificate errors (for MITM proxies)
browser.MustIgnoreCertErrors(true)

3. Input Simulation

import "github.com/go-rod/rod/lib/input"

// Type into an input field (replaces existing value)
page.MustElement("#email").MustInput("user@example.com")

// Simulate keyboard keys
page.Keyboard.MustType(input.Enter)

// Press key combinations
page.Keyboard.MustPress(input.ControlLeft)
page.Keyboard.MustType(input.KeyA)
page.Keyboard.MustRelease(input.ControlLeft)

// Mouse click at coordinates
page.Mouse.MustClick(input.MouseLeft)
page.Mouse.MustMoveTo(100, 200)

4. Network Request Interception (Hijacking)

router := browser.HijackRequests()
defer router.MustStop()

// Block all image requests
router.MustAdd("*.png", func(ctx *rod.Hijack) {
    ctx.Response.Fail(proto.NetworkErrorReasonBlockedByClient)
})

// Modify request headers
router.MustAdd("*api.example.com*", func(ctx *rod.Hijack) {
    ctx.Request.Req().Header.Set("Authorization", "Bearer token123")
    ctx.MustLoadResponse()
})

// Modify response body
router.MustAdd("*.js", func(ctx *rod.Hijack) {
    ctx.MustLoadResponse()
    ctx.Response.SetBody(ctx.Response.Body() + "\n// injected")
})

go router.Run()

5. Waiting Strategies

// Wait for page load event
page.MustWaitLoad()

// Wait for no pending network requests (AJAX idle)
wait := page.MustWaitRequestIdle()
page.MustElement("#search").MustInput("query")
wait()

// Wait for element to be stable (not animating)
page.MustElement(".modal").MustWaitStable().MustClick()

// Wait for element to become invisible
page.MustElement(".loading").MustWaitInvisible()

// Wait for JavaScript condition
page.MustWait(`() => document.title === 'Ready'`)

// Wait for specific navigation/event
wait := page.WaitEvent(&proto.PageLoadEventFired{})
page.MustNavigate("https://example.com")
wait()

6. Race Selectors (Multiple Outcomes)

Handle pages where the result can be one of several outcomes (e.g., login success vs error):

page.MustElement("#username").MustInput("user")
page.MustElement("#password").MustInput("pass").MustType(input.Enter)

// Race between success and error selectors
elm := page.Race().
    Element(".dashboard").MustHandle(func(e *rod.Element) {
        fmt.Println("Login successful:", e.MustText())
    }).
    Element(".error-message").MustDo()

if elm.MustMatches(".error-message") {
    log.Fatal("Login failed:", elm.MustText())
}

7. Screenshots & PDF

// Full-page screenshot
page.MustScreenshot("page.png")

// Custom screenshot (JPEG, specific region)
img, _ := page.Screenshot(true, &proto.PageCaptureScreenshot{
    Format:  proto.PageCaptureScreenshotFormatJpeg,
    Quality: gson.Int(90),
    Clip: &proto.PageViewport{
        X: 0, Y: 0, Width: 1280, Height: 800, Scale: 1,
    },
})
utils.OutputFile("screenshot.jpg", img)

// Scroll screenshot (captures full scrollable page)
img, _ := page.MustWaitStable().ScrollScreenshot(nil)
utils.OutputFile("full_page.jpg", img)

// PDF export
page.MustPDF("output.pdf")

8. Concurrent Page Pool

pool := rod.NewPagePool(5) // max 5 concurrent pages

create := func() *rod.Page {
    return browser.MustIncognito().MustPage()
}

var wg sync.WaitGroup
for _, url := range urls {
    wg.Add(1)
    go func(u string) {
        defer wg.Done()

        page := pool.MustGet(create)
        defer pool.Put(page)

        page.MustNavigate(u).MustWaitLoad()
        fmt.Println(page.MustInfo().Title)
    }(url)
}
wg.Wait()

pool.Cleanup(func(p *rod.Page) { p.MustClose() })

9. Event Handling

// Listen for console.log output
go page.EachEvent(func(e *proto.RuntimeConsoleAPICalled) {
    if e.Type == proto.RuntimeConsoleAPICalledTypeLog {
        fmt.Println(page.MustObjectsToJSON(e.Args))
    }
})()

// Wait for a specific event before proceeding
wait := page.WaitEvent(&proto.PageLoadEventFired{})
page.MustNavigate("https://example.com")
wait()

10. File Download

wait := browser.MustWaitDownload()

page.MustElementR("a", "Download PDF").MustClick()

data := wait()
utils.OutputFile("downloaded.pdf", data)

11. JavaScript Evaluation

// Execute JS on the page
page.MustEval(`() => console.log("hello")`)

// Pass parameters and get return value
result := page.MustEval(`(a, b) => a + b`, 1, 2)
fmt.Println(result.Int()) // 3

// Eval on a specific element ("this" = the DOM element)
title := page.MustElement("title").MustEval(`() => this.innerText`).String()

// Direct CDP calls for features Rod doesn't wrap
proto.PageSetAdBlockingEnabled{Enabled: true}.Call(page)

12. Loading Chrome Extensions

extPath, _ := filepath.Abs("./my-extension")

u := launcher.New().
    Set("load-extension", extPath).
    Headless(false). // extensions require headed mode
    MustLaunch()

browser := rod.New().ControlURL(u).MustConnect()

Examples

See the examples/ directory for complete, runnable Go files:

  • examples/basic_scrape.go — Minimal scraping example
  • examples/stealth_page.go — Anti-detection with go-rod/stealth
  • examples/request_hijacking.go — Intercepting and modifying network requests
  • examples/concurrent_pages.go — Page pool for concurrent scraping

Best Practices

  • ✅ ALWAYS use stealth.MustPage(browser) instead of browser.MustPage() for real-world sites.
  • ✅ ALWAYS defer browser.MustClose() immediately after connecting.
  • ✅ Use the error-returning API (not Must*) in production code.
  • ✅ Set explicit timeouts with .Timeout() — never rely on defaults for production.
  • ✅ Use browser.MustIncognito().MustPage() for isolated sessions.
  • ✅ Use PagePool for concurrent scraping instead of spawning unlimited pages.
  • ✅ Use MustWaitStable() before clicking elements that might be animating.
  • ✅ Use MustWaitRequestIdle() after actions that trigger AJAX calls.
  • ✅ Use launcher.New().Headless(false).Devtools(true) for debugging.
  • ❌ NEVER use time.Sleep() for waiting — use Rod's built-in wait methods.
  • ❌ NEVER create a new Browser per task — create one Browser, use multiple Page instances.
  • ❌ NEVER use browser.MustPage() for production scraping — use stealth.MustPage().
  • ❌ NEVER ignore errors in production — always handle them explicitly.
  • ❌ NEVER forget to defer-close browsers, pages, and hijack routers.

Common Pitfalls

  • Problem: Element not found even though it exists on the page. Solution: The element may be inside an iframe or shadow DOM. Use page.MustSearch() instead of page.MustElement() — it searches across all iframes and shadow DOMs.
  • Problem: Click doesn't work because the element is animating. Solution: Call el.MustWaitStable() before el.MustClick().
  • Problem: Bot detection despite using stealth. Solution: Combine stealth.MustPage() with: randomized viewport sizes, realistic User-Agent strings, human-like input delays between keystrokes, and random idle behaviors (scroll, hover).
  • Problem: Browser process leaks (zombie processes). Solution: Always defer browser.MustClose(). Rod uses leakless to kill zombies after main process crash, but explicit cleanup is preferred.
  • Problem: Timeout errors on slow pages. Solution: Use chained context: page.Timeout(30 * time.Second).MustWaitLoad(). For AJAX-heavy pages, use MustWaitRequestIdle() instead of MustWaitLoad().
  • Problem: HijackRequests router not intercepting requests. Solution: You must call go router.Run() after setting up routes, and defer router.MustStop() for cleanup.

Limitations

  • CAPTCHAs: Rod does not include CAPTCHA solving. External services (2captcha, etc.) must be integrated separately.
  • Extreme Anti-Bot: While go-rod/stealth handles common detection (WebDriver, plugin fingerprints, WebGL), extremely strict systems (some Cloudflare configurations, Akamai Bot Manager) may still detect automation. Additional measures (residential proxies, human-like behavioral patterns) may be needed.
  • DRM Content: Cannot interact with DRM-protected media (e.g., Widevine).
  • Resource Usage: Each browser instance consumes significant RAM (~100-300MB+). Use PagePool and limit concurrency on memory-constrained systems.
  • Extensions in Headless: Chrome extensions do not work in headless mode. Use Headless(false) with XVFB for server environments.
  • Platform: Requires a Chromium-compatible browser. Does not support Firefox or Safari.

Documentation References

平台分布

Codex

32.59%
按下载量换算182

Claude

31.85%
按下载量换算177

Cursor

17.09%
按下载量换算95

Gemini CLI

9.7%
按下载量换算54

安全审计

Gen Agent Trust Hub

可疑

Socket

未通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills