Command Palette

Search for a command to run...

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

shadow-testing

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

Creates isolated container environments for testing local uncommitted changes before pushing. Use when testing library changes, multi-repo coordination, or…

rysweetот rysweet★ 77 звёзд на GitHub

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

Shadow Testing Skill

Purpose [LEVEL 1]

Shadow testing creates isolated container environments where you can test local uncommitted changes without affecting your host system or pushing to remote repositories.

Key Principle: Test exactly what's on your machine (including uncommitted changes) in a clean, isolated environment that mirrors CI.

When to Use This Skill [LEVEL 1]

Perfect For

  • Pre-Push Validation: Test changes before committing/pushing
  • Multi-Repo Coordination: Validate changes across multiple repositories work together
  • Clean-State Testing: "Does it work on a fresh machine?"
  • Library Development: Test library changes with dependent projects
  • CI Parity: See what CI will see before pushing
  • Destructive Testing: Tests that modify system state won't affect host

Use This Skill When

  • Making breaking changes to a library others depend on
  • Coordinating changes across multiple repositories
  • Unsure if your changes will work in CI
  • Need to test with specific dependency versions
  • Want to verify install/setup procedures work
  • Testing changes that require clean environment state

Don't Use This Skill When

  • Running unit tests on already-committed code (use local test runner)
  • Need to debug with live code changes (shadow captures snapshots)
  • Testing production deployment (use staging environments)
  • Simple single-file changes with good test coverage

Core Concepts [LEVEL 1]

Shadow Environment Architecture

A shadow environment is a Docker/Podman container with:

  1. Git Bundle Snapshots - Exact working tree state (including uncommitted changes)
  2. Embedded Gitea Server - Local git server at localhost:3000 inside container
  3. Selective URL Rewriting - Git insteadOf rules redirect specific repos to local Gitea
  4. Package Manager Isolation - UV, pip, npm, cargo, go caches isolated per shadow
  5. API Key Passthrough - Common API keys automatically forwarded to container
┌─────────────────────────────────────────────────────────┐
│  Shadow Container                                       │
│  ┌───────────────────────────────────────────────────┐  │
│  │  Gitea Server (localhost:3000)                    │  │
│  │  - myorg/my-library (your snapshot)               │  │
│  └───────────────────────────────────────────────────┘  │
│                                                         │
│  Git URL Rewriting:                                     │
│  github.com/myorg/my-library → Gitea (local)           │
│  github.com/myorg/other-repo → Real GitHub             │
│                                                         │
│  /workspace (pre-cloned local sources)                 │
└─────────────────────────────────────────────────────────┘

How Git URL Rewriting Works

When you create a shadow with ~/repos/my-lib:myorg/my-lib:

  1. Your working directory is captured exactly as-is (uncommitted changes included)
  2. Snapshot is bundled with full git history
  3. Container starts with Gitea server
  4. Snapshot pushed to Gitea as myorg/my-lib
  5. Git config adds insteadOf rules:
    [url "http://shadow:shadow@localhost:3000/myorg/my-lib.git"]
        insteadOf = https://github.com/myorg/my-lib.git
    
  6. Any git clone https://github.com/myorg/my-lib → uses YOUR local snapshot
  7. All other GitHub URLs → fetch from real GitHub

Result: Only your specified repos are local; everything else uses production sources.

Quick Start [LEVEL 1]

Installation

For Amplifier Users (native integration):

# Shadow tool is built-in - no installation needed
amplifier run --bundle amplihack

For Other Agents (standalone CLI):

# Install via uvx (recommended)
uvx amplifier-shadow --version

# Or via pip
pip install amplifier-bundle-shadow

# Verify installation
amplifier-shadow --version

Prerequisites:

  • Docker or Podman installed and running
  • Git installed

Your First Shadow (CLI)

# Create shadow with your local library changes
amplifier-shadow create --local ~/repos/my-library:myorg/my-library --name test-lib

# Inside the shadow, install via git URL
# → my-library uses YOUR LOCAL snapshot
# → all other dependencies fetch from REAL GitHub
amplifier-shadow exec test-lib "uv pip install git+https://github.com/myorg/my-library"

# Run tests
amplifier-shadow exec test-lib "cd /workspace && pytest"

# See what changed
amplifier-shadow diff test-lib

# Clean up when done
amplifier-shadow destroy test-lib

Your First Shadow (Amplifier Tool)

# Create shadow with local changes
shadow.create(local_sources=["~/repos/my-library:myorg/my-library"])

# Execute commands
shadow.exec(shadow_id, "uv pip install git+https://github.com/myorg/my-library")
shadow.exec(shadow_id, "pytest tests/")

# Extract results
shadow.extract(shadow_id, "/workspace/test-results", "./results")

# Cleanup
shadow.destroy(shadow_id)

Tool Reference by Agent Type [LEVEL 2

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

Установить shadow-testing в Claude Code и Claude Desktop

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

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

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

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

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

Без ограничений — скилл может использовать любой инструмент.

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

README.mddocker-compose/README.mddocker-compose/ci-shadow.ymldocker-compose/multi-repo.ymldocker-compose/single-repo.ymlexamples/multi-repo-coordination.mdexamples/nodejs-package-test.mdexamples/python-library-test.mdscripts/create-bundle.shscripts/setup-shadow.shscripts/test-shadow.sh

FAQ

Что делает скилл shadow-testing?

Creates isolated container environments for testing local uncommitted changes before pushing. Use when testing library changes, multi-repo coordination, or validating "works on my machine" → "works in CI". Provides git bundle snapshots, embedded git server, selective URL rewriting, and package manager cache isolation. Works with any coding agent via standalone CLI, shell scripts, or Docker Compose.

Как установить скилл shadow-testing?

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

Скилл shadow-testing запускает скрипты?

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

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

Сравнить shadow-testing с