Skip to content

heymegabyte/agent-skills / 15-site-generation

site-generation

Unverified

End-to-end AI website generation pipeline. Claude Opus 4.8 emits Bolt-style <boltArtifact> envelopes (multi-file, plan-first) that customize Vite+React+Tailwind templates from pre-researched business data. Pre-research via APIs, media acquisition, brand extraction, visual inspection via GPT Image 2 vision, R2 upload (per-file content-type by extension), D1 status updates. Supports all business types: SaaS, portfolio, non-profit, restaurant, salon, medical, legal, retail, tech.

FileKindSize
SKILL.mdskill md11.7 KB
_real-ua.mjsscript1.4 KB
blog-import.mjsscript10.5 KB
bolt-artifact-protocol.mdmarkdown8.4 KB
build-breaking-rules.mdmarkdown86.0 KB
build-image-redirects.mjsscript3.4 KB
build-prompts.mdmarkdown86.3 KB
check-routes.shexecutablescript904 B
domain-features.mdmarkdown17.1 KB
enhance-blog-posts.mjsscript12.9 KB
homepage-block-library.mdmarkdown12.6 KB
local-seo.mdmarkdown7.6 KB
media-acquisition.mdmarkdown39.2 KB
non-technical-owner-onboarding.mdmarkdown8.3 KB
page-set-expansion.mdmarkdown19.1 KB
pseo-templates.mdmarkdown13.3 KB
quality-gates.mdmarkdown46.6 KB
research-pipeline.mdmarkdown20.5 KB
scan-assets.mjsscript3.0 KB
small-business-mode.mdmarkdown9.6 KB
source-fidelity-loop.mdmarkdown10.0 KB
squarespace-full-crawl.mjsscript2.8 KB
template-improvements-100.mdmarkdown15.0 KB
template-system.mdmarkdown39.7 KB
validate-assets.mjsscript5.0 KB
validate-banned-slop.mjsscript4.6 KB
validate-brand-colors.mjsexecutablescript6.1 KB
validate-citations.mjsscript6.0 KB
validate-color-contrast.mjsscript5.2 KB
validate-favicon-set.mjsscript4.9 KB
validate-html-entities.mjsscript3.4 KB
validate-image-relevance.mjsscript6.1 KB
validate-internal-links.mjsscript4.3 KB
validate-jsonld-schema.mjsscript5.1 KB
validate-nap-consistency.mjsexecutablescript8.0 KB
validate-page-count.mjsscript4.1 KB
validate-page-set-completeness.mjsscript9.3 KB
validate-photo-authenticity.mjsexecutablescript10.0 KB
validate-pwa-kit.mjsscript7.0 KB
validate-route-metadata.mjsscript7.3 KB
validate-source-fidelity.mjsscript6.0 KB
validate-typography.mjsscript4.0 KB
verticals/local-business-site.mdmarkdown3.8 KB
verticals/nonprofit-site.mdmarkdown3.3 KB
verticals/restaurant-site.mdmarkdown2.6 KB

validate-pwa-kit.mjs

View on GitHub
#!/usr/bin/env node
// validate-pwa-kit.mjs — PWA installability gate (rules/pwa-checklist.md)
// Mandatory: site.webmanifest with required fields + screenshots[]≥3 (mix narrow+wide) +
// maskable icon + ≥2 shortcuts; sw.js (Workbox-generated) at root; offline.html ≤30KB;
// PWA meta tags (theme-color, apple-mobile-web-app-*, manifest link, apple-touch-icon).
// Usage: node validate-pwa-kit.mjs <build-dir>
// Exit 0 = pass, exit 1 = fail.

import { readdirSync, readFileSync, statSync, existsSync } from 'node:fs';
import { join, resolve } from 'node:path';

const BUILD = resolve(process.argv[2] || '.');
const DIST = existsSync(join(BUILD, 'dist')) ? join(BUILD, 'dist') : BUILD;

if (!existsSync(DIST)) {
  console.error(`[validate-pwa-kit] dist dir not found: ${DIST}`);
  process.exit(1);
}

const failures = [];
const warnings = [];

// 1. site.webmanifest
const manifestPath = join(DIST, 'site.webmanifest');
const manifestAlt = join(DIST, 'manifest.webmanifest');
const manifestFile = existsSync(manifestPath) ? manifestPath : existsSync(manifestAlt) ? manifestAlt : null;

