Token导航 LogoToken导航

Agent Skill · 研究检索

gathering-context(收集背景)

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

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

总安装 242周安装 10GitHub Stars 4下载 79核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/klamping/webdriverio-skills --skill gathering-context

这个 Skill 是做什么的

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

gathering-context 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。它支持通过关键词、任务场景或来源线索进行信息检索与筛选,适用于研究类工作流。

可通过 npx skills add 命令从 GitHub 仓库安装,具体用法请参考原始 README。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/gathering-context

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

gathering-context 怎么安装?

在终端执行 npx skills add https://github.com/klamping/webdriverio-skills --skill gathering-context。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gathering-context 支持哪些 AI 工具?

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

gathering-context 需要什么权限?

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

gathering-context 是免费的吗?

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

gathering-context 用的人多吗?

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

gathering-context 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

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

适不适合你

更适合

  • 已经在用 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调用外部服务未明确有提醒
gathering-context

收集背景 · 本页

2424操作浏览器未明确未通过

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

SKILL.md 原文

Context Gatherer

Reads all available artifacts for a failing WebdriverIO test and returns a structured markdown summary. Called by the Investigator agent — does not diagnose or fix, only gathers and organizes evidence.

Inputs

The Investigator passes a structured failure object:

- testName: string        # The it() / describe() title
- specFile: string        # Relative path to the spec file
- errorMessage: string    # The assertion or exception message
- stackTrace: string      # Full stack trace
- logFile?: string        # Optional: path to wdio log file
- snapshotDir?: string    # Optional: dir where HTML/screenshots/video are saved

Project Context Files

Before scanning from scratch, read project cache files when available:

  • .webdriverio-skills/project-context.md
  • .webdriverio-skills/project-context.json
  • .webdriverio-skills/custom-rules.md
  • references/website-analysis/<target>/website-analysis.md
  • references/website-analysis/<target>/website-analysis.json

Use cached reporter, service, artifact, and environment details to narrow discovery work.

If files are missing or stale, run managing-project-customizations first.

Target Resolution Rule

When reading references/website-analysis/<target>/..., resolve <target> as:

  • lowercase site host from the test URL/baseUrl (e.g. demo.learnwebdriverio.com)
  • if host is unknown, use unknown-target and continue without blocking

Workflow

Step 1 — Locate Artifacts

Use cached context first, then read wdio.conf.js (or discovered WDIO config files) to resolve:

  • Reporters — which are configured (e.g. allure, junit, spec) and their output directories. Note artifact paths; do not parse report formats.
  • Log paths — where WDIO writes its log output.
  • Snapshot directories — where screenshots and HTML snapshots are saved on failure (often configured in afterTest hook via browser.saveScreenshot() and browser.savePDF() / page source capture).
  • Video — if a video service (e.g. wdio-video-reporter) is configured, note the output path.
  • Services — list all configured services. Flag any in these categories as a potential failure dimension for the Investigator:
Service typeWhy it matters
Visual regression (e.g. wdio-image-comparison-service)Failure may be a visual diff, not a selector or logic issue
Mobile / AppiumElement interaction differs from browser; gestures, native contexts
Cloud providers (BrowserStack, Sauce, LambdaTest)Session timeouts, capability mismatches, remote-specific failures
selenium-standalone / chromedriverDriver version mismatch can cause unexpected command failures

If snapshotDir or logFile were provided in the failure object, use those directly and skip discovery for those paths.

Step 2 — Read the Spec File

Open specFile and:

  1. Extract the full body of the it() block matching testName
  2. Identify all enclosing describe() blocks (tests can be nested — outer describe hooks apply)
  3. Identify all Mocha hooks in scope: before, beforeEach, after, afterEach at every nesting level — these run around the failing test and may be relevant
  4. Note all import / require statements — these reveal page object dependencies to traverse in Step 3

If website analysis references exist, use them to quickly map the failing test to:

  • likely section/component ownership
  • expected critical states for the area
  • known auth-gated routes or dependencies

Mocha structure to understand:

  • describe() blocks scope hooks and can be nested arbitrarily deep
  • before / after run once per describe block
  • beforeEach / afterEach run around every it() in their scope
  • All hooks from all enclosing describe levels apply to any given it()

Step 3 — Traverse Page Object Dependencies

Starting from the imports found in Step 2, recursively follow all import / require statements.

