Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
DevOps & cloud

deploy-check

Instrument a frontend with version fingerprinting (meta tag + /__version endpoint) so LLM-based testing can verify the correct build is deployed before walking. Use when asked to 'add version check', 'deploy verification', 'instrument version', 'add build fingerprint', 'deploy-check', or before running ux-walker on a deploy.

dennisonbertram · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add dennisonbertram/developer-skill-pack --skill deploy-check

About this skill


name: deploy-check description: "Instrument a frontend with version fingerprinting (meta tag + /__version endpoint) so LLM-based testing can verify the correct build is deployed before walking. Use when asked to 'add version check', 'deploy verification', 'instrument version', 'add build fingerprint', 'deploy-check', or before running ux-walker on a deploy." version: 1.0.0 user_invocable: true

Deploy Check

Instrument a frontend app with subtle version fingerprinting — a <meta> tag in the HTML and a /__version JSON endpoint — so automated testing (ux-walker, CI, curl) can confirm the correct build is deployed before testing begins.

Usage

/deploy-check [--install] [--verify url] [--expected-sha sha]
ParameterDefaultNotes
--installAuto-detectInstrument the current project with version fingerprinting
--verify urlNoneCheck a running app and report what version is deployed
--expected-sha shaCurrent HEADFail if the deployed SHA doesn't match

If no flags given, auto-detect: if the project already has fingerprinting, run --verify; otherwise run --install.


What Gets Installed

1. Meta Tag

A <meta> tag injected into the HTML <head> at build time:

<meta name="build-version" content="sha:a1b2c3d timestamp:2026-06-08T12:00:00Z" />

Invisible to users. Readable by agent-browser:

agent-browser snapshot -i | grep 'build-version'
# or via JavaScript:
agent-browser js "document.querySelector('meta[name=build-version]')?.content"

2. Version Endpoint

A /__version route returning JSON:

{
  "git_sha": "a1b2c3d",
  "git_branch": "main",
  "build_timestamp": "2026-06-08T12:00:00Z",
  "version": "1.2.3",
  "dirty": false
}

Readable by curl, fetch, or any HTTP client:

curl -s http://localhost:3000/__version | jq .

3. Build-time Script

A scripts/version-stamp.sh that generates a version.json at build time:

#!/usr/bin/env bash
set -euo pipefail

cat > "${1:-public/version.json}" <<JSON
{
  "git_sha": "$(git rev-parse --short HEAD)",
  "git_branch": "$(git rev-parse --abbrev-ref HEAD)",
  "build_timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
  "version": "$(node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0")",
  "dirty": $(git diff --quiet && echo false || echo true)
}
JSON

Install Mode (--install)

Detect the framework and instrument accordingly. The orchestrator performs all steps directly — no sub-agents needed.

Step 1: Detect Framework

Read package.json and project structure to identify the framework:

SignalFramework
next in dependenciesNext.js
vite in devDependenciesVite (React/Vue/Svelte)
@remix-run/dev in dependenciesRemix
@angular/core in dependenciesAngular
gatsby in dependenciesGatsby
astro in dependenciesAstro
nuxt in dependenciesNuxt
None of the aboveGeneric static / Express

Step 2: Create Version Stamp Script

Write scripts/version-stamp.sh (see template above). Make it executable.

Step 3: Framework-Specific Instrumentation

Next.js

Meta tag — add to the root layout (app/layout.tsx or pages/_document.tsx):

import versionData from '../../public/version.json';

// In the <head>:
<meta name="build-version" content={`sha:${versionData.git_sha} timestamp:${versionData.build_timestamp}`} />

Endpoint — create app/api/__version/route.ts (App Router) or pages/api/__version.ts (Pages Router):

import { NextResponse } from 'next/server';
import versionData from '../../../public/version.json';

export async function GET() {
  return NextResponse.json(versionData);
}

Build hook — add to package.json scripts:

{
  "prebuild": "bash scripts/version-stamp.sh public/version.json",
  "predev": "bash scripts/version-stamp.sh public/version.json"
}

Vite (React / Vue / Svelte)

Meta tag — add to index.html:

<!-- In <head>, replaced at build time by vite plugin or prebuild -->
<meta name="build-version" content="__BUILD_VERSION__" />

Create or update vite.config.ts to replace the placeholder:

import { defineConfig } from 'vite';
import fs from 'fs';

export default defineConfig({
  define: {
    __BUILD_VERSION__: JSON.stringify(
      (() => {
        try {
          const v = JSON.parse(fs.readFileSync('public/version.json', 'utf-8'));
          return `sha:${v.git_sha} timestamp:${v.build_timestamp}`;
        } catch { return 'unknown'; }
      })()
    ),
  },
});

Endpoint — Vite dev server middleware via plugin, or just serve public/version.json directly at /__version via a simple redirect/rewrite.

Build hook:

{
  "prebuild": "bash scripts/version-stamp.sh public/version.json",
  "predev": "bash scripts/version-stamp.sh public/version.json"
}

Remix

Meta tag — add to app/root.tsx via the meta export or a direct <meta> in the <head>.

Endpoint — create app/routes/__version.ts:

import { json } from '@remix-run/node';
import versionData from '../../public/version.json';

export function loader() {
  return json(versionData);
}

Generic / Express / Static

Meta tag — find the main HTML file (index.html, public/index.html) and inject the meta tag.

Endpoint — if Express detected (express in dependencies), add middleware:

import versionData from './public/version.json';
app.get('/__version', (req, res) => res.json(versionData));

If static site, the public/version.json file is the endpoint — instruct the user to access it at /version.json.

Step 4: Update .gitignore

Add public/version.json to .gitignore — it's generated at build time, not committed.

Step 5: Verify Installation

# Generate the version stamp
bash scripts/version-stamp.sh public
Read the complete source ↗