if (!manifestFile) {
  failures.push('site.webmanifest (or manifest.webmanifest) missing at dist root');
} else {
  let manifest;
  try {
    manifest = JSON.parse(readFileSync(manifestFile, 'utf8'));
  } catch (err) {
    failures.push(`webmanifest JSON unparsable: ${err.message}`);
    manifest = null;
  }
  if (manifest) {
    const REQ_STRING = ['name', 'short_name', 'description', 'start_url', 'scope', 'display', 'theme_color', 'background_color', 'lang'];
    for (const f of REQ_STRING) {
      if (!manifest[f] || typeof manifest[f] !== 'string') failures.push(`webmanifest missing required field "${f}"`);
    }
    if (manifest.start_url && manifest.start_url !== '/') warnings.push(`webmanifest start_url="${manifest.start_url}" — should usually be "/"`);
    if (manifest.scope && manifest.scope !== '/') warnings.push(`webmanifest scope="${manifest.scope}" — should usually be "/"`);
    if (manifest.display && !['standalone', 'fullscreen', 'minimal-ui'].includes(manifest.display)) {
      warnings.push(`webmanifest display="${manifest.display}" — recommended "standalone"`);
    }
    if (!Array.isArray(manifest.categories) || manifest.categories.length === 0) {
      warnings.push('webmanifest categories[] missing or empty');
    }
    if (!Array.isArray(manifest.icons) || manifest.icons.length === 0) {
      failures.push('webmanifest icons[] missing or empty');
    } else {
      const sizesPresent = new Set();
      let hasMaskable = false;
      for (const icon of manifest.icons) {
        if (icon.sizes) sizesPresent.add(icon.sizes);
        if (typeof icon.purpose === 'string' && icon.purpose.includes('maskable')) hasMaskable = true;
      }
      const REQ_SIZES = ['192x192', '512x512'];
      for (const s of REQ_SIZES) {
        if (!sizesPresent.has(s)) failures.push(`webmanifest icons[] missing required size ${s}`);
      }
      if (!hasMaskable) failures.push('webmanifest icons[] missing maskable icon (purpose: "maskable" or "any maskable")');
    }
    if (!Array.isArray(manifest.screenshots) || manifest.screenshots.length < 3) {
      failures.push(`webmanifest screenshots[] needs ≥3 entries (got ${manifest.screenshots?.length ?? 0})`);
    } else {
      const hasNarrow = manifest.screenshots.some((s) => s.form_factor === 'narrow');
      const hasWide = manifest.screenshots.some((s) => s.form_factor === 'wide');
      if (!hasNarrow) failures.push('webmanifest screenshots[] missing narrow form_factor');
      if (!hasWide) failures.push('webmanifest screenshots[] missing wide form_factor');
    }
    if (!Array.isArray(manifest.shortcuts) || manifest.shortcuts.length < 2) {
      warnings.push(`webmanifest shortcuts[] should have ≥2 deep links (got ${manifest.shortcuts?.length ?? 0})`);
    }
    if (manifest.prefer_related_applications !== false) {
      warnings.push('webmanifest prefer_related_applications should be explicitly false');
    }
  }
}

// 2. sw.js
const swPath = join(DIST, 'sw.js');
if (!existsSync(swPath)) {
  failures.push('sw.js missing at dist root (Workbox-generated service worker required)');
} else {
  const sw = readFileSync(swPath, 'utf8');
  if (!/workbox|precache|registerRoute|NetworkFirst|CacheFirst|StaleWhileRevalidate/i.test(sw)) {
    warnings.push('sw.js does not appear Workbox-generated (no workbox/precache/strategy keywords)');
  }
  if (!/skipWaiting|self\.skipWaiting/.test(sw)) warnings.push('sw.js missing skipWaiting');
  if (!/clients\.claim|clientsClaim/.test(sw)) warnings.push('sw.js missing clients.claim');
}

// 3. offline.html
const offlinePath = join(DIST, 'offline.html');
if (!existsSync(offlinePath)) {
  failures.push('offline.html missing at dist root');
} else {
  const size = statSync(offlinePath).size;
  if (size > 30 * 1024) {
    failures.push(`offline.html size ${(size / 1024).toFixed(1)}KB exceeds 30KB cap (must inline CSS+logo, no external assets)`);
  }
  const offlineHtml = readFileSync(offlinePath, 'utf8');
  if (/<link\s+[^>]*href=["']https?:\/\//i.test(offlineHtml) || /<script\s+[^>]*src=["']https?:\/\//i.test(offlineHtml)) {
    failures.push('offline.html contains external asset references (must be self-contained)');
  }
}

// 4. PWA meta tags in every HTML page
function walkHtml(dir) {
  const out = [];
  for (const e of readdirSync(dir)) {
    const p = join(dir, e);
    if (statSync(p).isDirectory()) out.push(...walkHtml(p));
    else if (e.toLowerCase().endsWith('.html')) out.push(p);
  }
  return out;
}
const REQ_META = [
  { name: 'theme-color', re: /<meta\s+name=["']theme-color["']/i },
  { name: 'apple-mobile-web-app-capable', re: /<meta\s+name=["']apple-mobile-web-app-capable["']\s+content=["']yes["']/i },
  { name: 'mobile-web-app-capable', re: /<meta\s+name=["']mobile-web-app-capable["']\s+content=["']yes["']/i },
  { name: 'manifest-link', re: /<link\s+rel=["']manifest["']\s+href=["'][^"']+["']/i },
  { name: 'apple-touch-icon', re: /<link\s+rel=["']apple-touch-icon["']/i },
];
const htmlFiles = walkHtml(DIST).filter((p) => !p.endsWith('offline.html'));
let metaFailureCount = 0;
for (const file of htmlFiles) {
  const html = readFileSync(file, 'utf8');
  for (const { name, re } of REQ_META) {
    if (!re.test(html)) {
      metaFailureCount++;
      if (metaFailureCount <= 20) failures.push(`${file.replace(DIST + '/', '')}: missing PWA meta "${name}"`);
    }
  }
}
if (metaFailureCount > 20) failures.push(`...+${metaFailureCount - 20} more PWA meta failures across HTML files`);

if (warnings.length) {
  console.warn(`\n[validate-pwa-kit] ${warnings.length} warnings:`);
  warnings.forEach((w) => console.warn(`  ⚠ ${w}`));
}
if (failures.length) {
  console.error(`\n[validate-pwa-kit] ${failures.length} failures:`);
  failures.forEach((f) => console.error(`  ✗ ${f}`));
  console.error('\n[validate-pwa-kit] BUILD GATE FAILED — see rules/pwa-checklist.md');
  process.exit(1);
}
console.log(`[validate-pwa-kit] ✓ webmanifest + sw.js + offline.html + PWA meta tags valid across ${htmlFiles.length} HTML pages.`);
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall