skillshare-cli-e2e-test
БесплатноБез исполняемых скриптовНе проверенRun isolated E2E tests in devcontainer from ai_docs/tests runbooks. Use this skill whenever the user asks to: run an E2E test, execute a test runbook…
от runkids★ 3 514 звёзд на GitHubОб этом скилле
Run isolated E2E tests in devcontainer. $ARGUMENTS specifies runbook name or "new".
Before acting, run python3 scripts/ai-context.py testing. The topic is the source of truth for isolation, runbook quality and reporting rules; this skill retains the execution flow and mdproof recipes.
Flow
Phase 0: Environment Check
Confirm devcontainer is running and get container ID:
CONTAINER=$(docker compose -f .devcontainer/docker-compose.yml ps -q skillshare-devcontainer)- If empty → prompt user:
docker compose -f .devcontainer/docker-compose.yml up -d - Ensure
CONTAINERis set for all subsequentdocker execcalls.
- If empty → prompt user:
Confirm Linux binary is available:
docker exec $CONTAINER bash -c \ '/workspace/.devcontainer/ensure-skillshare-linux-binary.sh && ss version'Confirm mdproof is installed:
docker exec $CONTAINER /workspace/.devcontainer/ensure-mdproof.shThis auto-installs from GitHub release, or falls back to
/workspace/bin/mdproof(local dev binary).Check for lessons learned from previous runs:
test -f /workspace/.mdproof/lessons-learned.md && cat /workspace/.mdproof/lessons-learned.mdIf the file exists, read it before writing or debugging runbooks — it contains known gotchas and assertion patterns.
Phase 1: Detect Scope
Preview all available runbooks via the container:
docker exec $CONTAINER mdproof --dry-run --report json /workspace/ai_docs/tests/This returns JSON with every runbook's steps, commands, and expected assertions — no manual markdown parsing needed. Use this to understand what each runbook covers.
Identify recent changes (unstaged + recent commits):
git diff --name-only HEAD~3Match changes to relevant runbooks (compare changed file paths against step commands in the JSON output).
Phase 2: Select Tests
Prompt user (via AskUserQuestion):
- Option A: Run existing runbook (list all available + mark those related to recent changes)
- Option B: Auto-generate new test script based on recent changes
- Option C: If $ARGUMENTS specifies a runbook, skip to Phase 3
Phase 3: Prepare & Execute
Running existing runbook:
Execute the entire runbook via mdproof inside the container. Run mdproof directly, not inside
ssenv enter:ai_docs/tests/mdproof.jsonsetsisolation: per-runbook, so mdproof gives each runbook its own$HOMEand runs thesetuphook (ss init -g) there. Inside ssenv, the setup hook initializes the ssenv HOME while the steps run in mdproof's HOME, so every step fails without a config.docker exec $CONTAINER env SKILLSHARE_DEV_ALLOW_WORKSPACE_PROJECT=1 \ mdproof --report json --keep-failed-artifacts \ /workspace/ai_docs/tests/<runbook_file>.mdmdproof executes each step (
bash -c <command>) in its isolated HOME (reported asenvironment.HOME), then returns structured JSON:{ "version": "1", "runbook": "<runbook_file>.md", "duration_ms": 12345, "summary": { "total": 7, "passed": 5, "failed": 1, "skipped": 1 }, "steps": [ { "step": { "number": 1, "title": "...", "command": "...", "expected": ["..."] }, "status": "passed", // "passed" | "failed" | "skipped" "exit_code": 0, "stdout": "...", "stderr": "..." } ] }Analyze the JSON output:
- All passed → proceed to Phase 4
- Any failed → filter for failures only (full JSON can be too large for terminal output):
mdproof --report json runbook.md 2>&1 | jq '{ summary: .summary, failed: [.steps[] | select(.status == "failed") | { step: .step.number, title: .step.title, exit_code: .exit_code, failed_assertions: [.assertions[]? | select(.matched == false) | .pattern], stderr: (.stderr // "" | .[0:200]) }] }' - Skipped steps (executor=
manual) and failed steps → reproduce them by hand in an ssenv environment. ssenv is for manual debugging only; replay the earlier steps first, since this HOME starts with justss init:ENV_NAME="e2e-$(date +%Y%m%d-%H%M%S)" docker exec $CONTAINER ssenv create "$ENV_NAME" --init docker exec $CONTAINER env SKILLSHARE_DEV_ALLOW_WORKSPACE_PROJECT=1 \ ssenv enter "$ENV_NAME" -- bash -c '<step command>' - Prefer
--json+jqfor assertions — see the JSON Reference below
Generating new runbook:
- Read
git diff HEAD~3to find changed files incmd/skillshare/orinternal/ - Read changed files to understand new/modified functionality
- Validate all CLI flags before writing — for every
ss <command> <flag>in the runbook:- Grep
cmd/skillshare/<command>.gofor the exact flag string (e.g."--force") - Run
ss <command> --helpinside container if needed
- Grep
Установить skillshare-cli-e2e-test в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл skillshare-cli-e2e-test?
Run isolated E2E tests in devcontainer from ai_docs/tests runbooks. Use this skill whenever the user asks to: run an E2E test, execute a test runbook, validate a feature end-to-end, create a new runbook, or test CLI behavior in isolation. If you need to run a multi-step CLI validation sequence (init → install → sync → verify), this is the skill — it handles mdproof isolation, flag verification, and structured reporting. Prefer this over ad-hoc docker exec sequences for any test that follows a runbook or needs reproducible isolation.
Как установить скилл skillshare-cli-e2e-test?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл skillshare-cli-e2e-test запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic