Token导航 LogoToken导航

Agent Skill · 研究检索

autonomous-tests(自主测试)

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

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

总安装 823周安装 35GitHub Stars 公开资料未说明下载 288核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/louiscavalcante/skills --skill autonomous-tests

这个 Skill 是做什么的

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

自主测试用于辅助测试设计、自动化用例编写和回归验证,帮助定位失败日志中的问题。适合让 Agent 生成单元测试、端到端测试或制定测试计划,提升代码质量保障效率。支持根据 Git 分支、暂存区变更等动态上下文生成测试内容,适配不同项目框架。

该技能包含 shell 命令指令,安装前必须仔细审查,防止误执行敏感系统操作或修改关键文件。autonomous-tests 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/autonomous-tests

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

autonomous-tests 怎么安装?

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

autonomous-tests 支持哪些 AI 工具?

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

autonomous-tests 需要什么权限?

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

autonomous-tests 是免费的吗?

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

autonomous-tests 用的人多吗?

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

autonomous-tests 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 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调用外部服务未明确有提醒
autonomous-tests

自主测试 · 本页

823—操作浏览器未明确通过

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

SKILL.md 原文

Dynamic Context

  • Args: $ARGUMENTS
  • Branch:!git branch --show-current
  • Unstaged:!git diff --stat HEAD 2>/dev/null | tail -5
  • Staged:!git diff --cached --stat 2>/dev/null | tail -5
  • Commits:!git log --oneline -5 2>/dev/null
  • Docker:!docker compose ps 2>/dev/null | head -10 || echo "No docker-compose found"
  • Config:!test -f.claude/autonomous-tests.json && echo "YES" || echo "NO -- first run"
  • Capabilities:!python3 -c "import json;c=json.load(open('.claude/autonomous-tests.json'));caps=c.get('capabilities',{});mcps=len(caps.get('dockerMcps',[]));ab='Y' if caps.get('frontendTesting',{}).get('agentBrowser') else 'N';pw='Y' if caps.get('frontendTesting',{}).get('playwright') else 'N';cd='Y' if caps.get('frontendTesting',{}).get('chromeDevtools') else 'N';ec=sum(1 for s in c.get('externalServices',[]) if s.get('cli',{}).get('available'));print(f'MCPs:{mcps} agent-browser:{ab} playwright:{pw} chrome-devtools:{cd} ext-clis:{ec} scanned:{caps.get(\"lastScanned\",\"never\")}')" 2>/dev/null || echo "NOT SCANNED"

Role

Project-agnostic autonomous test runner. Analyzes code changes, auto-detects project capabilities, generates comprehensive test plans covering integration tests (curl-based API testing) and E2E tests (browser-based user flows), executes test suites via subagents, and documents findings for the test-fix-retest cycle.

Test Taxonomy

This skill generates three types of tests. Read references/test-taxonomy.md for full definitions:

  • Integration Tests: API-level via curl. Security-focused request/response analysis. Classification: integration/api.
  • E2E Tests: Frontend-to-backend flows via agent-browser/Playwright + chrome-devtools-mcp. Classification: e2e/webapp, e2e/mobile.
  • Regression Tests: Unit tests (testing.unitTestCommand) run ONCE at the end. Classification: regression/unit.

Read references/security-checklist.md for the 17-item security observation checklist applied to each suite.

Orchestrator Protocol

The main agent is the Orchestrator. It coordinates phases but NEVER executes operational work.

Orchestrator MUST delegate to agents:

  • Bash commands (capabilities scan, health checks, port scanning, cleanup)
  • Source code reading (only agents read application source)
  • File generation (docs, reports)
  • Test execution, fix application, verification

Orchestrator MAY directly:

  • Read config, SKILL.md, and reference files
  • Run date -u for timestamps, test -f for file checks
  • Enter/exit plan mode
  • Use AskUserQuestion for user interaction
  • Use Agent() to spawn subagents for delegation
  • Compile summaries from agent reports
  • Make phase-gating decisions (proceed/stop/abort)

Reporting hierarchy: Agent -> Orchestrator -> Plan

Task Tracking Protocol

The orchestrator uses TaskCreate and TaskUpdate to track phase-level progress. This provides visible progress indicators and a deterministic execution sequence for the post-reset orchestrator.

When to create tasks: Immediately after plan approval (start of Phase 4), create ALL phase tasks at once. This gives a complete checklist that survives context pressure.

Task lifecycle: pending -> in_progress (when phase starts) -> completed (when phase finishes). If a phase triggers STOP/ABORT, update the task description with the reason before halting.

Task naming: Phase {N}: {Phase Name} (e.g., Phase 4.1: Service Restoration). For guided happy-path, each scenario gets its own subtask: Phase 4.6.{M}: {Scenario Name}.

Dependency chaining: Each task blocks the next so the orchestrator processes them in order.

Arguments: $ARGUMENTS

ArgMeaning
*(empty)*Default: working-tree (staged + unstaged) with smart doc analysis
stagedStaged changes only
unstagedUnstaged changes only
N (number)Last N commits (e.g., 1 = last commit)
working-treeStaged + unstaged (same as default)
file:<path>.md doc as additional test context. Combinable.
rescanForce capabilities re-scan. Combinable.
guidedUser augmentation mode — bypasses git diff. Alone: prompts for doc or description.
guided "desc"Description-based: happy-path workflows only, user performs actions.
guided file:<path>Doc-based: happy-path workflows only, user performs actions.

Space-separated, combinable (e.g., staged file:docs/feature.md rescan). file: validated as existing .md relative to project root.

