Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

expect

БесплатноЗапускает вложенные скриптыНе проверен

Diff-aware browser testing: maps the git diff to affected pages, plans and runs targeted checks via agent-browser. Use when testing UI changes before merge…

yonatangrossот yonatangross★ 312 звёзд на GitHub

Об этом скилле

Expect — Diff-Aware AI Browser Testing

Analyze git changes, generate targeted test plans, and execute them via AI-driven browser automation.

Note: If disableSkillShellExecution is enabled, the agent-browser install check won't run. Verify it's installed: npx agent-browser --version.

expect                              # Auto-detect changes, test affected pages
expect -m "test the checkout flow"  # Specific instruction
expect --flow login                 # Replay a saved test flow
expect --target branch              # Test all changes on current branch vs main
expect -y                           # Skip plan review, run immediately

Core principle: Only test what changed. Git diff drives scope — no wasted cycles on unaffected pages.

Argument Resolution

ARGS = "[-m <instruction>] [--target unstaged|branch|commit] [--flow <slug>] [-y]"

# Parse from full argument string
import re
raw = "$ARGUMENTS"  # Full argument string

INSTRUCTION = None
TARGET = "unstaged"  # Default: test unstaged changes
FLOW = None
SKIP_REVIEW = False

# Extract -m "instruction"
m_match = re.search(r'-m\s+["\']([^"\']+)["\']|-m\s+(\S+)', raw)
if m_match:
    INSTRUCTION = m_match.group(1) or m_match.group(2)

# Extract --target
t_match = re.search(r'--target\s+(unstaged|branch|commit)', raw)
if t_match:
    TARGET = t_match.group(1)

# Extract --flow
f_match = re.search(r'--flow\s+(\S+)', raw)
if f_match:
    FLOW = f_match.group(1)

# Extract -y
if '-y' in raw.split():
    SKIP_REVIEW = True

STEP 0: MCP Probe + Prerequisite Check

# memory may be absent from the user's .mcp.json; probe so the memory steps below are skipped, not failed:
ToolSearch(query="select:mcp__memory__search_nodes")

# Verify agent-browser is available (Rust-native, no Playwright)
Bash("command -v agent-browser || npx agent-browser --version")
# If missing: "Install agent-browser: npm i -g agent-browser"

# Load agent-browser's version-matched workflow guide (ships with the CLI).
# NOT `skills get agent-browser` — that resolves but returns only the thin
# top-level router; `core --full` is the actual 2,800+ line command reference.
Bash("agent-browser skills get core --full")

# Load it before the first agent-browser command, never drive the CLI from memory.
# Windows (Git Bash): never pipe a command that may start the daemon (| tail hangs);
# redirect to a file instead. See ../browser-tools/references/ork-delta.md,
# section "Windows (Git Bash) and piping".

CRITICAL: Task Management

# 1. Create main task IMMEDIATELY
TaskCreate(
  subject="Expect: test changed code",
  description="Diff-aware browser testing pipeline",
  activeForm="Running diff-aware browser tests"
)

# 2. Create subtasks for each pipeline phase
TaskCreate(subject="Check fingerprint (skip if unchanged)", activeForm="Checking fingerprint")  # id=2
TaskCreate(subject="Scan git diff and classify changes", activeForm="Scanning diff")            # id=3
TaskCreate(subject="Map changes to routes/URLs", activeForm="Mapping routes")                   # id=4
TaskCreate(subject="Generate AI test plan", activeForm="Generating test plan")                   # id=5
TaskCreate(subject="Execute tests via agent-browser", activeForm="Executing browser tests")     # id=6
TaskCreate(subject="Compile test report", activeForm="Compiling report")                        # id=7

# 3. Set dependencies for sequential phases
TaskUpdate(taskId="3", addBlockedBy=["2"])  # Diff scan needs fingerprint check
TaskUpdate(taskId="4", addBlockedBy=["3"])  # Route map needs diff results
TaskUpdate(taskId="5", addBlockedBy=["4"])  # Test plan needs route map
TaskUpdate(taskId="6", addBlockedBy=["5"])  # Execution needs test plan
TaskUpdate(taskId="7", addBlockedBy=["6"])  # Report needs execution results

# 4. Update status as you progress
TaskUpdate(taskId="2", status="in_progress")  # When starting
TaskUpdate(taskId="2", status="completed")    # When done — repeat for each subtask

Pipeline Overview

Git Diff → Route Map → Fingerprint Check → Test Plan → Execute → Report
Phase What Output Reference
1. Fingerprint SHA-256 hash of changed files Skip if unchanged since last run references/fingerprint.md
2. Diff Scan Parse git diff, classify changes ChangesFor data (files, components, routes) references/diff-scanner.md
3. Route Map Map changed files to affected pages/URLs Scoped page list references/route-map.md
4. Test Plan Generate AI test plan from diff + route map Markdown test plan with steps references/test-plan.md
5. Execute Run test plan via agent-browser Pass/fail per step, screenshots references/execution.md
6. Report Aggregate results, artifacts, exit code Structured report + artifacts references/report.md

Phase 1: Fingerprint Check

Check if the current changes have already been

Полный SKILL.md на GitHub

Установить expect в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

AskUserQuestion
Bash
Read
Write
Edit
Grep
Glob
Agent
TaskCreate
TaskUpdate
TaskList
ToolSearch
WebFetch
Monitor
PushNotification
mcp__memory__search_nodes

Вложенные файлы

flows/crud.mdflows/login.mdflows/navigation.mdjev-shadow.defaults.yamlreferences/aria-diffing.mdreferences/ci-integration.mdreferences/config-schema.mdreferences/diff-scanner.mdreferences/execution.mdreferences/fingerprint.mdreferences/human-review.mdreferences/jev-shadow.mdreferences/report.mdreferences/research.mdreferences/route-map.mdreferences/rrweb-recording.mdreferences/saved-flows.mdreferences/scope-strategy.mdreferences/test-plan.mdrules/_sections.mdrules/artifact-storage.mdrules/diff-scope-boundaries.mdrules/fingerprint-invalidation.mdrules/no-parallel-browsers.mdrules/timeout-and-retry.mdscripts/coverage-context.shscripts/diff-scan.shscripts/fingerprint.shscripts/init.shscripts/jev-shadow.shscripts/jev_shadow.pyscripts/report.shscripts/route-map.shtest-cases.json

FAQ

Что делает скилл expect?

Diff-aware browser testing: maps the git diff to affected pages, plans and runs targeted checks via agent-browser. Use when testing UI changes before merge. Not for writing tests (use cover), grading a suite (use verify) or unit tests.

Как установить скилл expect?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл expect запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить expect с