Skip to content

srid/drishti / .claude/skills/nix-chrome-devtools-mcp

nix-chrome-devtools-mcp

Verified

chrome-devtools-mcp launcher — a single bash script that resolves Playwright's bundled Chrome-for-Testing and Node.js directly through Nix. See repo README for usage, override mechanisms, and version compatibility.

FileKindSize
SKILL.mdskill md1.1 KB
bin/serveexecutablescript1.6 KB
#!/usr/bin/env bash
# Launch chrome-devtools-mcp using a Chrome-for-Testing binary resolved via
# Nix. Self-contained — no surrounding devshell required. Requires flakes
# (`experimental-features = nix-command flakes` in nix.conf).
#
# Override knobs (env vars):
#   NIXPKGS_FLAKE                 — flake-ref for nixpkgs (default: `nixpkgs`)
#   CHROME_DEVTOOLS_MCP_VERSION   — npm version of chrome-devtools-mcp
#                                   (default: `latest`)

set -euo pipefail
shopt -s nullglob

nixpkgs="${NIXPKGS_FLAKE:-nixpkgs}"
mcp_version="${CHROME_DEVTOOLS_MCP_VERSION:-latest}"

browsers=$(nix build --no-link --print-out-paths "${nixpkgs}#playwright-driver.browsers")

chrome=""
for c in \
    "$browsers"/chromium-*/chrome-linux64/chrome \
    "$browsers"/chromium-*/chrome-mac-*/"Google Chrome for Testing.app"/Contents/MacOS/"Google Chrome for Testing"; do
    if [[ -x "$c" ]]; then
        chrome="$c"
        break
    fi
done

if [[ -z "$chrome" ]]; then
    echo "nix-chrome-devtools-mcp: no Chrome binary found under $browsers" >&2
    exit 1
fi

# ffmpeg is on PATH so chrome-devtools-mcp's experimental screencast tools
# (screencast_start / screencast_stop) can record page video — Puppeteer's
# page.screencast() shells out to ffmpeg. Without --experimentalScreencast
# the tools stay hidden; without ffmpeg they error at record time.
exec nix shell "${nixpkgs}#nodejs" "${nixpkgs}#ffmpeg" --command \
    npx -y "chrome-devtools-mcp@${mcp_version}" \
    --headless=true \
    --isolated=true \
    --experimentalScreencast=true \
    --executable-path="$chrome"
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall