shadow-testing
БесплатноЗапускает вложенные скриптыНе проверенCreates isolated container environments for testing local uncommitted changes before pushing. Use when testing library changes, multi-repo coordination, or…
от 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:
- Git Bundle Snapshots - Exact working tree state (including uncommitted changes)
- Embedded Gitea Server - Local git server at localhost:3000 inside container
- Selective URL Rewriting - Git
insteadOfrules redirect specific repos to local Gitea - Package Manager Isolation - UV, pip, npm, cargo, go caches isolated per shadow
- 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:
- Your working directory is captured exactly as-is (uncommitted changes included)
- Snapshot is bundled with full git history
- Container starts with Gitea server
- Snapshot pushed to Gitea as
myorg/my-lib - Git config adds
insteadOfrules:[url "http://shadow:shadow@localhost:3000/myorg/my-lib.git"] insteadOf = https://github.com/myorg/my-lib.git - Any
git clone https://github.com/myorg/my-lib→ uses YOUR local snapshot - 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
Установить shadow-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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