agentleFS
Microsoft AzureKnown publisherAzure/cosmos-explorer/.github/skills/dev-server/SKILL.md

dev-server

Skill131 starsChanged 7 months agoMITView on GitHub

Start the local webpack dev server and connect to it with the Playwright browser. Use this skill when asked to start the dev server, preview the app, or interact with the running application in a browser.

  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. editframe/skills★ 19same name
    2. yugasun/skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to start the Cosmos Explorer webpack dev server and connect to it with the Playwright MCP browser for interactive testing, …

    line 9
  2. Very specific:

    Before starting the dev server, check whether npm install needs to be run:

    line 13
  3. Distinctive:

    Always run this check before starting the dev server.

    line 31
  4. Distinctive:

    Before starting a new server, check if one is already running on port 1234:

    line 35
  5. Distinctive:

    If the server is already running and ready, skip to Connect the Playwright Browser.

    line 48
  6. Distinctive:

    Start the webpack dev server as a detached background process so it persists across session changes:

    line 52
  7. Very specific:

    After starting the server, poll the /_ready endpoint until it returns HTTP 200.

    line 65
  8. Very specific:

    When no specific page is requested, navigate to https://localhost:1234/hostedExplorer.html as it provides the most complete standalone …

    line 121
  9. Very specific:

    After the page loads, a webpack dev server overlay may appear inside an iframe showing DefinePlugin warnings.

    line 125
  10. Very specific:

    Do not attempt workarounds (e.g., creating new browser contexts manually).

    line 148
  11. Distinctive:

    Always start the dev server as a detached background process so it survives session changes.

    line 152
  12. Very specific:

    Always wait for /_ready to return 200 before navigating the browser.

    line 153
  13. Distinctive:

    If the dev server is already running on port 1234, reuse it instead of starting a new one.

    line 155
  14. Very specific:

    If the server fails to start, check for port conflicts (netstat -ano | findstr :1234 on Windows).

    line 156
  15. Very specific:

    When stopping the dev server, use Stop-Process with the specific PID of the node process.

    line 157

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dev Server Skill

Use this skill to start the Cosmos Explorer webpack dev server and connect to it with the Playwright MCP browser for interactive testing, debugging, or previewing the application.

Pre-Start: Check Dependencies

Before starting the dev server, check whether npm install needs to be run:

if [ ! -d node_modules ] || [ package.json -nt node_modules ] || [ package-lock.json -nt node_modules ]; then
  npm install
fi

On Windows PowerShell:

if (-not (Test-Path node_modules) -or
    (Get-Item package.json).LastWriteTime -gt (Get-Item node_modules).LastWriteTime -or
    (Get-Item package-lock.json).LastWriteTime -gt (Get-Item node_modules).LastWriteTime) {
    npm install
}

Always run this check before starting the dev server.

Check for Existing Server

Before starting a new server, check if one is already running on port 1234:

try {
    $response = Invoke-WebRequest -Uri "https://localhost:1234/_ready" -SkipCertificateCheck -UseBasicParsing -ErrorAction Stop
    if ($response.StatusCode -eq 200) {
        Write-Host "Dev server is already running and ready!"
    }
} catch {
    Write-Host "No dev server detected, starting a new one..."
}

If the server is already running and ready, skip to Connect the Playwright Browser.

Start the Dev Server

Start the webpack dev server as a detached background process so it persists across session changes:

npm start

The dev server:

  • Runs at https://localhost:1234 (HTTPS with self-signed certificate)
  • Uses webpack dev mode with live reload
  • Exposes a /_ready health-check endpoint

Wait for Compilation

After starting the server, poll the /_ready endpoint until it returns HTTP 200. Do not proceed to browser navigation until /_ready returns 200.

On Windows PowerShell:

$timeout = 120
$elapsed = 0
while ($elapsed -lt $timeout) {
    try {
        $response = Invoke-WebRequest -Uri "https://localhost:1234/_ready" -SkipCertificateCheck -UseBasicParsing -ErrorAction Stop
        if ($response.StatusCode -eq 200) {
            Write-Host "Dev server is ready!"
            break
        }
    } catch {
        # Server not ready yet
    }
    Start-Sleep -Seconds 3
    $elapsed += 3
}
if ($elapsed -ge $timeout) {
    Write-Error "Dev server did not become ready within $timeout seconds"
}

On bash:

timeout=120
elapsed=0
while [ $elapsed -lt $timeout ]; do
  if curl -sk https://localhost:1234/_ready 2>/dev/null | grep -q "Compilation complete"; then
    echo "Dev server is ready!"
    break
  fi
  sleep 3
  elapsed=$((elapsed + 3))
done
if [ $elapsed -ge $timeout ]; then
  echo "Dev server did not become ready within $timeout seconds" >&2
fi

Connect the Playwright Browser

Once the dev server is ready, use the Playwright MCP browser tools to navigate to the application.

Navigate to the desired entry point:

  • https://localhost:1234/hostedExplorer.html — Hosted explorer (standalone mode). Best for general UI testing and interaction without Azure Portal framing.
  • https://localhost:1234/explorer.html — Portal explorer (Azure Portal iframe mode). Requires portal context/messages to initialize fully.
  • https://localhost:1234/index.html — Emulator mode. Requires a local Cosmos DB Emulator running on port 8081.
  • https://localhost:1234/testExplorer.html — Test explorer (dev mode only). Used for E2E test harness.

Default Navigation

When no specific page is requested, navigate to https://localhost:1234/hostedExplorer.html as it provides the most complete standalone experience.

Dismiss Webpack Warnings Overlay

After the page loads, a webpack dev server overlay may appear inside an iframe showing DefinePlugin warnings. If a "Dismiss" button (×) is visible in the overlay, click it to close the warnings before proceeding with any other interaction.

Available Pages Reference

URLEntry PointDescription
/hostedExplorer.htmlsrc/HostedExplorer.tsxStandalone hosted explorer (cosmos.azure.com)
/explorer.htmlsrc/Main.tsxPortal iframe explorer
/index.htmlsrc/Index.tsxEmulator explorer
/testExplorer.htmltest/testExplorer/TestExplorer.tsTest harness (dev mode only)
/terminal.htmlsrc/Terminal/index.tsNotebook terminal
/quickstart.htmlsrc/quickstart.tsQuickstart page
/selfServe.htmlsrc/SelfServe/SelfServe.tsxSelf-serve configuration
/galleryViewer.htmlsrc/GalleryViewer/GalleryViewer.tsxNotebook gallery viewer

Troubleshooting

HTTPS / Self-Signed Certificate Errors

The dev server uses HTTPS with a self-signed certificate. If the Playwright browser fails to navigate with an error like ERR_CERT_AUTHORITY_INVALID or any other SSL/TLS certificate error, stop immediately and tell the user:

The Playwright MCP server needs the --ignore-https-errors argument to connect to the dev server's self-signed certificate. Please add --ignore-https-errors to your Playwright MCP server configuration and try again.

Do not attempt workarounds (e.g., creating new browser contexts manually). The --ignore-https-errors flag is the correct fix.

Guidelines

  • Always start the dev server as a detached background process so it survives session changes.
  • Always wait for /_ready to return 200 before navigating the browser.
  • Ignore certificate errors in shell HTTP requests (e.g., -SkipCertificateCheck, curl -k). For the Playwright browser, the --ignore-https-errors MCP argument must be configured.
  • If the dev server is already running on port 1234, reuse it instead of starting a new one.
  • If the server fails to start, check for port conflicts (netstat -ano | findstr :1234 on Windows).
  • When stopping the dev server, use Stop-Process with the specific PID of the node process.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.