Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nucliweb/webperf-snippets
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 538196a
Choose a base ref
...
head repository: nucliweb/webperf-snippets
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dc9c31d
Choose a head ref
  • 9 commits
  • 100 files changed
  • 1 contributor

Commits on Mar 17, 2026

  1. fix: correct bugs and inconsistencies in Core Web Vitals snippets

    Bugs fixed:
    - LCP-Video-Candidate: apply activationStart correction in both non-video
      and video return paths (bfcache navigations were returning wrong values)
    - LCP + LCP-Trail: use getComputedStyle for background-image detection
      instead of el.style, which only reads inline styles
    - CLS: add message and getDataFn to synchronous return so agents know
      they can call getCLS() after interactions for an updated value
    - INP: remove misleading rating: "good" from getINP() error case when no
      interactions recorded; add getDataFn: "getINP" so agents can retry
    
    Inconsistencies resolved:
    - LCP-Sub-Parts: align internal SUB_PARTS keys with schema output keys
      (loadDelay → resourceLoadDelay, loadTime → resourceLoadTime, etc.)
    - LCP-Sub-Parts + LCP-Trail: preserve hostname in URL for cross-origin
      resources (cdn.example.com/…/hero.jpg instead of just hero.jpg)
    - LCP-Image-Entropy: add LCP element highlighting, consistent with all
      other LCP scripts
    
    SKILL.md / schema improvements:
    - WORKFLOWS: add Error Recovery section to decision tree
    - WORKFLOWS: mark cross-skill scripts not yet available as (pending)
    - WORKFLOWS: clarify cross-skill triggers require reporting to parent
      agent (context: fork — subagent cannot invoke other skills directly)
    - WORKFLOWS: document getINPDetails() usage in INP debugging workflow
    - SCHEMA: update CLS schema to include message and getDataFn fields
    - SCHEMA: document getINPDetails() return shape and when to use it
    nucliweb committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    5c4eabc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10e05e8 View commit details
    Browse the repository at this point in the history
  3. perf: reduce context duplication in WebPerf skills (-16.6% lines)

    Remove redundant sections from WORKFLOWS.md sources and the skill
    generator that duplicated information already present in Decision Trees.
    
    Changes in generate-skills.js:
    - Remove inline `references/snippets.md` pointer after script list
      (already listed in ## References section)
    - Remove duplicate execution footer (already in intro paragraph)
    - Merge "Skills by Category" and "Quick Reference" tables in meta-skill
      into a single "Quick Reference" table (Skill | Snippets | Trigger phrases)
    
    Changes in WORKFLOWS.md sources:
    - Interaction: remove ### Cross-Skill Triggers (30 lines); preserve
      unique webperf-core-web-vitals:INP.js trigger inline in Decision Tree
    - Loading: remove ### Image Loading Audit (9 lines); image queries route
      through webperf-media which already cross-references these scripts
    - Media: remove ### Cross-Skill Triggers (38 lines) and
      ### Common Issues and Resolutions (38 lines); both were 1:1 summaries
      of the Decision Tree; unique trigger (images competing with critical
      resources) moved inline to After Image-Element-Audit.js node
    - Resources: remove ### Cross-Skill Triggers (29 lines),
      ### Real-World Scenarios (25 lines), and ### Testing Adaptive Loading
      (18 lines); unique triggers (TTFB-Sub-Parts, Service-Worker-Analysis
      for high RTT; LCP.js/INP.js for slow connections) moved inline to DT;
      reformat ### Adaptive Loading Implementation Guide from fenced
      javascript blocks to bullet lists (-8 lines)
    
    No actionable information lost: every removed item was already covered
    by an inline Decision Tree node or has been incorporated into one.
    
    SKILL.md line counts (before → after):
      webperf-core-web-vitals  238 → 235  (-1.3%)
      webperf-interaction      271 → 238  (-12.2%)
      webperf-loading          228 → 216  (-5.3%)
      webperf-media            292 → 217  (-25.7%)
      webperf-resources        288 → 198  (-31.3%)
      webperf (meta)            51 →  37  (-27.5%)
      total                   1368 → 1141 (-16.6%, -227 lines)
    nucliweb committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    526af1e View commit details
    Browse the repository at this point in the history
  4. feat: generate scripts-readable/ for external distribution

    Add buildReadableScript() to generate-skills.js, producing a
    skills/{category}/scripts-readable/ directory alongside the existing
    minified scripts/ output.
    
    Readable scripts are intended for contribution to external repos (e.g.
    chrome-devtools-mcp) where minified code is not appropriate. They differ
    from the minified build in three ways:
    - No header comment (file path / sha256 / GitHub URL)
    - No console.* output code (removed via Terser drop_console)
    - Readable formatting (beautify, 2-space indent, mangle disabled)
    
    Terser options used: defaults:false to suppress all transforms except
    drop_console + unused DCE + dead_code removal. Post-processing restores
    number literals shortened by the output generator (1e4 → 10000, .1 → 0.1)
    and removes void 0 placeholders left by drop_console.
    
    Note: display-only infrastructure (RATING constants, logXxx helpers) that
    served only console output remains as inert stubs after console removal.
    The scripts are functionally correct — stubs execute but have no effect.
    nucliweb committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    e03a84a View commit details
    Browse the repository at this point in the history
  5. fix: move readable scripts from skills/ to dist/ (out of distribution)

    scripts-readable/ was generated inside skills/{category}/, causing it to
    be included in the skills distribution package (npx install-from-release,
    install-skills, install-global). These scripts are build artifacts for
    external repo contribution, not part of the skill consumed by agents.
    
    Move output to dist/{skill}/ at repo root. The dist/ directory is never
    copied to .claude/skills/ nor included in the release zip.
    
    Output structure:
      skills/{skill}/scripts/  — minified, for Claude Code skill loading
      dist/{skill}/            — readable, no headers/console, for external repos
    nucliweb committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    40b945a View commit details
    Browse the repository at this point in the history
  6. fix: sync .claude/skills/ cleanly without preserving stale subdirs

    copyRecursive was additive — subdirectories removed from skills/ (like
    scripts-readable/) were never deleted from .claude/skills/. Fix: remove
    each destination subdirectory before copying, keeping stale files out
    while preserving unmanaged files (e.g. evals/) at the top level.
    nucliweb committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    1fe45eb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4fcaa5f View commit details
    Browse the repository at this point in the history
  8. chore: bump version to 1.2.0

    nucliweb committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    3c211c1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dc9c31d View commit details
    Browse the repository at this point in the history
Loading