For each page object class found:

  • Extract method names and their implementations
  • Note every WebdriverIO command used (see Command Reference below)
  • Extract every selector passed to $() or $$() — these are CSS or XPath strings that map directly to DOM elements

Page Object pattern: Page objects are JavaScript classes that encapsulate selectors and interactions. A method like async clickSubmit() wraps await this.submitBtn.click() where submitBtn is defined as get submitBtn() {return $('#submit-btn')}. Understanding this chain — method → command → selector → DOM element — is essential for correlating failures with HTML snapshots.

Continue recursing until all transitive imports are read. Cross-reference selectors from page objects with the HTML snapshots in Step 5.

Step 4 — Search for Custom Commands

Search the codebase for addCommand to find all custom command definitions.

For each custom command found:

  • Note whether it's registered on browser or element
  • Read its full implementation
  • If a custom command appears in the failing test or any page object method, treat it as a first-class suspect — read it completely

Custom commands do not appear as named entries in WDIO logs. You will see only the underlying native commands they delegate to. To understand what a custom command was doing at failure time, cross-reference the native command sequence in the logs with the custom command's implementation.

If a custom command calls another custom command, follow the chain completely.

Step 5 — Read Logs

Open the log file (from logFile input or discovered in Step 1).

Filter to lines associated with the failing test. WDIO logs include:

  • COMMAND <method> <endpoint> — a native browser command being sent
  • DATA <payload> — the command's parameters
  • RESULT <value> — the response from the driver

Match the log's command sequence against the WebdriverIO commands in the spec and page objects to reconstruct what actually executed at runtime. Look for the last successful command before the error appears.

Step 6 — Collect HTML Snapshots

If HTML snapshots exist in the snapshot directory:

  1. Load them in filename / timestamp order — earlier snapshots show DOM state before the failure
  2. For the failure-time snapshot: check whether selectors from page objects are present in the HTML, have the expected attributes, text, and state
  3. CSS selectors can be matched structurally against the HTML. XPath requires understanding document hierarchy.
  4. Note any elements that are absent, hidden (display:none, visibility:hidden, aria-hidden), disabled, or have unexpected attribute values

Step 7 — Collect Visual Artifacts

Locate screenshots and video files associated with the test run. Do not attempt to analyze their content — record file paths and timestamps only. The Investigator decides whether to pass them to a vision-capable model.

Include in the summary:

  • Screenshot file paths (in timestamp order)
  • Video file path (if present)

Command Reference

Use this reference to understand what a failing test was executing. If a command is unfamiliar or you need full parameter details, look it up:

  • Element commands: https://webdriver.io/docs/api/element/<commandName>
  • Browser commands: https://webdriver.io/docs/api/browser/<commandName>
  • Expect / assertions: https://webdriver.io/docs/api/expect-webdriverio
  • Full API index: https://webdriver.io/docs/api

Element Commands

Called on an element object returned by $() or $$(). Operate on a specific DOM node. Failures here relate to that element's state, visibility, or interactability — look at the selector and the DOM snapshot.

CommandWhat it doesCommon failure modes
$('selector')Find first matching elementElement not in DOM, wrong selector, not yet rendered
$$('selector')Find all matching elementsReturns empty array if none match
click()Click the elementElement obscured, not interactable, wrong element matched
setValue(val)Clear and type into inputElement not an input, not focused, readonly
addValue(val)Append to input valueSame as setValue
getText()Get visible text contentElement not rendered, text in shadow DOM
getValue()Get input valueElement not an input type
getAttribute(name)Get DOM attributeAttribute doesn't exist → returns null
getCSSProperty(prop)Get computed CSS valueUseful for checking visibility, color, dimensions
isDisplayed()Is element visible?Returns false if hidden via CSS
isExisting()Is element in DOM?Returns false if not yet rendered
isClickable()Is element clickable?Checks displayed + enabled + in viewport
isEnabled()Is form element enabled?Returns false for disabled inputs/buttons
isSelected()Is checkbox/radio selected?Only for checkboxes and radio buttons
waitForDisplayed(opts)Wait until visibleTimeout if element never becomes visible
waitForExist(opts)Wait until in DOMTimeout if element never appears
waitForClickable(opts)Wait until clickableTimeout if never interactable
selectByVisibleText(text)Select <option> by labelText mismatch, not a <select> element
selectByAttribute(attr, val)Select <option> by attributeAttribute value mismatch
scrollIntoView()Scroll element into viewportNeeded before click on off-screen elements
moveTo()Hover over elementUsed for hover-triggered UI