Guided mode — user augmentation (NOT automation):

  • Doc-based (guided file:<path> or pick from docs//_autonomous/pending-guided-tests/): happy-path workflows only.
  • Description-based (guided "description" or describe when prompted): happy-path workflows only.

User performs all actions on their real device/browser. Claude provides step-by-step instructions and verifies results via DB queries/API/logs. Only happy-path workflows in guided mode. Categories 2-8 handled exclusively in autonomous mode — NEVER in guided session. No agent-browser, no Playwright — guided mode never loads or uses browser automation tools.

guided alone prompts via AskUserQuestion to pick a doc or describe a feature. Combinable with rescan but NOT with staged/unstaged/N/working-tree (git-scope args incompatible — guided bypasses git diff).

Smart doc analysis always active in standard mode: match docs/ files to changed code by path, feature name, cross-references — read only relevant docs.

Print resolved scope, then proceed without waiting.


Phase 0 — Bootstrap

Config hash method: python3 -c "import json,hashlib;d=json.load(open('.claude/autonomous-tests.json'));[d.pop(k,None) for k in ('_configHash','lastRun','capabilities')];print(hashlib.sha256(json.dumps(d,sort_keys=True).encode()).hexdigest())" — referenced throughout as "Config hash method".

Step 0: Prerequisites Check — Read ~/.claude/settings.json:

  1. ExitPlanMode hook (informational): if missing -> inform user the skill-scoped hook handles it automatically; global setup available via the script. Continue.
  2. AskUserQuestion hook (informational): same as above. Continue.

Step 1: Capabilities Scan — Triggers: rescan arg, capabilities missing, or lastScanned older than rescanThresholdDays (default 7 days). If none -> use cache.

Spawn Explore agent (subagent_type: "Explore", thoroughness: "medium") to perform:

  1. Docker MCP Discovery: mcp-find for MCPs matching service names and generic queries. Record name, description, mode; safe: true only for known sandbox MCPs. If unavailable -> empty array.
  2. Frontend Testing: which agent-browser, which playwright/npx playwright --version -> set frontendTesting booleans.
  3. Chrome DevTools MCP Detection: Run mcp-find for chrome-devtools; scan ~/.claude.json and ~/.claude/settings.json for mcpServers containing chrome-devtools. Store in capabilities.frontendTesting.chromeDevtools.
  4. Project Type Detection: Read references/project-type-detection.md. Scan package.json files in project root and relatedProjects[] paths. Store in project.frontendType and relatedProjects[].frontendType.
  5. External Service CLI Detection: Load references/external-services-catalog.json. Scan CLAUDE.md files for claudeMdKeywords. Per match: run detectionCommand -> if available, run modeDetection.command -> pattern-match -> populate allowedOperations/prohibitedFlags -> merge into externalServices[].

Agent reports back. Orchestrator writes to capabilities with lastScanned = UTC time (date -u).

Step 1.5: Tool Inventory — ALWAYS runs (no caching — tools change between sessions):

  • Orchestrator directly (no agent spawn):

1. Skills: Extract available skills from system-reminder context 2. Agents: Extract available agent types from Agent tool description

  • Delegate to Explore agent (combine with Step 1 if triggered, or spawn separately): 3. MCP servers: Run mcp-find + scan ~/.claude/settings.json for mcpServers. Include chrome-devtools-mcp in inventory if available. 4. CLIs: External service detection + probe common tools (which curl, which jq, which ngrok, which uvx)
  • Compile Tool Inventory: Per-phase recommendations (Safety: health-check CLIs; Discovery: Explore+Grep/Glob; Plan: skills/agents; Execution: service MCPs, CLI fallbacks, browser tools, DB tools, chrome-devtools-mcp)

CLAUDE.md deep scan (Phase 0 + Phase 2): find. -maxdepth 3 -name "CLAUDE.md" -type f + ~/.claude/CLAUDE.md + .claude/CLAUDE.md. Cache list for capabilities scan, auto-extract, Phase 2 enrichment, Feature Context Document.

Step 2: Config Check — test -f.claude/autonomous-tests.json && echo "CONFIG_EXISTS" || echo "CONFIG_MISSING". Schema: references/config-schema.json.

If CONFIG_EXISTS (returning run):

  1. Read config.
  2. Version validation: require version: 6 + fields project, database, testing. v5->v6: add frontendType: "none", chromeDevtools: false, e2eUrl: null, browserPreference: "agent-browser", add logFile: null to services, add logCommand: null to relatedProjects, add frontendIndicators, remove deprecated eligibility and credentialType fields, bump to 6. v4->v5->v6: chain migrations. <4 or missing fields -> warn, re-run first-run.

- Missing database.seedStrategy -> default "autonomous", inform user. - Missing documentation.fixResults -> add "docs/_autonomous/fix-results".

  1. Config trust: Compute hash using Config hash method. Check trust store ~/.claude/trusted-configs/{project-hash}.sha256. Mismatch -> show config (redact testCredentials values as "********") -> AskUserQuestion for approval -> write hash.
  2. Testing priorities: Show userContext.testingPriorities. AskUserQuestion: "Pain points or priorities?" with "None" option. Update config.
  3. Re-scan services: Delegate to Explore agent. Update config if needed.
  4. date -u +"%Y-%m-%dT%H:%M:%SZ" -> update lastRun.
  5. Empty userContext -> run questionnaire, save.
  6. Re-stamp trust: if config modified -> recompute hash, write to trust store.
  7. Skip to Phase 1.

If CONFIG_MISSING (first run):

Spawn Explore agent for auto-extraction:

  1. Auto-extract from CLAUDE.md files + compose + env + package manifests. Detect migration/cleanup/seed commands. Detect DB type (MongoDB vs SQL). Both found -> ask user.
  2. Topology: single | monorepo | multi-repo.
  3. Related projects: scan sibling dirs, grep for external paths -> ask user per candidate -> populate relatedProjects.

Agent reports. Orchestrator proceeds: 4. Capabilities scan — delegate (Step 1). 5. Seeding strategy via AskUserQuestion: autonomous (recommended) or command. 6. User Context Questionnaire: flaky areas? credentials (env var/role names only)? priorities? notes? -> store in userContext. 7. Propose config -> STOP for confirmation -> write. 8. Stamp trust: compute hash -> write to trust store. 9. If CLAUDE.md < 140 lines and lacks startup instructions -> append max 10 lines.

Phase 1 — Safety, Environment & Log Monitoring

Objective: Verify the environment is safe, start services, and begin log capture.

Spawn ONE general-purpose subagent (foreground) to perform:

  1. Production scan: .env files for productionIndicators, *LIVE*SECRET*, NODE_ENV=production, production DB endpoints, non-local URLs. Show variable NAME only.
  2. Run sandboxCheck commands from config.
  3. Verify Docker is local.
  4. Related project safety scan: For each relatedProjects[] with a path, scan .env files for production indicators. Any production indicator -> ABORT.
  5. Service startup: per service in config + related projects with startCommand: health check -> healthy: already-running -> unhealthy: start + poll 5s/30s -> started-this-run or report failure.
  6. Start webhook listeners: for each externalServices[] with webhookListener!= null, run the command as a background process and record PID.
  7. Log monitoring setup: After services are healthy, start log capture per references/log-monitoring-protocol.md:

- For each service with logCommand: start background log capture to /tmp/test-logs-{sessionId}/ - Record log file paths and PIDs in Service Readiness Report

  1. Service Readiness Report: per service — name, URL/port, health status, health check endpoint, source, log file path, log capture PID.

Agent reports: safety assessment + Service Readiness Report with log paths. Gates: ABORT if production. STOP if unhealthy.

Phase 2 — Discovery

Fully autonomous — derive from code diff, codebase, or guided source. Never ask what to test.

Delegation: ONE Explore agent (subagent_type: "Explore", thoroughness: "medium").

Standard mode

  1. Changed files from git (scope args) — include relatedProjects[].path for cross-project deps.
  2. If file:<path> -> read .md, extract features/criteria/endpoints/edge cases.
  3. Spawn Explore agent with: changed files, file reference content, relatedProjects[], testing.contextFiles, CLAUDE.md paths, documentation.* paths. Agent performs:

- Feature map: API endpoints, DB ops, external services, business logic, auth flows, signal/event chains - Dependency graph: callers -> changed code -> callees, cross-file/project imports - Smart doc analysis: match paths/features against docs/, scan _autonomous/ (Summary + Issues Found only), fix completion scan - Edge case inventory: error handlers, validation branches, race conditions, retry logic - Cross-project seed map: For each relatedProjects[], trace which collections/tables are read by E2E flows - Test flow classification: Classify each scenario as integration/api (API-only, curl), e2e/webapp (browser automation), e2e/mobile (physical device guided steps), guided/webapp, guided/mobile. Project type influences: if frontendType is webapp -> generate e2e/webapp suites; if mobile -> e2e/mobile; if api-only -> only integration/api. - Security checklist mapping: Read references/security-checklist.md. Map each of 17 items to YES/NO/PARTIAL per discovered feature. - Data seeding analysis: Read references/data-seeding-protocol.md. Analyze DB schema and models. Return seed plan with table names, field names, example values, create/cleanup commands. - Related project log commands: Discover log commands per relatedProjects[].

  1. Receive structured report.

Guided mode (user augmentation)

Validate first: guided + staged/unstaged/N/working-tree -> STOP with combinability error.

  1. Resolve source: guided file:<path> -> doc-based | guided "desc" -> description-based | guided alone -> AskUserQuestion.
  2. Spawn Explore agent with same inputs. Agent performs: deep feature analysis + same feature map/dependency/doc analysis/edge cases. Also identifies: DB seed requirements, external service setup needs, prerequisite state per happy-path workflow.
  3. Receive report. Orchestrator extracts only happy-path workflows — discard security, edge case, validation findings.

Regression Scope Analysis (conditional — after Explore report)

Check for re-test indicators in documentation.fixResults path (default: docs/_autonomous/fix-results/) — look for Ready for Re-test: YES, Status: RESOLVED + Verification: PASS. If found -> compile Targeted Regression Context Document (fix manifest, 1-hop impact zone, original test IDs, blast radius check >60% -> full scope).

Feature Context Document (standard/guided modes — skipped in regression mode)

Compile from Explore report (do NOT re-read files). Contents: features, endpoints, DB collections/tables, cross-project seed map, test flow classifications, security checklist applicability map, data seeding plan, log file paths from Service Readiness Report, related project log commands, external services, edge cases, test history, capabilities. Guided mode adds Mode + Source at top. Cascaded to every Phase 4 agent.

Post-Discovery Prompts (standard mode only — skip if guided or regression)

MUST execute BEFORE entering plan mode — guided happy-path inclusion must be decided before the plan is written. Single AskUserQuestion:

  • Guided Happy-Path — After all autonomous tests and regression, generate guided test plan where user performs actions while agent verifies logs and DB per step. Happy-path only. Include? (yes/no)

Parse response into guidedHappyPathApproved boolean.

Phase 3 — Plan (Plan Mode)

Enter plan mode (/plan). Plan starts with:

Step 0 — Context Reload (for post-approval reconstruction):

  • Re-read: SKILL.md, config, references/templates.md
  • Scope: $ARGUMENTS, branch, commit range
  • Findings: Phase 2 discoveries (modules, endpoints, dependencies, test flow classifications)
  • User context: flaky areas, priorities, notes
  • Service Readiness Report from Phase 1 (including log file paths — Phase 3 agents MUST NOT start services)
  • If regression mode: fix manifest, 1-hop impact zone, original test IDs, Targeted Regression Context Document
  • If guided: type, source, full guided test list with per-test seed requirements
  • If guided happy-path approved: happy-path workflows with seed requirements, user instructions, verification queries

Tool loading gate: If plan includes e2e/webapp or e2e/mobile suites AND capabilities.frontendTesting has available tools, list tools and prompt user via AskUserQuestion before plan approval. Declined tools excluded from plan. Guided mode: NEVER include browser automation tools — skip this gate.

Self-containment mandate — the plan MUST embed directly (not reference "above" or prior phases):

  1. All test suites with full details (name, objective, pre-conditions, steps, expected outcomes, teardown, verification)
  2. Feature Context Document (condensed but complete)
  3. Service Readiness Report from Phase 1 (including log file paths and capture PIDs)
  4. Per-suite agent spawn instructions with resolved values
  5. Config paths: documentation.*, database.connectionCommand, testing.unitTestCommand, testDataPrefix
  6. Credential role names from testCredentials
  7. If guided: per-test DB seed commands, user-facing instructions, verification queries
  8. Seed schema discovery mandate (embedded verbatim) per references/data-seeding-protocol.md
  9. If guided happy-path approved: Guided Happy-Path Decision block
  10. Documentation checklist (always — output directories, template path, filename convention, doc types this run produces)
  11. Tool Inventory from Phase 0
  12. DB Consistency Check Protocol from references/db-consistency-protocol.md
  13. Security checklist applicability map (which of the 17 items apply to which features)
  14. Explicit data seeding plan (tables, fields, values, curl/DB commands per references/data-seeding-protocol.md)
  15. Log file paths from Service Readiness Report
  16. Chrome DevTools protocol (if available) from references/chrome-devtools-protocol.md
  17. Service startup commands for all project + relatedProject services
  18. Execution protocols from references/execution-protocols.md — embed relevant protocols verbatim
  19. Task Tracking Block — create all phase tasks at execution start (embed verbatim): IMMEDIATELY after plan approval and context reload, create tasks: TaskCreate("Phase 4.1: Service Restoration", "Re-establish services and log captures post-reset") TaskCreate("Phase 4.2: Setup", "Read source files, compile Feature Context Documents") TaskCreate("Phase 4.3: Integration Suites", "Execute integration test suites sequentially via subagents") TaskCreate("Phase 4.4: E2E Suites", "Execute E2E browser-based test suites via subagents") — skip if frontendType == api-only TaskCreate("Phase 4.5: Regression", "Run unit tests via testing.unitTestCommand") TaskCreate("Phase 4.6: Guided Happy-Path", "User-augmented verification per scenario") — skip if not approved For each happy-path scenario [M]: TaskCreate("Phase 4.6.[M]: [Scenario Name]", "[scenario description]") TaskCreate("Phase 5: Results & Docs", "Fix cycles, documentation generation, cleanup") Chain: 4.1 -> 4.2 -> 4.3 -> 4.4 -> 4.5 -> 4.6 -> 5 (sequential via addBlockedBy) Before each phase: TaskUpdate(id, status: "in_progress") After each phase: TaskUpdate(id, status: "completed")
  20. Phase Orchestration Protocol from references/execution-protocols.md — embed verbatim. Contains concrete Agent() spawn templates for every phase.

Test Plan Structure

## Test Plan

### Integration Test Suites (curl-based)
Categories 1-8 per references/test-taxonomy.md. Each suite includes:
- Explicit curl commands with expected responses
- Security checklist items applicable to this suite (YES/PARTIAL only)
- Data seeding commands (what to create before, what to clean after)
- Log file paths for post-suite analysis

### E2E Test Suites (browser-based) — only if frontendType != api-only
For webapp: agent-browser flows with chrome-devtools-mcp observations
For mobile: guided steps with verification commands
Each suite includes:
- User journey steps
- Expected UI states
- Chrome DevTools observations (if available)
- Backend verification via curl after UI actions

### Regression (unit tests — runs LAST)
Single testing.unitTestCommand execution after all suites complete.

Regression mode scoping: When Targeted Regression Context Document is present:

  • Suite 1 "Fix Verification": one test per fixed item — re-execute original failure scenario
  • Suite 2 "Impact Zone" (conditional): tests for 1-hop callers/callees
  • No other suites. Execution protocol unchanged (sequential subagent flow).

Pre-approval validation: Before presenting the plan, verify all self-containment items (1-20) are present. Missing items -> add before prompting.

Wait for user approval.

Phase 4 — Execution (Subagents)

First: Create all phase tasks per the Task Tracking Block embedded in the plan. Chain dependencies.

Then: Follow the Phase Orchestration Protocol embedded in the plan for concrete Agent() spawn templates. Each phase: TaskUpdate -> spawn subagent with detailed context -> receive report -> TaskUpdate completed.

Spawn general-purpose subagents sequentially (foreground). Each receives full context and returns results directly.

1. Service Restoration Agent (fg, FIRST)

Context reset kills background processes. Re-establish services and log captures:

  1. Run healthCheck per service — healthy -> verified-post-reset — unhealthy -> startCommand + poll 5s/30s
  2. Related projects: same check via relatedProjects[]
  3. Start webhook listeners
  4. Re-start log captures per references/log-monitoring-protocol.md for all services with logCommand
  5. Gate: any failed-post-reset -> STOP
  6. Return updated Service Readiness Report with new log file paths and PIDs

2. Setup Agent (fg)

Read source files, compile Feature Context Documents, read CLAUDE.md files. Proceeds after completion.

3. Integration Suite Agents (fg, sequential, one at a time)

Each agent receives: Feature Context, explicit curl commands, security checklist subset (YES/PARTIAL items only), data seeding instructions (table, fields, values, commands per references/data-seeding-protocol.md), log file paths, DB consistency protocol, Tool Inventory subset.

Execution per suite: migrate -> capture dbBaseline -> seed (after schema discovery) -> POST_SEED check -> execute curls + security checks -> POST_TEST check -> cleanup -> POST_CLEANUP check.

After each suite: orchestrator checks service logs for errors (grep ERROR/WARN --since timestamp), runs DB consistency checks.

Reports back: PASS/FAIL per test, security observations, log findings, DB consistency, anomalies.

4. E2E Suite Agents (fg, sequential, one at a time) — only if frontendType!= api-only

Each agent receives: user journey steps, browser tool config, chrome-devtools protocol (if chromeDevtools: true per references/chrome-devtools-protocol.md), log file paths, Service Readiness Report, Feature Context Document, Tool Inventory subset.

Webapp: Navigate with agent-browser -> snapshot -> execute journey -> re-snapshot + devtools check -> verify backend via curl -> verify DB. Mobile: Present guided steps via AskUserQuestion -> user acts -> verify via curl/DB/logs.

Browser tool priority (skipping without attempting is PROHIBITED):

  1. agent-browser (PRIMARY) — open <url> -> snapshot -i -> click/fill @ref -> re-snapshot
  2. Playwright (FALLBACK) — if agent-browser unavailable/errors
  3. Direct HTTP/API (LAST RESORT) — mark untestable parts as "guided"

Reports back: PASS/FAIL per step, screenshots, network/console findings, backend verification, logs.

5. Regression Agent (fg, after autonomous suites)

Run testing.unitTestCommand once. Report total/passed/failed/skipped. Never interleaved with other suites.

6. Guided Happy-Path (MAIN CONVERSATION, optional, if user approved — LAST)

Runs LAST — after all autonomous suites and regression. No browser automation. Category 1 only. Each happy-path scenario is a separate task (Phase 4.6.{M}).

Per-scenario flow (orchestrator drives — NOT delegated to a single subagent):

  1. TaskUpdate(scenario task, status: "in_progress")
  2. Seed: Spawn subagent (fg) to seed DB and set up prerequisites for this scenario
  3. Per-step loop (for each step in the scenario): a. Orchestrator presents step via AskUserQuestion (MANDATORY — text output PROHIBITED): Options: ["Done - ready to verify", "Skip this test", "Issue encountered"] b. If "Done": spawn verification subagent (fg) that:

- Checks service logs since step start (grep ERROR/WARN --since timestamp) - Runs DB queries to verify expected state changes from this step - Runs API verification calls if applicable - Reports: PASS/FAIL with log findings + DB state analysis c. If verification FAIL: record finding, continue to next step (do not halt scenario) d. If "Skip": record SKIPPED, continue e. If "Issue encountered": record user's description, continue

  1. After all steps: TaskUpdate(scenario task, status: "completed")
  2. Next scenario

Critical Execution Rules

  • Never create batch scripts — each test explicitly passed to subagent
  • Explicit data seeding instructions (table, fields, values, commands) — never guess
  • Each subagent receives applicable security checklist items only
  • Each subagent receives log file paths to check after execution
  • Orchestrator checks logs between suites
  • Credential assignment: Rotate role names from testCredentials across suites (round-robin: suite 1 gets role A, suite 2 gets role B, wraps to role A if more suites than roles) — pass role name only, never values
  • Finding verification (mandatory): identify source code -> read to confirm -> distinguish real vs agent-created -> report only confirmed. Unconfirmed -> Severity: Unverified in ### Unverified
  • Anomaly detection: duplicate records, unexpected DB changes, warning/error logs, slow queries, orphaned references, auth anomalies, unexpected response fields/status codes
  • External CLI guard: Before any CLI command from externalServices[], verify the subcommand is in allowedOperations and no prohibitedFlags are present. Reject non-matching commands.
  • Prohibited: multiple concurrent subagents, parallel execution. Exception: guided happy-path runs in main conversation (orchestrator presents steps, subagents seed and verify)

Phase 5 — Results & Docs

Fix cycle: Runtime-fixable issues -> verify real (re-read error, retry once, confirm root cause) -> spawn subagent to fix -> re-run suite -> max 3 cycles. Code bug -> document + ask user.

Documentation: Spawn subagent (foreground). Timestamp via date -u +"%Y-%m-%d-%H-%M-%S". Pattern: {timestamp}_{semantic-name}.md. Read references/templates.md. Four doc types: test-results (always — rename header to "Test Results"), pending-fixes (bugs/infra), pending-guided-tests (browser/visual/physical), pending-autonomous-tests (identified but not run). Include service log analysis, DB consistency results (if WARN/FAIL).

Cleanup: Spawn subagent (foreground). Remove testDataPrefix data only. Never touch pre-existing. Kill log capture processes. Remove /tmp/test-logs-{sessionId}/. Verify cleanup. Log actions.

DB consistency final check: Run POST_CLEANUP verification. Zero test records must remain.

Phase 6 — Finalize

Important: Run /clear before invoking another skill (e.g., /autonomous-fixes) to free context window tokens and prevent stale state from interfering with the next operation.

Rules

RuleDetail
No productionNever modify production data or connect to production services
No credentials in outputNever expose credentials, keys, tokens, or env var values — pass role names only
Plan before executionPhase 3 plan mode required before any test execution
Subagents onlyAll execution via Agent(subagent_type: "general-purpose"). Main-conversation execution PROHIBITED
Model inheritanceSubagents inherit from main conversation — ensure Opus is set
Strictly sequentialOne agent at a time in Phases 4-5. Spawn -> complete -> shut down -> next
Explore agents read-onlyNo file edits or state-modifying commands
UTC timestampsVia date -u only, never guess
No unsafe MCPsNever activate safe: false MCPs
External CLI gatingBlocked when cli.blocked. Per-run user confirmation. allowedOperations only
No dynamic commandsOnly execute verbatim config commands — no generation/concatenation/interpolation
Integration tests = curlAlways curl — never mock, never script-based test runners
E2E tests = browseragent-browser (primary) or Playwright (fallback) — never test production
Unit tests = regressionRun ONCE at the end — never during integration/E2E suites
Data seeding = explicitNever guess field names, values, or schemas. Seed schema discovery mandatory
Each test = one subagentNever batch scripts — each test passed individually to subagent
Service logs monitoredLog capture active during all test phases. Check between suites
Finding verificationVerify against source code before reporting any finding
Idempotent test dataPrefix with testDataPrefix. Skip or reset if exists
External API careDelays between calls, sandbox modes, minimize requests
_autonomous/ readingSummary + Issues Found sections only
Capabilities auto-detectedNever ask user to configure manually
Guided = user augmentationNo browser automation in guided mode — user performs all actions
Guided = happy-path onlyCategory 1 only in guided mode — categories 2-8 autonomous-only
Tool loading gateBrowser tools need pre-plan approval in autonomous mode, never in guided
Plan self-containmentAll context embedded in plan for post-reset survival — no "see above" references
Guided happy-path = post-allGuided happy-path runs last — after all autonomous suites AND regression
Post-discovery promptsStandard mode only — skipped when guided arg or regression mode active
Documentation in every runTest-results doc generated for every run. Embedded in plan execution protocol
DB consistency inlinePOST_SEED, POST_TEST, POST_CLEANUP checks within Phase 4 per suite
Task tracking per phaseTaskCreate for all execution phases at plan start. TaskUpdate in_progress/completed around each. Phase Orchestration Protocol embedded in plan
Guided = main conversationOrchestrator presents steps via AskUserQuestion. Subagents seed DB and verify logs/DB per step. NOT delegated to a single subagent
Guided = per-scenario tasksEach happy-path scenario gets its own task (Phase 4.6.{M})

Operational Bounds

BoundConstraint
Max agentsApproved test suites + one service restoration agent + one setup agent + one regression agent
Max fix cycles3 per suite
Health check timeout30s per service
Capability cacherescanThresholdDays (default 7 days)
Command scopeUser-approved config commands only
Docker scopeLocal only — Phase 1 aborts on production indicators
Credential scopeEnv var references only — raw values forbidden, redacted on display
MCP scopesafe: true only
Subagent lifecycleOne foreground subagent at a time in Phases 4-5
Explore agent scopeOne per Phase 2. Read-only
External CLI scopeallowedOperations only. Per-run confirmation. Blocked when cli.blocked
System commandswhich, docker compose ps, git branch/diff/log, test -f, find. -maxdepth 3 -name "CLAUDE.md" -type f, date -u, curl -sf localhost, python3 -c json/hashlib only
External downloadsDocker images via user's compose only. Playwright browsers if present. No other downloads
Data accessOutside project: ~/.claude/settings.json (RO), ~/.claude/trusted-configs/ (RW), ~/.claude/CLAUDE.md (RO). .env scanned for patterns only
Trust boundariesConfig SHA-256 verified out-of-repo. Untrusted inputs -> analysis only -> plan -> user approval
Guided happy-path scopeCategory 1 only. No browser automation. Sequential. Runs last
Documentation outputMinimum 1 doc (test-results) per run. Embedded in execution protocol for post-reset survival

平台分布

Codex

38.77%
按下载量换算112

Claude

28.85%
按下载量换算83

Cursor

18.57%
按下载量换算53

Gemini CLI

10.12%
按下载量换算29

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills