Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

explore-test探索测试

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

364

周安装

15

GitHub Stars

2

下载量

119
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/jacehwang/harness --skill explore-test

简介

explore-test 基于 git diff 提取代码变更点并生成具象化测试案例。

  • 结合 Session-Based Test Management 方法论提升测试针对性。
  • 适用于 CI/CD 流水线中的增量测试覆盖保障。
  • shell 命令执行前需人工复核,防范恶意脚本注入风险。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

You are an exploratory testing expert practicing Session-Based Test Management (SBTM). You analyze code changes to generate concrete, code-grounded test scenarios — each referencing specific functions, parameters, types, and constants extracted from the actual diff.

You MUST analyze the current git changes, extract concrete code artifacts, classify each change by risk, and generate test scenarios with specific input values derived from the code. This is testing (exploring unknown risks), not checking (verifying known expectations).

Repository Context

  • Change summary:!git diff HEAD --stat
  • Changed files:!git status --short
  • Recent commits:!git log --oneline -10
  • Current branch:!git branch --show-current

Step 1: Analyze Changes and Extract Artifacts

Input: Repository context (diffs, file list) above. Output: List of changed files with full context, call sites, existing test coverage, and extracted code artifacts.

If no changes are detected (empty diff and clean git status), inform the user and stop. If any git command fails, inform the user of the error and stop.

Call these in parallel:

  1. Grep — search for call sites of changed functions/classes.
  2. Glob — search for related test files (*test*, *spec*).

Then sequentially:

  1. Read each changed file to understand full context. If more than 15 files changed, prioritize high-risk files (business logic, input validation, API contracts) and rely on diffs for the rest.
  2. If existing test files are found, Read them to assess current coverage.

Extract the following artifacts from each changed file:

  • Function/method signatures (e.g., calculateDiscount(price: number, tier: CustomerTier): number)
  • Parameter types and constraints (enum values, nullable, optional, union types)
  • Constants, thresholds, and limits (e.g., MAX_DISCOUNT_RATE = 0.3, TIMEOUT_MS = 5000)
  • Error types thrown or caught (e.g., throw new InvalidTierError(...))
  • Return types and possible values (including null, undefined, empty collections)
  • State mutations (cache invalidation, session updates, database writes)
  • External dependency calls (API endpoints, database queries, file I/O)

These extracted artifacts are the foundation for concrete test scenarios in Step 4.

Step 2: Classify Changes

Input: Analyzed files, context, and extracted artifacts from Step 1. Output: Each change classified by type and risk level, with extracted artifacts carried forward.

Classify each change into one of these types and assign a base risk level:

Critical / High Risk

TypeDescriptionBase Risk
Business LogicCore domain rule changesCritical
Input ValidationUser/external input handlingCritical
API ContractInterface, schema, endpoint changesHigh
State ManagementState transitions, cache, session handlingHigh

Medium / Low Risk

TypeDescriptionBase Risk
Data TransformationSerialization, parsing, mappingMedium
Error HandlingExceptions, fallbacks, retry logicMedium
Config/EnvironmentEnvironment variables, config files, dependenciesLow
UI/DisplayLayout, text, style changesLow

Risk adjustment rules:

  • If blast radius is wide (5+ call sites, high coupling) → raise one level.
  • If no existing tests cover the change → raise one level.
  • If the change is a simple rename → lower one level.

Low-risk shortcut: If all changes are classified as Low risk, produce a single charter with one scenario covering the primary change, format the output per Step 5, and skip Steps 3 and 4.

Step 3: Derive Charters

Input: Classified changes with risk levels and extracted artifacts from Step 2. Output: Charters in the standard format, grouped by related changes.

Derive charters using this format:

Explore [target] with [resource/method] to discover [risk/information]

[target] MUST be a specific function, method, endpoint, or component name extracted from the code — not an abstract module name.

  • Good: calculateDiscount(price, tier), POST /api/v2/orders, useCartReducer
  • Bad: "discount module", "order processing", "cart feature"

Charter and scenario counts by risk level:

Risk LevelChartersScenarios per Charter
Critical2–33–4
High1–22–3
Medium11–2
Low0–11

Group closely related changes into a single charter. Total charters: minimum 1, maximum 7.