Browser Commands

Called on the global browser object. Operate at the session or page level. Failures here relate to navigation, page state, or browser context — not element-level issues.

CommandWhat it doesCommon failure modes
browser.url(path)Navigate to URL or pathWrong base URL, page load failure
browser.getUrl()Get current URLUseful for asserting navigation succeeded
browser.getTitle()Get page titlePage not loaded, wrong page
browser.refresh()Reload current page—
browser.back() / forward()Browser history navigation—
browser.waitUntil(fn, opts)Wait for arbitrary conditionTimeout if condition never true; check fn logic
browser.execute(fn)Run JS in browser contextJS error in fn, wrong return type
browser.executeAsync(fn)Run async JS in browserCallback never called → timeout
browser.pause(ms)Hard wait (avoid if possible)Masks timing issues rather than fixing them
browser.keys(keys)Send keyboard inputFocus not on expected element
browser.switchToFrame(id)Switch context to iframeWrong frame ID, frame not loaded
browser.switchToParentFrame()Return to main frameAlready in main frame
browser.newWindow(url)Open new window/tab—
browser.switchWindow(handle)Switch to window by handle/titleWrong handle, window closed
browser.acceptAlert()Accept a browser dialogNo dialog present
browser.dismissAlert()Dismiss a browser dialogNo dialog present
browser.getAlertText()Get dialog message textNo dialog present
browser.setCookies(cookies)Set browser cookiesWrong domain, malformed cookie
browser.getCookies()Get all cookies—
browser.deleteCookies()Delete cookies—
browser.saveScreenshot(path)Save screenshot to file—
browser.getPageSource()Get full page HTMLUseful for snapshot comparison

Expect / Assertions

Assertions use expect-webdriverio. A failing assertion means the element or browser was in the wrong state at that moment.

AssertionWhat it checks
expect(el).toBeDisplayed()Element is visible
expect(el).toExist()Element is in DOM
expect(el).toBeClickable()Element is interactable
expect(el).toBeEnabled()Form element is not disabled
expect(el).toBeSelected()Checkbox/radio is checked
expect(el).toHaveText(str)Element text matches
expect(el).toHaveValue(str)Input value matches
expect(el).toHaveAttribute(attr, val)Attribute has expected value
expect(el).toHaveClass(name)Element has CSS class
expect(el).toHaveURL(str)Current URL matches (on browser)
expect(el).toHaveTitle(str)Page title matches (on browser)
expect(arr).toHaveLength(n)Array/collection length

When an assertion fails, the error message includes the actual vs. expected value. Cross-reference the actual value with the HTML snapshot and logs to understand why the state was wrong.


Output

Return a structured markdown summary to the Investigator:

## Context: <testName>

### Test Flow
Step-by-step reconstruction of what the test was doing,
derived from the spec file, hooks in scope, and page object methods.

### Last Known Good State
What the test had successfully completed just before the failure,
based on log command sequence and intermediate HTML snapshots (if present).

### Point of Failure
- **Error:** <errorMessage>
- **Stack trace:** excerpt pointing to the exact file and line
- **Command:** the WebdriverIO command that failed or produced wrong state
- **Selector involved:** the CSS/XPath selector (if applicable)
- **Page object method:** which method contained the failing command

### DOM State at Failure
Key observations from the HTML snapshot at failure time:
- Was the selector present? Hidden? Disabled?
- Were expected elements missing or in unexpected state?
- Any relevant attribute values or form state?

### Visual Artifacts
- Screenshots: [list of file paths with timestamps, in order]
- Video: [file path if present, otherwise "none"]
- HTML snapshots: [list of file paths in sequence, oldest first]

### Active Services
[List configured services and flag any that may be relevant to the failure]

### Custom Commands Involved
[List any custom commands called in the test flow, with their source location]

### Hypothesis
One or two sentences: the most likely cause of the failure based on the
evidence gathered. Do not speculate beyond what the artifacts support.

平台分布

Codex

34.93%
按下载量换算28

Claude

28.81%
按下载量换算23

Cursor

18.71%
按下载量换算15

Gemini CLI

8.18%
按下载量换算6

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills