Command Palette

Search for a command to run...

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

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от 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

  1. 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 CONTAINER is set for all subsequent docker exec calls.
  2. Confirm Linux binary is available:

    docker exec $CONTAINER bash -c \
      '/workspace/.devcontainer/ensure-skillshare-linux-binary.sh && ss version'
    
  3. Confirm mdproof is installed:

    docker exec $CONTAINER /workspace/.devcontainer/ensure-mdproof.sh
    

    This auto-installs from GitHub release, or falls back to /workspace/bin/mdproof (local dev binary).

  4. Check for lessons learned from previous runs:

    test -f /workspace/.mdproof/lessons-learned.md && cat /workspace/.mdproof/lessons-learned.md
    

    If the file exists, read it before writing or debugging runbooks — it contains known gotchas and assertion patterns.

Phase 1: Detect Scope

  1. 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.

  2. Identify recent changes (unstaged + recent commits):

    git diff --name-only HEAD~3
    
  3. Match 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:

  1. Execute the entire runbook via mdproof inside the container. Run mdproof directly, not inside ssenv enter: ai_docs/tests/mdproof.json sets isolation: per-runbook, so mdproof gives each runbook its own $HOME and runs the setup hook (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>.md
    

    mdproof executes each step (bash -c <command>) in its isolated HOME (reported as environment.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": "..."
        }
      ]
    }
    
  2. 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 just ss 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 + jq for assertions — see the JSON Reference below

Generating new runbook:

  1. Read git diff HEAD~3 to find changed files in cmd/skillshare/ or internal/
  2. Read changed files to understand new/modified functionality
  3. Validate all CLI flags before writing — for every ss <command> <flag> in the runbook:
    • Grep cmd/skillshare/<command>.go for the exact flag string (e.g. "--force")
    • Run ss <command> --help inside container if needed
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

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

Сравнить skillshare-cli-e2e-test с