-
Notifications
You must be signed in to change notification settings - Fork 85
Comparing changes
Open a pull request
base repository: nucliweb/webperf-snippets
base: v1.1.0
head repository: nucliweb/webperf-snippets
compare: v1.2.0
- 9 commits
- 100 files changed
- 1 contributor
Commits on Mar 17, 2026
-
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
Configuration menu - View commit details
-
Copy full SHA for 5c4eabc - Browse repository at this point
Copy the full SHA 5c4eabcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 10e05e8 - Browse repository at this point
Copy the full SHA 10e05e8View commit details -
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)
Configuration menu - View commit details
-
Copy full SHA for 526af1e - Browse repository at this point
Copy the full SHA 526af1eView commit details -
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.Configuration menu - View commit details
-
Copy full SHA for e03a84a - Browse repository at this point
Copy the full SHA e03a84aView commit details -
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 reposConfiguration menu - View commit details
-
Copy full SHA for 40b945a - Browse repository at this point
Copy the full SHA 40b945aView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 1fe45eb - Browse repository at this point
Copy the full SHA 1fe45ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fcaa5f - Browse repository at this point
Copy the full SHA 4fcaa5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c211c1 - Browse repository at this point
Copy the full SHA 3c211c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc9c31d - Browse repository at this point
Copy the full SHA dc9c31dView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.1.0...v1.2.0