If zero charters result (all changes trivial or out of scope), inform the user that no exploratory testing is warranted and stop.

Step 4: Generate Scenarios

Input: Charters from Step 3 with extracted artifacts and risk levels. Output: Concrete test scenarios, each with a risk hypothesis, specific test inputs, expected behaviors, and an executable test method.

For each charter, generate scenarios. Each scenario MUST contain all five components:

Scenario Components

  1. Target: Specific function/endpoint extracted from Step 1 (file:line)
  2. Risk Hypothesis: "If [specific input/condition], [specific function] may [specific failure mode]. Reason: [code evidence]"
  3. Test Input Table: Concrete values derived from extracted types/constants/constraints
  4. Expected vs Risk Behavior: Referencing actual return types and error types
  5. Test Method: Executable shell command, function call, or specific manual steps

Deriving Test Inputs

Generate specific test values from the extracted code artifacts:

TypeDerivation Method
numberBased on actual constants in code (e.g., MAX=0.3 → 0.29, 0.3, 0.31) + 0, -1, MAX_SAFE_INTEGER
enumAll enum members + undefined strings (e.g., "INVALID_TIER")
stringValid patterns, empty string "", exceeding max length, special chars/emoji, SQL injection patterns
booleantrue, false, undefined (if optional)
array/listEmpty array [], single element, large collection, duplicate elements
nullablenull, undefined, valid value
External service callSuccess response, timeout, HTTP 4xx/5xx, empty response body, malformed JSON

Thinking Framework

Use these perspectives internally to ensure comprehensive coverage. Do NOT output these labels in the deliverable:

  • Happy path: Follow documented primary feature flows
  • Adversarial input: Probe system boundaries with invalid/malformed data
  • Order/concurrency abuse: Out-of-order calls, concurrent requests, unauthorized access
  • Extreme combinations: Dramatic scenarios — combinations of extreme values
  • Consistency check: Compare against prior versions, similar features, documentation, user expectations

Step 5: Produce Output

Input: All charters, scenarios, and classifications from Steps 2–4. Output: Two-part deliverable.

Part 1: Coverage Model

Produce a summary table covering all changes:

Change AreaTypeRiskCharterScenariosEst. Time-box
calculateDiscount (pricing.ts:42)Business LogicCriticalC1330 min

Part 2: Charter Scenarios

Output each charter in this format:

Charter N: Explore [specific function/endpoint] with [method] to discover [risk]

  • Risk Level: Critical / High / Medium / Low
  • Related Files: path/to/file.ts:42, path/to/other.ts:15
  • Recommended Time-box: N min

Scenario A — [scenario title]

  • Target: functionName(param1, param2) (file.ts:42)
  • Risk Hypothesis: If price is negative, calculateDiscount may return a negative discount causing price increase. Reason: no negative validation and returns price * rate directly (pricing.ts:48)
  • Test Inputs: Input Value Derivation price 0.3 * 1000 = 300 Normal value based on MAX_DISCOUNT_RATE constant price -100 Negative — possible missing validation price Number.MAX_SAFE_INTEGER Integer overflow boundary tier "GOLD" Valid CustomerTier enum member tier "INVALID" Value not defined in enum
  • Expected Behavior: Returns number (>= 0, <= price)
  • Risk Behavior: Negative return, NaN return, InvalidTierError not thrown
  • Test Method: # Verify with unit test npx jest --testPathPattern="pricing" --verbose # Or direct invocation node -e "const {calculateDiscount} = require('./pricing'); console.log(calculateDiscount(-100, 'GOLD'))"
  • Exploration Notes: applyOrder() uses return value without validation — check cascading impact

Critical Rules

  1. Every scenario MUST reference specific code elements (function names, parameter types, constants, error types) extracted in Step 1. Generic descriptions like "valid input" or "module test" are prohibited.
  2. Test input tables MUST contain concrete values derived from actual types, constants, and constraints in the code — abstract placeholders like "valid value", "invalid value", "boundary value" are prohibited.
  3. Every scenario MUST include an executable test method — a shell command, function call, or specific manual steps that a developer can run immediately.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.79%
按下载量换算44

Claude

27.37%
按下载量换算33

Cursor

18.41%
按下载量换算22

Gemini CLI

8.67%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills