@kensaurus/skills 0.0.0-stage → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +53 -0
- package/.claude-plugin/plugin.json +40 -0
- package/.cursor-plugin/plugin.json +38 -0
- package/.mcp.json +28 -0
- package/CHANGELOG.md +1790 -0
- package/LICENSE +21 -0
- package/LICENSE-APACHE +62 -0
- package/NOTICE +13 -0
- package/README.md +821 -2
- package/SECURITY.md +55 -0
- package/agents/code-reviewer.md +60 -0
- package/agents/completion-judge.md +89 -0
- package/agents/db-migrator.md +125 -0
- package/agents/debugger.md +47 -0
- package/agents/deploy-checker.md +100 -0
- package/agents/perf-monitor.md +74 -0
- package/assets/favicon.png +0 -0
- package/assets/logo-light.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/logo.svg +6 -0
- package/assets/og.png +0 -0
- package/bin/install.mjs +1127 -0
- package/bin/kenji.js +2 -0
- package/commands/adr.md +17 -0
- package/commands/aeo-plan.md +18 -0
- package/commands/arch-boundaries.md +17 -0
- package/commands/aso-plan.md +18 -0
- package/commands/auth-flows.md +19 -0
- package/commands/backup-plan.md +17 -0
- package/commands/burndown-full.md +25 -0
- package/commands/capacitor-plan.md +18 -0
- package/commands/codemod-safety.md +22 -0
- package/commands/commit.md +18 -0
- package/commands/complete-everything.md +40 -0
- package/commands/cost-plan.md +19 -0
- package/commands/deadcode-plan.md +26 -0
- package/commands/deadcode.md +32 -0
- package/commands/debug-issue.md +17 -0
- package/commands/deps-plan.md +18 -0
- package/commands/docs-plan.md +17 -0
- package/commands/doctrine.md +19 -0
- package/commands/error-plan.md +19 -0
- package/commands/feedback-to-closure.md +36 -0
- package/commands/fix-issue.md +76 -0
- package/commands/gate-logic.md +26 -0
- package/commands/green-repo.md +36 -0
- package/commands/grill-me.md +19 -0
- package/commands/gtm-plan.md +21 -0
- package/commands/gtm-weekly.md +17 -0
- package/commands/gtm.md +22 -0
- package/commands/handoff.md +15 -0
- package/commands/housekeep-backlog.md +18 -0
- package/commands/housekeep-files.md +22 -0
- package/commands/housekeep-gates.md +18 -0
- package/commands/instant-nav.md +11 -0
- package/commands/integrity-plan.md +19 -0
- package/commands/launch-kit.md +16 -0
- package/commands/mcp-guide.md +40 -0
- package/commands/mobile-plan.md +19 -0
- package/commands/native-rn-monorepo/README.md +78 -0
- package/commands/native-rn-monorepo/android-build.md +26 -0
- package/commands/native-rn-monorepo/android-install.md +32 -0
- package/commands/native-rn-monorepo/android-logcat.md +37 -0
- package/commands/native-rn-monorepo/ios-ci-logs.md +56 -0
- package/commands/native-rn-monorepo/ios-ci-status.md +52 -0
- package/commands/native-rn-monorepo/ios-ci-trigger.md +59 -0
- package/commands/native-rn-monorepo/rn-reset.md +50 -0
- package/commands/native-rn-monorepo/rn-ship-ios.md +67 -0
- package/commands/native-rn-monorepo/rn-verify.md +53 -0
- package/commands/perf-plan.md +18 -0
- package/commands/plan-mode.md +74 -0
- package/commands/pr.md +16 -0
- package/commands/pricing-plan.md +20 -0
- package/commands/privacy-plan.md +18 -0
- package/commands/readability.md +12 -0
- package/commands/readme.md +15 -0
- package/commands/refactor.md +15 -0
- package/commands/release-prep.md +17 -0
- package/commands/research.md +25 -0
- package/commands/responsive-audit.md +21 -0
- package/commands/review-code.md +18 -0
- package/commands/rls-plan.md +18 -0
- package/commands/secrets-plan.md +18 -0
- package/commands/security-plan.md +19 -0
- package/commands/ship-and-observe.md +36 -0
- package/commands/skill-conflicts.md +19 -0
- package/commands/slop-plan.md +18 -0
- package/commands/stub-plan.md +18 -0
- package/commands/test-mutation.md +16 -0
- package/commands/test-plan.md +17 -0
- package/commands/test.md +29 -0
- package/commands/thirdparty-web-interface-guidelines.md +185 -0
- package/commands/uiux-plan.md +18 -0
- package/commands/uiux.md +45 -0
- package/commands/update-deps.md +21 -0
- package/commands/validation-plan.md +19 -0
- package/commands-portable/fix-issue.md +72 -0
- package/commands-portable/plan-mode.md +92 -0
- package/commands-portable/research.md +91 -0
- package/docs/screenshots/README.md +5 -0
- package/docs/screenshots/audit-dark.png +0 -0
- package/docs/screenshots/build-dark.png +0 -0
- package/docs/screenshots/grill-dark.png +0 -0
- package/docs/screenshots/hero-dark.png +0 -0
- package/docs/screenshots/hero-light.png +0 -0
- package/docs/screenshots/ship-dark.png +0 -0
- package/docs/screenshots/src/showcase.html +320 -0
- package/hooks/completion-gate.mjs +258 -0
- package/hooks/cursor-hooks.json +13 -0
- package/hooks/hooks.json +15 -0
- package/install.sh +21 -0
- package/llms.txt +40 -0
- package/mcp/README.md +266 -0
- package/mcp/VERSIONS.md +41 -0
- package/mcp/mcp-full.json.template +124 -0
- package/mcp/mcp.json.template +29 -0
- package/mcp/pinned-versions.json +27 -0
- package/package.json +94 -4
- package/rules/approved-plan-execution.mdc +65 -0
- package/rules/full-stack-ship-discipline.mdc +37 -0
- package/rules/native-rn-monorepo/README.md +63 -0
- package/rules/native-rn-monorepo/_project.mdc +69 -0
- package/rules/native-rn-monorepo/native-android.mdc +72 -0
- package/rules/native-rn-monorepo/native-ios.mdc +61 -0
- package/rules/native-rn-monorepo/react-native-js.mdc +78 -0
- package/rules/native-rn-monorepo/web.mdc +60 -0
- package/rules/project-starter/components.mdc +54 -0
- package/rules/project-starter/data-fetching.mdc +77 -0
- package/rules/project-starter/git.mdc +41 -0
- package/rules/project-starter/supabase.mdc +37 -0
- package/rules/project-starter/tailwind.mdc +48 -0
- package/rules/project-starter/typescript.mdc +36 -0
- package/rules/project-starter/web-performance.mdc +42 -0
- package/rules/senior-engineer.mdc +30 -0
- package/rules/shell-first-search.mdc +19 -0
- package/rules/skill-workflows.mdc +35 -0
- package/rules/verification-before-completion.mdc +57 -0
- package/skills/audit-accessibility/SKILL.md +441 -0
- package/skills/audit-agent-speed/SKILL.md +181 -0
- package/skills/audit-agent-speed/scripts/stop-typecheck.mjs +151 -0
- package/skills/audit-analytics/SKILL.md +138 -0
- package/skills/audit-auth-flows/SKILL.md +267 -0
- package/skills/audit-backend-architecture/SKILL.md +266 -0
- package/skills/audit-backend-architecture/references/patterns.md +386 -0
- package/skills/audit-bundle-size/SKILL.md +295 -0
- package/skills/audit-cicd/SKILL.md +218 -0
- package/skills/audit-code-quality/SKILL.md +314 -0
- package/skills/audit-code-review/SKILL.md +289 -0
- package/skills/audit-codemod-safety/SKILL.md +159 -0
- package/skills/audit-db-schema/SKILL.md +465 -0
- package/skills/audit-db-schema/references/details.md +110 -0
- package/skills/audit-doctrine/SKILL.md +189 -0
- package/skills/audit-env-parity/SKILL.md +133 -0
- package/skills/audit-fe-api/SKILL.md +458 -0
- package/skills/audit-gate-logic/SKILL.md +219 -0
- package/skills/audit-i18n/SKILL.md +339 -0
- package/skills/audit-infra-cost/SKILL.md +142 -0
- package/skills/audit-langfuse-llm/SKILL.md +468 -0
- package/skills/audit-langfuse-llm/references/details.md +226 -0
- package/skills/audit-llm-security/SKILL.md +147 -0
- package/skills/audit-monetization-iap/SKILL.md +137 -0
- package/skills/audit-payment-system/SKILL.md +268 -0
- package/skills/audit-payment-system/references/checklist.md +283 -0
- package/skills/audit-performance/SKILL.md +383 -0
- package/skills/audit-performance/references/loading-priority-2026.md +81 -0
- package/skills/audit-realworld/SKILL.md +287 -0
- package/skills/audit-registry-listing/SKILL.md +122 -0
- package/skills/audit-resilience/SKILL.md +153 -0
- package/skills/audit-responsive/SKILL.md +221 -0
- package/skills/audit-responsive/references/checklist.md +166 -0
- package/skills/audit-security/SKILL.md +289 -0
- package/skills/audit-skill-conflicts/SKILL.md +178 -0
- package/skills/audit-ui-states/SKILL.md +146 -0
- package/skills/audit-uiux-design-system/SKILL.md +475 -0
- package/skills/audit-uiux-design-system/references/details.md +71 -0
- package/skills/audit-ux/SKILL.md +381 -0
- package/skills/audit-ux/references/details.md +245 -0
- package/skills/audit-ux-journeys/SKILL.md +215 -0
- package/skills/audit-ux-journeys/references/checklist.md +179 -0
- package/skills/backend-db-performance/SKILL.md +441 -0
- package/skills/backend-error-handling/SKILL.md +489 -0
- package/skills/backend-error-handling/references/details.md +58 -0
- package/skills/backend-observability/SKILL.md +88 -0
- package/skills/backend-patterns/SKILL.md +499 -0
- package/skills/backend-patterns/references/architecture-patterns.md +298 -0
- package/skills/backend-realtime/SKILL.md +403 -0
- package/skills/backend-realtime/references/patterns.md +74 -0
- package/skills/burndown-full/SKILL.md +174 -0
- package/skills/complete-everything/SKILL.md +295 -0
- package/skills/data-pipeline/SKILL.md +109 -0
- package/skills/data-visualization/SKILL.md +488 -0
- package/skills/debug-error/SKILL.md +322 -0
- package/skills/debug-fe-be-integration/SKILL.md +459 -0
- package/skills/debug-sentry-monitor/SKILL.md +497 -0
- package/skills/debug-sentry-monitor/references/details.md +165 -0
- package/skills/deploy-npm/SKILL.md +394 -0
- package/skills/deploy-npm/references/example-mushi-mushi.md +52 -0
- package/skills/deploy-verify/SKILL.md +489 -0
- package/skills/design-api/SKILL.md +379 -0
- package/skills/design-canvas/SKILL.md +155 -0
- package/skills/design-email/SKILL.md +370 -0
- package/skills/design-frontend/SKILL.md +143 -0
- package/skills/design-generative-art/SKILL.md +474 -0
- package/skills/design-mobile-first/SKILL.md +506 -0
- package/skills/design-motion/SKILL.md +333 -0
- package/skills/design-motion/references/delight-interactions.md +191 -0
- package/skills/design-prd/SKILL.md +443 -0
- package/skills/design-system/SKILL.md +457 -0
- package/skills/design-theme/SKILL.md +226 -0
- package/skills/design-theme/themes/tsumagoi-ranch.md +150 -0
- package/skills/docs-adr/SKILL.md +168 -0
- package/skills/docs-coauthor/SKILL.md +368 -0
- package/skills/docs-comparison-pages/SKILL.md +117 -0
- package/skills/docs-domain-modeling/SKILL.md +97 -0
- package/skills/docs-launch-kit/SKILL.md +139 -0
- package/skills/docs-writer/SKILL.md +469 -0
- package/skills/enhance-agent-guardrails/SKILL.md +164 -0
- package/skills/enhance-arch-boundaries/SKILL.md +154 -0
- package/skills/enhance-capacitor-ui/SKILL.md +463 -0
- package/skills/enhance-capacitor-ui/references/details.md +750 -0
- package/skills/enhance-email-deliverability/SKILL.md +143 -0
- package/skills/enhance-growth-loops/SKILL.md +122 -0
- package/skills/enhance-lifecycle-email/SKILL.md +130 -0
- package/skills/enhance-motion/SKILL.md +193 -0
- package/skills/enhance-onboarding/SKILL.md +148 -0
- package/skills/enhance-pwa/SKILL.md +303 -0
- package/skills/enhance-readability/SKILL.md +146 -0
- package/skills/enhance-readme/SKILL.md +496 -0
- package/skills/enhance-readme/package-lock.json +187 -0
- package/skills/enhance-readme/package.json +17 -0
- package/skills/enhance-readme/scripts/generate-readme-blocks.mjs +199 -0
- package/skills/enhance-readme/scripts/record-readme-tour.mjs +442 -0
- package/skills/enhance-skill-prompts/SKILL.md +167 -0
- package/skills/enhance-skill-prompts/references/exemplar-audit-auth-flows.md +311 -0
- package/skills/enhance-ux-laws/SKILL.md +409 -0
- package/skills/enhance-web-conversion/SKILL.md +155 -0
- package/skills/enhance-web-forms/SKILL.md +154 -0
- package/skills/enhance-web-instant-nav/SKILL.md +138 -0
- package/skills/enhance-web-instant-nav/references/bfcache-blockers.md +23 -0
- package/skills/enhance-web-instant-nav/references/early-hints.md +33 -0
- package/skills/enhance-web-instant-nav/references/speculation-rules.md +44 -0
- package/skills/enhance-web-landing/SKILL.md +459 -0
- package/skills/enhance-web-landing/references/details.md +773 -0
- package/skills/enhance-web-redesign/SKILL.md +228 -0
- package/skills/enhance-web-seo/SKILL.md +276 -0
- package/skills/enhance-web-ui/SKILL.md +473 -0
- package/skills/enhance-web-ui/references/details.md +674 -0
- package/skills/enhance-web-ux/HEURISTICS.md +248 -0
- package/skills/enhance-web-ux/PATTERNS.md +375 -0
- package/skills/enhance-web-ux/SKILL.md +464 -0
- package/skills/enhance-web-ux/examples.md +222 -0
- package/skills/enhance-web-ux/references/details.md +406 -0
- package/skills/enhance-web-web3d/SKILL.md +397 -0
- package/skills/enhance-web-web3d/references/css-canvas-effects.md +180 -0
- package/skills/handoff/SKILL.md +66 -0
- package/skills/housekeep-backlog/SKILL.md +149 -0
- package/skills/housekeep-dead-code/SKILL.md +387 -0
- package/skills/housekeep-dead-code/references/ratchet-ci.md +205 -0
- package/skills/housekeep-dead-code/references/supabase-hygiene.md +152 -0
- package/skills/housekeep-design/SKILL.md +207 -0
- package/skills/housekeep-files/SKILL.md +220 -0
- package/skills/housekeep-files/references/naming-and-catalog.md +86 -0
- package/skills/housekeep-files/scripts/housekeep-files.ps1 +360 -0
- package/skills/housekeep-files/scripts/housekeep-files.sh +238 -0
- package/skills/housekeep-gates/SKILL.md +174 -0
- package/skills/iterate-agent-harness/SKILL.md +137 -0
- package/skills/iterate-gtm-weekly/SKILL.md +103 -0
- package/skills/iterate-post-launch/SKILL.md +292 -0
- package/skills/meta-mcp-builder/SKILL.md +313 -0
- package/skills/meta-skill-creator/SKILL.md +304 -0
- package/skills/mobile-capacitor-platform/SKILL.md +103 -0
- package/skills/mobile-emulator-start/SKILL.md +296 -0
- package/skills/mobile-emulator-test/SKILL.md +491 -0
- package/skills/mobile-emulator-test/references/details.md +478 -0
- package/skills/mobile-rn-performance/SKILL.md +107 -0
- package/skills/mobile-rn-screen/SKILL.md +476 -0
- package/skills/mobile-rn-screen/references/details.md +785 -0
- package/skills/mushi-health/SKILL.md +206 -0
- package/skills/mushi-integration/SKILL.md +257 -0
- package/skills/plan-aeo-readiness/SKILL.md +166 -0
- package/skills/plan-antislop/SKILL.md +281 -0
- package/skills/plan-aso/SKILL.md +149 -0
- package/skills/plan-backup-dr/SKILL.md +131 -0
- package/skills/plan-capacitor-hardening/SKILL.md +217 -0
- package/skills/plan-data-integrity/SKILL.md +187 -0
- package/skills/plan-dead-code/SKILL.md +386 -0
- package/skills/plan-dead-code/references/knip-config.md +214 -0
- package/skills/plan-dead-code/references/output-templates.md +133 -0
- package/skills/plan-dead-code/references/preservation-contract.md +50 -0
- package/skills/plan-dead-code/references/residue-greps.md +84 -0
- package/skills/plan-dependency-provenance/SKILL.md +200 -0
- package/skills/plan-docs-sync/SKILL.md +143 -0
- package/skills/plan-docs-sync/references/drift-taxonomy.md +43 -0
- package/skills/plan-docs-sync/references/output-templates.md +33 -0
- package/skills/plan-docs-sync/references/preservation-contract.md +17 -0
- package/skills/plan-error-handling/SKILL.md +205 -0
- package/skills/plan-gtm/SKILL.md +276 -0
- package/skills/plan-gtm/references/benchmarks-2026.md +183 -0
- package/skills/plan-input-validation/SKILL.md +179 -0
- package/skills/plan-llm-cost-guardrails/SKILL.md +176 -0
- package/skills/plan-mobile-readiness/SKILL.md +171 -0
- package/skills/plan-perf-audit/SKILL.md +145 -0
- package/skills/plan-perf-audit/references/audit-scope.md +51 -0
- package/skills/plan-perf-audit/references/output-templates.md +33 -0
- package/skills/plan-perf-audit/references/preservation-contract.md +13 -0
- package/skills/plan-pricing/SKILL.md +173 -0
- package/skills/plan-privacy-compliance/SKILL.md +148 -0
- package/skills/plan-rls-audit/SKILL.md +231 -0
- package/skills/plan-secrets-audit/SKILL.md +181 -0
- package/skills/plan-security-audit/SKILL.md +168 -0
- package/skills/plan-security-audit/references/output-templates.md +36 -0
- package/skills/plan-security-audit/references/owasp-supabase-scope.md +55 -0
- package/skills/plan-security-audit/references/preservation-contract.md +18 -0
- package/skills/plan-stub-checker/SKILL.md +216 -0
- package/skills/plan-stub-checker/references/detection-methodology.md +75 -0
- package/skills/plan-stub-checker/references/detection-taxonomy.md +34 -0
- package/skills/plan-stub-checker/references/output-templates.md +63 -0
- package/skills/plan-stub-checker/references/preservation-contract.md +24 -0
- package/skills/plan-test-coverage/SKILL.md +170 -0
- package/skills/plan-test-coverage/references/methodology.md +54 -0
- package/skills/plan-test-coverage/references/output-templates.md +34 -0
- package/skills/plan-test-coverage/references/preservation-contract.md +15 -0
- package/skills/plan-uiux-unification/SKILL.md +230 -0
- package/skills/plan-uiux-unification/references/output-templates.md +67 -0
- package/skills/plan-uiux-unification/references/phase-workbook.md +85 -0
- package/skills/plan-uiux-unification/references/preservation-contract.md +24 -0
- package/skills/protocol-browser-anti-stall/SKILL.md +211 -0
- package/skills/protocol-browser-anti-stall/references/mcp-to-cli-map.md +113 -0
- package/skills/protocol-browser-anti-stall/references/playwright-session-coordination.md +170 -0
- package/skills/research/SKILL.md +422 -0
- package/skills/test-exploratory/SKILL.md +165 -0
- package/skills/test-exploratory/references/charter-template.md +29 -0
- package/skills/test-load/SKILL.md +126 -0
- package/skills/test-mutation/SKILL.md +160 -0
- package/skills/test-playwright/SKILL.md +354 -0
- package/skills/test-qa/SKILL.md +364 -0
- package/skills/test-qa/references/details.md +268 -0
- package/skills/test-red-team/SKILL.md +386 -0
- package/skills/test-red-team/references/owasp-attack-checklist.md +193 -0
- package/skills/test-unit/SKILL.md +259 -0
- package/skills/test-unit/references/details.md +267 -0
- package/skills/test-visual-regression/SKILL.md +132 -0
- package/skills/thirdparty-emil-design-eng/ATTRIBUTION.md +20 -0
- package/skills/thirdparty-emil-design-eng/SKILL.md +21 -0
- package/skills/thirdparty-emil-design-eng/references/emil-design-eng.md +676 -0
- package/skills/thirdparty-ui-ux-pro-max/ATTRIBUTION.md +22 -0
- package/skills/thirdparty-ui-ux-pro-max/SKILL.md +304 -0
- package/skills/thirdparty-ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/thirdparty-ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/thirdparty-ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/thirdparty-ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/thirdparty-ui-ux-pro-max/data/products.csv +97 -0
- package/skills/thirdparty-ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/thirdparty-ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/thirdparty-ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/thirdparty-ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/thirdparty-ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/thirdparty-ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/search.py +114 -0
- package/skills/thirdparty-web-interface-guidelines/ATTRIBUTION.md +23 -0
- package/skills/thirdparty-web-interface-guidelines/SKILL.md +190 -0
- package/skills/workflow-build-feature/SKILL.md +118 -0
- package/skills/workflow-coding-discipline/SKILL.md +140 -0
- package/skills/workflow-environment-ready/SKILL.md +128 -0
- package/skills/workflow-feature-flag/SKILL.md +262 -0
- package/skills/workflow-feedback-to-closure/SKILL.md +165 -0
- package/skills/workflow-fix-and-ship/SKILL.md +136 -0
- package/skills/workflow-git-commit/SKILL.md +200 -0
- package/skills/workflow-green-repo/SKILL.md +166 -0
- package/skills/workflow-grilling/SKILL.md +73 -0
- package/skills/workflow-gtm/SKILL.md +153 -0
- package/skills/workflow-housekeep/SKILL.md +453 -0
- package/skills/workflow-housekeep/references/templates.md +109 -0
- package/skills/workflow-launch-ready/SKILL.md +145 -0
- package/skills/workflow-merge-conflicts/SKILL.md +62 -0
- package/skills/workflow-onboard/SKILL.md +99 -0
- package/skills/workflow-parallel-agents/SKILL.md +164 -0
- package/skills/workflow-pr/SKILL.md +197 -0
- package/skills/workflow-quality-gate/SKILL.md +147 -0
- package/skills/workflow-refactor/SKILL.md +274 -0
- package/skills/workflow-release-prep/SKILL.md +207 -0
- package/skills/workflow-ship-and-observe/SKILL.md +164 -0
- package/skills/workflow-spec-tdd/SKILL.md +141 -0
- package/skills/workflow-spec-tdd/references/spec-template.md +126 -0
- package/skills/workflow-spec-tdd/references/tdd-patterns.md +167 -0
- package/skills-cursor/babysit/SKILL.md +17 -0
- package/skills-cursor/canvas/SKILL.md +142 -0
- package/skills-cursor/canvas/sdk/canvas-tokens.d.ts +235 -0
- package/skills-cursor/canvas/sdk/chart-primitives.d.ts +200 -0
- package/skills-cursor/canvas/sdk/dag-layout.d.ts +102 -0
- package/skills-cursor/canvas/sdk/diff-view.d.ts +130 -0
- package/skills-cursor/canvas/sdk/form-primitives.d.ts +194 -0
- package/skills-cursor/canvas/sdk/hooks.d.ts +117 -0
- package/skills-cursor/canvas/sdk/index.d.ts +47 -0
- package/skills-cursor/canvas/sdk/theme.d.ts +61 -0
- package/skills-cursor/canvas/sdk/todo-list.d.ts +49 -0
- package/skills-cursor/canvas/sdk/ui-primitives.d.ts +549 -0
- package/skills-cursor/canvas/sdk/ui-primitives.test.d.ts +2 -0
- package/skills-cursor/create-hook/SKILL.md +238 -0
- package/skills-cursor/create-rule/SKILL.md +185 -0
- package/skills-cursor/create-skill/SKILL.md +269 -0
- package/skills-cursor/create-skill/references/authoring-guide.md +182 -0
- package/skills-cursor/create-subagent/SKILL.md +228 -0
- package/skills-cursor/migrate-to-skills/SKILL.md +121 -0
- package/skills-cursor/shell/SKILL.md +22 -0
- package/skills-cursor/split-to-prs/SKILL.md +47 -0
- package/skills-cursor/statusline/SKILL.md +193 -0
- package/skills-cursor/update-cli-config/SKILL.md +85 -0
- package/skills-cursor/update-cursor-settings/SKILL.md +137 -0
- package/skills.sh.json +297 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: enhance-web-forms
|
|
3
|
+
description: >
|
|
4
|
+
Build or upgrade web forms: accessible structure, schema-driven validation,
|
|
5
|
+
client↔server parity. Use when "improve this form", "form validation",
|
|
6
|
+
"accessible form", "multi-step form", "form error handling", or "the form UX
|
|
7
|
+
is bad".
|
|
8
|
+
license: MIT
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# enhance-web-forms — Production-Quality Forms
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED.** Schema and state-machine judgment `[HIGH freedom]`; a11y probes and playwright walks `[LOW freedom — run exactly]`.
|
|
14
|
+
|
|
15
|
+
Forms are where users hand you their data and where apps most often feel broken: unlabeled
|
|
16
|
+
fields, validation that fires on every keystroke, errors screen readers never announce, a
|
|
17
|
+
submit button that does nothing visible for three seconds, and no recovery when the request
|
|
18
|
+
fails. This skill fixes all of that on real forms in the repo.
|
|
19
|
+
|
|
20
|
+
> **A form is done when it is accessible, validated on both sides, gives feedback for every
|
|
21
|
+
> state, and recovers from failure.** Compile-clean is not done.
|
|
22
|
+
|
|
23
|
+
**Before any browser interaction, read `protocol-browser-anti-stall` and apply it.**
|
|
24
|
+
|
|
25
|
+
## How to reason
|
|
26
|
+
|
|
27
|
+
1. **Inventory** — forms, library, schema; bow out if none
|
|
28
|
+
2. **Structure** — programmatic labels, types, error association
|
|
29
|
+
3. **Parity** — one schema both sides; blur + submit, not every keystroke
|
|
30
|
+
4. **States** — submitting / success / error / unsaved; recover on failure
|
|
31
|
+
|
|
32
|
+
## Worked example
|
|
33
|
+
|
|
34
|
+
> **Inventory:** signup uses raw `<form>` + inline `if (!email)`; API validates with zod.
|
|
35
|
+
> **Structure:** `htmlFor` labels; `autocomplete="email"`; `aria-invalid` + summary.
|
|
36
|
+
> **Parity:** share the zod schema; validate on blur/submit; map "email taken" to the field.
|
|
37
|
+
> **States:** submit disables + `aria-busy`; values preserved on 500; dirty-nav warn.
|
|
38
|
+
|
|
39
|
+
## Self-critique before reporting
|
|
40
|
+
|
|
41
|
+
- **Labeled** — placeholder is never the only name
|
|
42
|
+
- **Both sides** — client and server rules match; error shapes map to fields
|
|
43
|
+
- **Walked** — empty, invalid, valid, and server-error paths in the browser
|
|
44
|
+
- **Right owner** — page/flow UX beyond the form → `enhance-web-ux`; WCAG sweep → `audit-accessibility`
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Phase 0 — Detect the stack and inventory forms [HIGH freedom]
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cat package.json | grep -iE "react-hook-form|formik|@tanstack/react-form|final-form|zod|yup|valibot|superstruct"
|
|
52
|
+
rg -n "<form|onSubmit|useForm|handleSubmit" -g "*.{tsx,jsx,vue,svelte}" -l
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Record: form library (or native), validation/schema library, UI/component library, and the
|
|
56
|
+
list of forms to enhance (auth, checkout, settings, contact, search, etc.). If there are no
|
|
57
|
+
forms, bow out.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Phase 1 — Research + prioritize [HIGH freedom]
|
|
62
|
+
|
|
63
|
+
Follow `/research`: Context7 for the detected form/validation library's current API;
|
|
64
|
+
Firecrawl for current form UX/a11y guidance dated to now. Prioritize forms by traffic and
|
|
65
|
+
risk (auth, payment, destructive actions first).
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Phase 2 — Accessible structure (the foundation) [HIGH freedom]
|
|
70
|
+
|
|
71
|
+
For each form, verify/fix:
|
|
72
|
+
|
|
73
|
+
- **Every input has a programmatic label** — `<label htmlFor>` or `aria-label`; placeholder
|
|
74
|
+
is **not** a label.
|
|
75
|
+
- **Correct input types + `autocomplete`** — `type="email|tel|url|number"`, `inputmode`,
|
|
76
|
+
`autocomplete="email|current-password|cc-number|..."` for autofill.
|
|
77
|
+
- **Grouping** — related inputs in `<fieldset>` + `<legend>` (radio groups, address blocks).
|
|
78
|
+
- **Required + optional** — marked in text, not color alone; `required` / `aria-required`.
|
|
79
|
+
- **Keyboard + focus** — logical tab order, visible focus ring, Enter submits, no keyboard traps.
|
|
80
|
+
- **Error association** — each field error linked via `aria-describedby`; invalid fields get
|
|
81
|
+
`aria-invalid="true"`; a form-level error **summary** with links to fields on submit failure.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
rg -n "placeholder=" -g "*.{tsx,jsx}" # placeholders masquerading as labels?
|
|
85
|
+
rg -n "aria-describedby|aria-invalid|htmlFor|aria-label" -g "*.{tsx,jsx}" -c
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Phase 3 — Validation (schema-driven, both sides) [HIGH freedom]
|
|
91
|
+
|
|
92
|
+
- **Single schema as SSOT** — define validation once (zod/yup/valibot) and share it
|
|
93
|
+
between client and server so rules can't drift. If the backend validates separately,
|
|
94
|
+
reconcile the two so error shapes match.
|
|
95
|
+
- **Timing** — validate on **blur** and on **submit**, not on every keystroke; re-validate a
|
|
96
|
+
field on change **after** it has errored once (so users see fixes immediately).
|
|
97
|
+
- **Messages** — specific and actionable ("Password needs 8+ characters", not "Invalid").
|
|
98
|
+
- **Server errors** — map field-level server errors back onto the right inputs; show
|
|
99
|
+
form-level errors (e.g. "Email already registered") in the summary.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Phase 4 — States & feedback (every one, no gaps) [HIGH freedom]
|
|
104
|
+
|
|
105
|
+
Wire the full state machine for each form and submit:
|
|
106
|
+
|
|
107
|
+
| State | Required behavior |
|
|
108
|
+
|---|---|
|
|
109
|
+
| Idle | Clean, submit enabled/disabled per validity policy |
|
|
110
|
+
| Validating | Inline field feedback (see Phase 3 timing) |
|
|
111
|
+
| Submitting | Submit shows spinner/label swap + `disabled` + `aria-busy`; prevent double-submit |
|
|
112
|
+
| Success | Confirmation (toast/inline/redirect); reset or lock as appropriate |
|
|
113
|
+
| Error | Preserve entered values; surface the failure; keep the user's place; retry path |
|
|
114
|
+
| Empty/optional | Sensible defaults; empty state for dependent selects |
|
|
115
|
+
|
|
116
|
+
Also handle:
|
|
117
|
+
- **Multi-step** — progress indicator, per-step validation, back/forward preserves data,
|
|
118
|
+
final review before submit.
|
|
119
|
+
- **Unsaved-changes guard** — warn on navigation away from a dirty form.
|
|
120
|
+
- **Autosave / draft** — for long forms, if the app already has a persistence pattern.
|
|
121
|
+
- **Micro-feedback** — subtle transitions on error/success via `design-motion` conventions
|
|
122
|
+
(reduced-motion safe). Don't animate layout in a way that shifts fields.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Phase 5 — Verify and report [LOW freedom — do not skip]
|
|
127
|
+
|
|
128
|
+
- **playwright-cli:** walk each form — tab through it, submit empty (see the error summary +
|
|
129
|
+
focus moves to first error), submit invalid, submit valid, force a server error. Check
|
|
130
|
+
`console`. Confirm screen-reader names via the accessibility snapshot.
|
|
131
|
+
Screenshots to `.playwright-mcp/`.
|
|
132
|
+
- **Build/typecheck/lint:** run the repo's commands.
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
## Forms Enhancement — report
|
|
136
|
+
**Stack:** form=[..] · validation=[..] · UI=[..]
|
|
137
|
+
**Forms upgraded:** [list]
|
|
138
|
+
**Structure:** labels/types/autocomplete/fieldsets fixed on [N] forms
|
|
139
|
+
**Validation:** shared schema SSOT · client↔server parity · blur+submit timing
|
|
140
|
+
**States:** submitting/success/error/multi-step/unsaved-guard wired
|
|
141
|
+
**A11y:** error summary + aria-describedby/aria-invalid + focus management (evidence)
|
|
142
|
+
**Verification:** build ✓ · console clean ✓ · flows walked (screenshots [paths])
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Related
|
|
148
|
+
|
|
149
|
+
- `audit-accessibility` — deep WCAG audit (run to verify the a11y work)
|
|
150
|
+
- `audit-ux` — form usability heuristics, microcopy, cognitive load
|
|
151
|
+
- `audit-fe-api` — validate the submit request/response contract against the backend
|
|
152
|
+
- `backend-error-handling` — server-side validation + structured error responses
|
|
153
|
+
- `design-motion` — reduced-motion-safe micro-feedback for error/success
|
|
154
|
+
- `enhance-web-ux` — broader page/flow UX beyond the form itself
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: enhance-web-instant-nav
|
|
3
|
+
description: >
|
|
4
|
+
Instant in-site navigation: Speculation Rules, View Transitions, bfcache,
|
|
5
|
+
103 Early Hints. Use when "instant navigation", "prerender", "early hints",
|
|
6
|
+
"back button reloads", or "second page is slow". First-load CWV →
|
|
7
|
+
audit-performance.
|
|
8
|
+
license: MIT
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
> Surface router: `/uiux`. You are here: `enhance-web-instant-nav`.
|
|
12
|
+
|
|
13
|
+
# enhance-web-instant-nav — Instant Navigations
|
|
14
|
+
|
|
15
|
+
**Degree of freedom: MIXED.** Which pages to speculate `[HIGH freedom]`;
|
|
16
|
+
the exclusion list, `Sec-Purpose` handling, and re-measure `[LOW freedom — run exactly]`.
|
|
17
|
+
|
|
18
|
+
> Applies to MPAs and Next.js App Router (server-rendered routes). Pure SPA
|
|
19
|
+
> routing → use the framework's prefetch API; Speculation Rules are per-document.
|
|
20
|
+
|
|
21
|
+
## How to reason
|
|
22
|
+
|
|
23
|
+
1. **Observe** — quote 2nd-page LCP p75, bfcache test result, and the top 5 next-click paths
|
|
24
|
+
2. **Rank** — probability × page cost. Prefetch broadly; prerender only ≥ ~50% likely next pages
|
|
25
|
+
3. **Guard** — list every URL with GET side effects or per-user state; exclude or downgrade to prefetch
|
|
26
|
+
4. **Ship** — rules + server guard + analytics guard in the same PR
|
|
27
|
+
5. **Re-measure** — if 2nd-page LCP didn't drop, the rule isn't firing (DevTools → Application → Speculative loads)
|
|
28
|
+
|
|
29
|
+
## Worked example
|
|
30
|
+
|
|
31
|
+
> **Observe:** blog; first-page LCP 1.9 s, next-article LCP 2.8 s; back button reloads (`unload` in analytics).
|
|
32
|
+
> **Rank:** "next article" 61% of sessions → prerender moderate; category links → prefetch moderate.
|
|
33
|
+
> **Guard:** `/logout`, `/account/*`, `?utm_*` excluded; server returns early on `Sec-Purpose`.
|
|
34
|
+
> **Ship:** rules block + `pagehide` swap + `document.prerendering` guard in the GA loader.
|
|
35
|
+
> **Re-measure:** next-article LCP 0.3 s (activation), bfcache green, no analytics double-count.
|
|
36
|
+
|
|
37
|
+
## Safety contract [LOW freedom — run exactly]
|
|
38
|
+
|
|
39
|
+
- Never prerender: logout, cart/checkout, payment, auth, anything whose GET mutates state
|
|
40
|
+
- Server: if `Sec-Purpose` contains `prefetch`, skip counters/side effects; return normal HTML
|
|
41
|
+
- Client: analytics, ads, consent, A/B run only after `document.prerendering === false` or on `prerenderingchange`
|
|
42
|
+
- Never add `unload` listeners; never set `Cache-Control: no-store` on HTML unless legally required
|
|
43
|
+
- Cross-origin / cross-site prerender is not attempted
|
|
44
|
+
|
|
45
|
+
## Phase 1 — Measure [LOW freedom — run exactly]
|
|
46
|
+
|
|
47
|
+
- `web-vitals/attribution` `onLCP` on the *second* page in a session; record p75
|
|
48
|
+
- DevTools → Application → Back/forward cache → Test; record blocking reasons
|
|
49
|
+
- `curl -sv <url> 2>&1 | grep "< HTTP"` — is a `103` emitted today?
|
|
50
|
+
- Top next-click paths from analytics (or infer from IA)
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Field: CrUX / PSI p75 for origin + top URLs
|
|
54
|
+
npx @lhci/cli autorun --config=lighthouserc.json
|
|
55
|
+
curl -sv https://example.com/ 2>&1 | grep -E "< HTTP/.* 103"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Phase 2 — Speculation Rules [HIGH freedom on selection]
|
|
59
|
+
|
|
60
|
+
Baseline (adjust `where` to the site's IA):
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<script type="speculationrules">
|
|
64
|
+
{
|
|
65
|
+
"prefetch": [{
|
|
66
|
+
"where": { "and": [
|
|
67
|
+
{ "href_matches": "/*" },
|
|
68
|
+
{ "not": { "href_matches": ["/logout", "/account/*", "/cart*", "/checkout*", "/api/*"] } },
|
|
69
|
+
{ "not": { "selector_matches": "[rel~=nofollow], .no-prefetch" } }
|
|
70
|
+
]},
|
|
71
|
+
"eagerness": "moderate"
|
|
72
|
+
}],
|
|
73
|
+
"prerender": [{
|
|
74
|
+
"where": { "href_matches": "/posts/*" },
|
|
75
|
+
"eagerness": "moderate"
|
|
76
|
+
}]
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- Eagerness: `conservative` (pointer/touch down) → `moderate` (desktop: hover 200 ms or pointerdown; mobile: viewport heuristics) → `eager` (Chrome 143+: desktop hover 10 ms, mobile viewport heuristics) → `immediate` (as soon as the rules load). Left unset, list (`urls`) rules default to `immediate` and document (`where`) rules to `conservative`, so set `moderate` explicitly. `immediate` on document rules is allowed but speculates on every matching link; use it with care.
|
|
82
|
+
- Query strings: `"expects_no_vary_search": "params=(\"utm_source\" \"utm_medium\")"` or exclude `?` URLs
|
|
83
|
+
- Next.js App Router: keep `<Link>` prefetch for RSC payloads; add the block in `app/layout.tsx` via a raw `<script>`. On Next.js 16.3+ evaluate **Instant Navigations** first (opt-in: `cacheComponents: true` + `partialPrefetching: true` in `next.config`); if it covers the case, skip prerender rules and keep only prefetch.
|
|
84
|
+
- Chromium-first progressive enhancement. Check caniuse at implementation time — never block on Firefox/Safari.
|
|
85
|
+
|
|
86
|
+
Syntax depth: `references/speculation-rules.md`.
|
|
87
|
+
|
|
88
|
+
## Phase 3 — bfcache [LOW freedom — run exactly]
|
|
89
|
+
|
|
90
|
+
- Replace `unload` → `pagehide`; `beforeunload` only while unsaved input exists
|
|
91
|
+
- Close WebSockets / BroadcastChannel in `pagehide`; reopen on `pageshow` if `event.persisted`
|
|
92
|
+
- Drop `Cache-Control: no-store` from HTML (keep it on APIs)
|
|
93
|
+
- Re-run the DevTools test until green
|
|
94
|
+
|
|
95
|
+
Blocker list: `references/bfcache-blockers.md`.
|
|
96
|
+
|
|
97
|
+
## Phase 4 — View Transitions (cross-document) [HIGH freedom]
|
|
98
|
+
|
|
99
|
+
```css
|
|
100
|
+
@view-transition { navigation: auto; }
|
|
101
|
+
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
|
|
102
|
+
.hero-img { view-transition-name: hero; }
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- Pair with prerender: activation + transition = app-like feel
|
|
106
|
+
- Progressive: nothing breaks without it
|
|
107
|
+
- Keep `view-transition-name` unique per document or the transition aborts
|
|
108
|
+
- `prefers-reduced-motion` is required (pairs with `audit-accessibility`)
|
|
109
|
+
|
|
110
|
+
## Phase 5 — 103 Early Hints [LOW freedom — run exactly]
|
|
111
|
+
|
|
112
|
+
- HTML responses only: `Link: </hero.avif>; rel=preload; as=image; fetchpriority=high`, `Link: <https://cdn.example>; rel=preconnect`
|
|
113
|
+
- Node/Next custom server: `res.writeEarlyHints({ link: [...] })`; else CDN config
|
|
114
|
+
- Do not hint > ~5 resources; do not hint per-user content
|
|
115
|
+
- Per-platform: `references/early-hints.md`
|
|
116
|
+
|
|
117
|
+
## Self-critique before reporting
|
|
118
|
+
|
|
119
|
+
- **Exclusions listed** — every GET-with-side-effects URL is in the PR
|
|
120
|
+
- **Server checks `Sec-Purpose`** — grep it
|
|
121
|
+
- **No double analytics** — prerender → activation tested
|
|
122
|
+
- **Prerender scarce** — only pages with ≥ ~50% next-click probability
|
|
123
|
+
- **Re-measured** — 2nd-page LCP p75 dropped, or the rule isn't firing
|
|
124
|
+
- **Right owner** — first-load LCP/INP/CLS → `audit-performance`; JS weight → `audit-bundle-size`
|
|
125
|
+
|
|
126
|
+
## Required output
|
|
127
|
+
|
|
128
|
+
1. Before/after: 2nd-page LCP p75, bfcache status, 103 present, transition on/off
|
|
129
|
+
2. Rules block + exclusion list
|
|
130
|
+
3. Server guard + client analytics guard diffs
|
|
131
|
+
4. One-line rollback: delete the `<script type="speculationrules">` block
|
|
132
|
+
|
|
133
|
+
## Related
|
|
134
|
+
|
|
135
|
+
- `audit-performance` — first-load CWV / loading priority
|
|
136
|
+
- `audit-bundle-size` — JS weight; don't double-prefetch
|
|
137
|
+
- `audit-accessibility` — reduced-motion for View Transitions
|
|
138
|
+
- `enhance-pwa` — service worker vs speculation / bfcache
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# bfcache blockers
|
|
2
|
+
|
|
3
|
+
Test: DevTools → Application → Back/forward cache → Test.
|
|
4
|
+
|
|
5
|
+
| Reason (typical) | Fix |
|
|
6
|
+
|------------------|-----|
|
|
7
|
+
| `unload` listener | Use `pagehide` / `pageshow` |
|
|
8
|
+
| `Cache-Control: no-store` on HTML | Drop from HTML; keep on APIs |
|
|
9
|
+
| Open WebSocket | Close in `pagehide`; reopen on `pageshow` if `event.persisted` |
|
|
10
|
+
| Open IndexedDB transaction | Commit/abort before leave |
|
|
11
|
+
| `beforeunload` always on | Only while unsaved input exists |
|
|
12
|
+
| Busy service worker (some cases) | See `enhance-pwa` — don't claim the page if SW holds it |
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
window.addEventListener('pagehide', (e) => {
|
|
16
|
+
socket?.close();
|
|
17
|
+
});
|
|
18
|
+
window.addEventListener('pageshow', (e) => {
|
|
19
|
+
if (e.persisted) reconnect();
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Never add `unload`. A green DevTools test is required before claiming bfcache.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 103 Early Hints — per platform
|
|
2
|
+
|
|
3
|
+
Emit on **HTML** only. ≤ ~5 `Link` values. Never hint per-user URLs.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Link: </hero.avif>; rel=preload; as=image; fetchpriority=high
|
|
7
|
+
Link: <https://cdn.example>; rel=preconnect
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Verify
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
curl -sv https://example.com/ 2>&1 | grep -E "< HTTP/.* 103"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Node / Next custom server
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
res.writeEarlyHints({
|
|
20
|
+
link: [
|
|
21
|
+
'</hero.avif>; rel=preload; as=image; fetchpriority=high',
|
|
22
|
+
'<https://cdn.example>; rel=preconnect',
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## CDN
|
|
28
|
+
|
|
29
|
+
- **Cloudflare:** Early Hints toggle; reads origin `Link` headers
|
|
30
|
+
- **Fastly:** `http_status 103` + `Link` in VCL / Compute
|
|
31
|
+
- **Nginx:** `http2_push` is not 103; use a CDN or OpenResty module that emits 103
|
|
32
|
+
|
|
33
|
+
103 is wasted if the LCP image is still lazy or not in HTML.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Speculation Rules — syntax
|
|
2
|
+
|
|
3
|
+
Official: https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API
|
|
4
|
+
|
|
5
|
+
## Actions
|
|
6
|
+
|
|
7
|
+
| Action | What it does | Use |
|
|
8
|
+
|--------|--------------|-----|
|
|
9
|
+
| `prefetch` | Fetch HTML (and often subresources) | Broad in-site links |
|
|
10
|
+
| `prerender` | Fully render in a hidden document | ≥ ~50% next-click pages only |
|
|
11
|
+
|
|
12
|
+
## Eagerness
|
|
13
|
+
|
|
14
|
+
| Value | When | Risk |
|
|
15
|
+
|-------|------|------|
|
|
16
|
+
| `conservative` | pointerdown | Lowest waste |
|
|
17
|
+
| `moderate` | hover ~200 ms / viewport heuristics | Default |
|
|
18
|
+
| `eager` | sooner | More waste |
|
|
19
|
+
| `immediate` | as soon as parsed | List rules only |
|
|
20
|
+
|
|
21
|
+
## Chrome limits (verify at implement time)
|
|
22
|
+
|
|
23
|
+
Prerender count and memory caps change. Prefer few prerender URLs.
|
|
24
|
+
`target_hint` can hint `_blank` vs `_self`.
|
|
25
|
+
|
|
26
|
+
## No-Vary-Search
|
|
27
|
+
|
|
28
|
+
Ignore tracking params so `/posts/1?utm_source=x` matches `/posts/1`:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
"expects_no_vary_search": "params=(\"utm_source\" \"utm_medium\" \"utm_campaign\")"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or exclude `?` URLs entirely.
|
|
35
|
+
|
|
36
|
+
## Headers
|
|
37
|
+
|
|
38
|
+
Browser sends `Sec-Purpose: prefetch` (and `prerender` when prerendering).
|
|
39
|
+
Server must skip side effects on that header.
|
|
40
|
+
|
|
41
|
+
## Next.js 16.3 Instant Navigations
|
|
42
|
+
|
|
43
|
+
Opt-in suite (partial prefetch, navigation insights). If it covers the
|
|
44
|
+
case, skip custom prerender rules; keep moderate prefetch + `<Link>`.
|