본문으로 건너뛰기
cccskills
무료GitHub에 공개

build-verification-expert

Verifies build output integrity after code changes. Runs builds, validates artifact structure, checks for regressions in bundle size, asset references, and static export completeness. The last line of defense before a bad deploy ships.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Cloudflare
설치 방법 보기

포함된 파일(1)

  • SKILL.md12.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Build Verification Expert

Systematic verification of build output after code changes. Catches the class of bugs that pass all tests but break in production: missing assets, broken static exports, inflated bundles, dead routes, and malformed sitemaps.

When to Use

Use for:

  • Verifying a build completes without errors or warnings after significant changes
  • Checking that static site exports contain all expected routes and pages
  • Validating artifact sizes haven't regressed beyond acceptable thresholds
  • Confirming asset references (images, fonts, scripts) resolve to real files
  • Auditing sitemap.xml and robots.txt for correctness after content changes
  • Comparing build output structure against a known-good baseline
  • Pre-deploy sanity checks in CI or before manual deploy
  • Diagnosing "works in dev but broken in production" issues

Do NOT use for:

  • Writing or running unit/integration tests (use test-automation-expert)
  • Performance profiling of the running application (use performance-profiling)
  • Setting up CI/CD pipelines (use github-actions-pipeline-builder or cloudflare-pages-cicd)
  • Optimizing bundle size proactively (use cost-optimizer or framework-specific skills)

Core Capabilities

1. Build Execution and Error Classification

Run the build and classify every diagnostic:

# Capture full build output with timing
time npm run build 2>&1 | tee /tmp/build-output.log

# Separate errors from warnings
grep -E "^(Error|error|ERROR)" /tmp/build-output.log > /tmp/build-errors.log
grep -iE "(warn|warning)" /tmp/build-output.log > /tmp/build-warnings.log

Error classification:

SeverityPatternAction
FatalError: Build failed, non-zero exit codeStop. Fix before proceeding.
Type errorTS\d+:, Type '...' is not assignableFix. These are bugs hiding as warnings.
Missing moduleModule not found, Cannot resolveCheck imports, package.json, and tsconfig paths.
DeprecationDeprecationWarningLog for future cleanup, not blocking.
Size warningexceeds the recommended size limitInvestigate if new, acceptable if known.

Critical rule: A build that exits 0 but emits TypeScript errors to stderr is NOT a passing build. Many frameworks continue past type errors in dev mode. Always check --strict or the equivalent.

2. Output Structure Validation

After a successful build, verify the output directory matches expectations:

# For Next.js static export
OUTPUT_DIR="out"

# Verify critical files exist
REQUIRED_FILES=(
  "index.html"
  "404.html"
  "_next/static"
  "sitemap.xml"
  "robots.txt"
  "favicon.ico"
)

for file in "${REQUIRED_FILES[@]}"; do
  if [ ! -e "$OUTPUT_DIR/$file" ]; then
    echo "MISSING: $file"
  fi
done

# Count HTML pages — compare against expected routes
ACTUAL_PAGES=$(find "$OUTPUT_DIR" -name "*.html" | wc -l)
echo "HTML pages found: $ACTUAL_PAGES"

Framework-specific output expectations:

FrameworkOutput DirKey Artifacts
Next.js (static)out/index.html, _next/static/, _next/data/
Next.js (server).next/.next/server/, .next/static/
Vite/Reactdist/index.html, assets/
Astrodist/Per-route HTML, _astro/
Cloudflare Pagesout/ or dist/_worker.js (if functions), _headers, _redirects

3. Asset Reference Integrity

Broken asset references are the most common post-build failure. An image path that works in dev (via dev server magic) but fails in production (because the path is wrong relative to the output).

# Extract all asset references from HTML files
grep -rhoP '(?:src|href)="([^"]*)"' "$OUTPUT_DIR"/*.html | \
  sed 's/.*="\(.*\)"/\1/' | \
  sort -u > /tmp/referenced-assets.txt

# Check each reference resolves
while read -r ref; do
  # Skip external URLs, data URIs, and anchors
  if [[ "$ref" =~ ^(http|https|data:|#|mailto:) ]]; then
    continue
  fi

  # Resolve relative to output dir
  target="$OUTPUT_DIR/$ref"
  if [ ! -e "$target" ]; then
    echo "BROKEN REF: $ref"
  fi
done < /tmp/referenced-assets.txt

Common broken reference patterns:

  • /images/logo.png when the actual file is at /img/logo.png
  • Hashed filenames (main.abc123.js) not matching because the hash changed
  • Absolute paths that assumed a subdirectory deploy but built for root
  • Case sensitivity differences between macOS (case-insensitive) and Linux (case-sensitive)

4. Bundle Size Tracking

Size regressions are silent killers. A single unguarded import can add 200KB.

# Capture current sizes
find "$OUTPUT_DIR" -type f -name "*.js" -exec du -k {} + | sort -rn > /tmp/js-sizes.txt
find "$OUTPUT_DIR" -type f -name "*.css" -exec du -k {} + | sort -rn > /tmp/css-sizes.txt

# Total JS payload
JS_TOTAL=$(find "$OUTPUT_DIR" -name "*.js" -exec cat {} + | wc -c)
echo "Total JS: $(echo "scale=1; $JS_TOTAL / 1024" | bc)KB"

# Compare against threshold
JS_LIMIT_KB=500
JS_ACTUAL_KB=$((JS_TOTAL / 1024))
if [ "$JS_ACTUAL_KB" -gt "$JS_LIMIT_KB" ]; then
  echo "WARNING: JS bundle ($JS_ACTUAL_KB KB) exceeds limit ($JS_LIMIT_KB KB)"
fi

Size budget guidance:

Asset TypeWarning ThresholdHard LimitWhy
Total JS300KB gzipped500KB gzippedLCP impact on mobile
Single chunk150KB gzipped250KB gzippedParse time
Total CSS50KB gzipped100KB gzippedRender blocking
Individual image200KB500KBLayout shift, bandwidth
Total HTML per page100KB200KBTime to first byte

5. Sitemap and SEO Artifact Validation

# Validate sitemap.xml is well-formed XML
xmllint --noout "$OUTPUT_DIR/sitemap.xml" 2>&1

# Extract URLs from sitemap and verify they correspond to real pages
grep -oP '<loc>\K[^<]+' "$OUTPUT_DIR/sitemap.xml" | while read -r url; do
  # Convert URL to local path
  path=$(echo "$url" | sed 's|https\?://[^/]*||')
  local_path="$OUTPUT_DIR${path}index.html"

  if [ ! -f "$local_path" ] && [ ! -f "$OUTPUT_DIR${path%.html}.html" ]; then
    echo "SITEMAP ORPHAN: $url has no corresponding page"
  fi
done

# Check robots.txt
if [ -f "$OUTPUT_DIR/robots.txt" ]; then
  echo "robots.txt exists"
  # Verify sitemap reference
  grep -q "Sitemap:" "$OUTPUT_DIR/robots.txt" || echo "WARNING: robots.txt missing Sitemap directive"
else
  echo "WARNING: No robots.txt found"
fi

6. Static Export Completeness

For statically exported sites, every route must produce an HTML file:

# Extract all internal links from the built site
grep -rhoP 'href="(/[^"]*)"' "$OUTPUT_DIR" | \
  sed 's/href="//;s/"//' | \
  sort -u > /tmp/internal-links.txt

# Check each link resolves to a file
while read -r link; do
  # Try both /path/index.html and /path.html
  if [ ! -f "$OUTPUT_DIR${link}index.html" ] && \
     [ ! -f "$OUTPUT_DIR${link}.html" ] && \
     [ ! -f "$OUTPUT_DIR${link}" ]; then
    echo "DEAD INTERNAL LINK: $link"
  fi
done < /tmp/internal-links.txt

Decision Points

When to Fail vs Warn

ConditionVerdictReasoning
Build exits non-zeroFAILObvious. Nothing to verify.
TypeScript errors in outputFAILType errors are bugs. Period.
Missing route HTML fileFAIL404 in production.
Broken asset referenceFAILVisible breakage to users.
Bundle size exceeds hard limitFAILPerformance degradation ships.
Bundle size exceeds warning thresholdWARNInvestigate, but may be intentional.
Deprecation warningsWARNTrack, schedule cleanup.
New unrecognized file type in outputWARNCould be intentional, could be accidental.
Sitemap URL with no pageWARNSEO issue, not user-facing breakage.

Build Comparison Strategy

When comparing against a baseline:

  1. Always compare against the last known-good build, not against "what I expect."
  2. Store baselines as JSON manifests: { "files": [...], "sizes": {...}, "routes": [...] }
  3. Diff the manifests to surface additions, removals, and size changes.
  4. New files are usually fine. Missing files are usually bad.

Anti-Patterns

Anti-Pattern: "Build Passed, Ship It"

What it looks like: CI shows green checkmark because npm run build exited 0.

Why wrong: A zero exit code means the build tool finished. It does not mean the output is correct, complete, or deployable. Frameworks routinely exit 0 while emitting warnings about missing pages, oversized bundles, or unresolved imports that fall back to runtime errors.

Instead: Run explicit post-build verification. The build command is step 1. Verification is step 2. They are not the same step.

Anti-Pattern: Manual Spot-Checking

What it looks like: Developer opens the built site in a browser, clicks around for 30 seconds, says "looks good."

Why wrong: Humans cannot visually verify 50 routes, 200 asset references, and bundle sizes in 30 seconds. They check the homepage and maybe one other page.

Instead: Automated scripts that exhaustively check every route and asset. Human review is for visual fidelity, not structural integrity.

Anti-Pattern: Ignoring Warnings

What it looks like: Build output shows 47 warnings. Developer says "those have always been there."

Why wrong: Warning count creep is how technical debt compounds. Each warning was once new. Nobody investigated it. Now there are 47 and nobody reads them. The 48th warning — the one that actually matters — is invisible.

Instead: Treat warning count as a ratchet. Today's count is the ceiling. New warnings must be resolved or explicitly acknowledged before merge. Track warning count in CI and fail if it increases.

Anti-Pattern: Size Limits Without Context

What it looks like: "Our bundle limit is 500KB" applied uniformly to every page.

Why wrong: A landing page and an admin dashboard have different size budgets. The landing page needs to be fast for first-time visitors on mobile. The admin dashboard is used by logged-in users on desktop who will tolerate a larger initial load.

Instead: Per-route or per-entry-point size budgets. Use tools like bundlesize, size-limit, or next/bundle-analyzer to set granular limits.


Quality Checklist

Before declaring a build verified:

  • Build completed with exit code 0
  • Zero TypeScript/compilation errors in output log
  • All expected route HTML files exist in output directory
  • All asset references (src, href) resolve to real files in output
  • No case-sensitivity mismatches between references and filenames
  • Bundle sizes within established budgets (JS, CSS, images)
  • sitemap.xml is well-formed and all URLs correspond to real pages
  • robots.txt exists and references the sitemap
  • favicon.ico and meta assets present
  • No new warnings introduced (warning count stable or decreased)
  • Output directory contains no unexpected large files (>1MB)
  • If static export: internal links all resolve to HTML files
  • If Cloudflare/Vercel/Netlify: platform-specific files present (_redirects, _headers, _worker.js)

Output Contract

This skill produces:

  • Build verification report listing pass/fail/warn for each check category
  • Size diff comparing current build against baseline (if baseline exists)
  • Broken reference list with file:line locations of each broken asset reference
  • Route coverage report mapping expected routes to their HTML file presence
  • Actionable fix list prioritized by severity (FAIL items first, then WARN)

References

  • references/build-manifest-schema.md -- JSON schema for build baseline manifests used in comparisons
  • references/framework-output-maps.md -- Expected output structures for Next.js, Vite, Astro, and Cloudflare Pages

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Use for insight, reframing, contradiction, impasse, and anomaly-driven problem solving when execution effort no longer helps. NOT for routine optimization, error correction, or well-specified tasks with known solution paths.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Apply cognitive task analysis to expert work that depends on perceptual cues, branching judgment, and recurring monitoring loops. Use when decomposing expert capability into agent structure, simulation design, or validation interviews. NOT for ordinary step-by-step SOP capture or simple pipelines with no tacit cue layer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

curiositech의 스킬 모두 보기

이 스킬의 문제 신고