request mirroring

    1

    Safe production traffic mirroring and response parity comparison for backend service migrations.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    request mirroring

    Example session with this skill installed

    I need to move our Python API from Django 4 to Django 5. Can you help me set up a shadow rollout to compare them?

    • Read your context and instructions
    • Compiled the request mirroring

    I will set up the shadow traffic stack to compare Django 4 (primary) and Django 5 (shadow). I've mapped the dependencies and will use a shadow Postgres instance to prevent data pollution.

    Shadow Rollout Configuration

    ComponentSpecificationDescription
    Primary URLhttp://django-v4:8000Current production service
    Shadow URLhttp://django-v5:8000New Django 5 implementation
    Comparison ModeJSONDeep comparison with key-order independence
    Ignore Keysupdated_at, uuid, last_loginVolatile fields to skip during parity check
    Fakes EnabledStripe, SendGrid, TwilioExternal APIs redirected to fakeapi tool

    Docker Compose Shadow Override

    version: '3.8'
    services:
      django-v5:
        image: api-django5:latest
        env_file: .env.shadow
        networks:
          - shadow-net
        depends_on:
          - shadow-db
    
      shadow-proxy:
        image: agensi/shadow-proxy:latest
        ports:
          - "8019:8019"
          - "9187:9187"
        environment:
          - PRIMARY_URL=http://django-v4:8000
          - SHADOW_URL=http://django-v5:8000
          - IGNORE_KEYS=updated_at,last_login
          - MAX_COMPARE_KB=1024
        networks:
          - shadow-net
    

    Next steps

    1. Run templates/scripts/shadow-db-refresh.sh to populate the shadow database with a production snapshot.
    2. Deploy the shadow-proxy and verify metrics are appearing at :9187/metrics.
    3. Execute mirror-switch.sh on to begin teeing 100% of traffic to the Django 5 instance.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Safely replacing a production backend is high-risk. This skill implements language-agnostic request mirroring to validate new code against real traffic without affecting users.

    What it does

    • Traffic mirroring copies live HTTP requests and sends them to a shadow service while the primary service answers the client.
    • Automated comparison performs byte-for-byte or deep JSON parity checks on responses, ignoring key ordering or numeric formatting differences.
    • External service faking provides stubs for APIs, SMS, and payment gateways to prevent the shadow service from triggering real-world side effects.
    • Resource monitoring tracks RAM, CPU, and latency for both primary and shadow services to detect performance regressions.
    • Grafana observability generates dashboards showing parity percentages, p95 latency, and side-by-side diffs for every failed match.

    How it works

    1. Discovery analyzes your existing nginx config, Docker networks, and external dependencies to map out the shadow environment.
    2. Environment Isolation clones the production database to a shadow instance and configures a .env.shadow file to point all external URLs to fakes.
    3. Proxy Deployment launches a Go-based sidecar proxy that tees traffic from nginx to both services with automatic failover.
    4. Parity Triage uses the Grafana dashboard to classify differences as bugs, stale data, or intentional changes.

    Frameworks & tools

    The tooling is built in Go but works with any HTTP-based stack including Python (Django, FastAPI), Node.js, Java, Go, and PHP. It integrates with nginx, Docker, Prometheus, and Grafana.

    Why this beats prompting it yourself

    Shadowing requires strict safety rules like async fire-and-forget logic and request timeouts to ensure the shadow never blocks production. This skill provides a hardened Go proxy and pre-written nginx rollback scripts that handle these edge cases out of the box.

    Use cases

    • Language migrations like rewriting a legacy Python monolith in Go.
    • Major framework upgrades such as moving from Django 4 to 5 or Node 18 to 22.
    • Database migrations validating a new ORM or query layer against live data.
    • Infrastructure changes switching application servers from gunicorn to uvicorn.

    Known limitations

    Does not support mirroring for WebSockets, Server-Sent Events (SSE), or file uploads exceeding the configured size limit. Requires an nginx ingress and Docker-based deployment for the toolset.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Does not support WebSockets or SSE. Requires nginx and Docker. Large payloads above MAX_COMPARE_KB are skipped. Shadow database must be manually refreshed to maintain parity.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 10 days ago

    • Free with an Agensi account

    Software
    prismaNode.jsknextypeormGit

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables

    Allowed Hosts

    proxy
    grafana.example.com
    f
    Listed10 days ago

    What's inside

    Frequently Asked Questions

    No, this skill is designed with a 'safety-first' architecture where traffic is mirrored asynchronously via a Go-based proxy; if the shadow service lags or fails, the primary production response to the user remains unaffected.

    The skill is compatible with any HTTP-based backend (Python, Node, Go, etc.) provided your infrastructure uses an nginx ingress and Docker-based deployment for the sidecar proxy.

    The skill includes an automated External Service Faking module that intercepts calls to third-party APIs like Stripe or Twilio, ensuring your shadow environment doesn't trigger real-world charges or notifications.

    You receive the Go-based sidecar proxy, pre-configured nginx rollback scripts, a suite of external service stubs, and a pre-built Grafana dashboard template for real-time parity monitoring.

    The automated comparison tool performs deep JSON parity checks that intelligently ignore non-functional differences like key ordering or numeric formatting, focusing only on actual data discrepancies.

    New in LLM Ops

    Free