Agent SkillsZhanlinCui/Agent-Skills-Hunter › web-performance-seo

web-performance-seo

GitHub

修复因对比度问题导致的 Lighthouse/PSI 无障碍“!”错误,解决 CSS 滤镜、OKLCH 颜色及低透明度引发的 SEO 性能调试与修复。

seo/web-performance-seo/SKILL.md ZhanlinCui/Agent-Skills-Hunter

Trigger Scenarios

PSI/Lighthouse 显示“!”或数值异常 color-contrast 审计失败 getImageData 报错

Install

npx skills add ZhanlinCui/Agent-Skills-Hunter --skill web-performance-seo -g -y
More Options

Non-standard path

npx skills add https://github.com/ZhanlinCui/Agent-Skills-Hunter/tree/main/seo/web-performance-seo -g -y

Use without installing

npx skills use ZhanlinCui/Agent-Skills-Hunter@web-performance-seo

指定 Agent (Claude Code)

npx skills add ZhanlinCui/Agent-Skills-Hunter --skill web-performance-seo -a claude-code -g -y

安装 repo 全部 skill

npx skills add ZhanlinCui/Agent-Skills-Hunter --all -g -y

预览 repo 内 skill

npx skills add ZhanlinCui/Agent-Skills-Hunter --list

SKILL.md

Frontmatter
{
    "name": "web-performance-seo",
    "description": "Fix PageSpeed Insights\/Lighthouse accessibility \"!\" errors caused by contrast audit failures (CSS filters, OKLCH\/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO\/performance debugging and remediation."
}

Web Performance SEO: Accessibility Contrast Error Fix

When to use

  • PSI/Lighthouse accessibility shows "!" or error instead of a numeric score
  • color-contrast audit errors or getImageData failures
  • Need to improve accessibility signals that impact SEO

Workflow

  1. Reproduce
    • Run Lighthouse or PSI; capture failing audit names.
  2. Scan code for common triggers
    • CSS filters/backdrop blur, mix-blend-mode
    • OKLCH/OKLAB colors
    • Low opacity backgrounds (< 0.4)
    • Gradient text with color: transparent
    • Text over images without opaque overlays
  3. Fix in priority order
    • Remove filters/blend modes
    • Convert OKLCH/OKLAB to HSL/RGB
    • Raise opacity thresholds
    • Add solid-color fallback for gradient text
    • Add overlay behind text on images
  4. Verify locally with Lighthouse/axe
  5. Verify in PSI after deployment

Fast scan commands

rg -n "backdrop-blur|filter:|mix-blend-mode" .
rg -n "oklch|oklab" .
rg -n "/10|/20|/30|opacity-25|opacity-0" .
rg -n "background-clip.*text|color.*transparent" .

Fix patterns

Remove filters (critical)

// Before
<div className="bg-card/50 backdrop-blur-sm">...</div>
// After
<div className="bg-card/80">...</div>

Convert OKLCH/OKLAB to HSL/RGB

/* Before */
:root { --primary: oklch(0.55 0.22 264); }
/* After */
:root { --primary: hsl(250, 60%, 50%); }

Raise opacity thresholds

  • Backgrounds >= 0.4 (prefer >= 0.6)
  • Replace /10 -> /40, /20 -> /40, /30 -> /60

Gradient text fallback

.title { color: #111111; }
@media (prefers-contrast: no-preference) {
  .title.with-gradient {
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
@media (forced-colors: active) {
  .title.with-gradient { background: none; color: CanvasText; }
}

Overlay for text on images

<div className="relative">
  <img src="/hero.jpg" alt="Hero" />
  <div className="absolute inset-0 bg-black/60"></div>
  <h1 className="relative text-white">Title</h1>
</div>

Acceptance criteria

  • Accessibility score is numeric (not "!")
  • color-contrast audit passes or lists actionable items
  • Contrast ratios >= 4.5:1 for normal text, >= 3:1 for large text

Notes

  • "!" indicates audit failure, not a low score.
  • Always test locally before waiting for PSI updates.

Version History

  • 849c38a Current 2026-07-05 09:21

Same Skill Collection

agent/dispatching-parallel-agents/SKILL.md
agent/subagent-driven-development/SKILL.md
agent/using-superpowers/SKILL.md
agent/writing-skills/SKILL.md
creative/algorithmic-art/SKILL.md
creative/brand-guidelines/SKILL.md
creative/canvas-design/SKILL.md
creative/frontend-design/SKILL.md
creative/slack-gif-creator/SKILL.md
creative/theme-factory/SKILL.md
dev/deploying-to-production/SKILL.md
dev/internationalizing-websites/SKILL.md
dev/mcp-builder/SKILL.md
dev/skill-creator/SKILL.md
dev/web-artifacts-builder/SKILL.md
dev/webapp-testing/SKILL.md
docs/doc-coauthoring/SKILL.md
docs/docx/SKILL.md
docs/github-release-assistant/SKILL.md
docs/internal-comms/SKILL.md
docs/pdf/SKILL.md
docs/pptx/SKILL.md
docs/xlsx/SKILL.md
git-workflow/finishing-a-development-branch/SKILL.md
git-workflow/using-git-worktrees/SKILL.md
integration/daily-news/SKILL.md
integration/doc-sync-tool/SKILL.md
integration/notebooklm/SKILL.md
integration/web-access/SKILL.md
integration/x-article-publisher/SKILL.md
obsidian/json-canvas/SKILL.md
obsidian/obsidian-bases/SKILL.md
obsidian/obsidian-helper/SKILL.md
obsidian/obsidian-markdown/SKILL.md
obsidian/project-to-obsidian/SKILL.md
planning/brainstorming/SKILL.md
planning/chat-compactor/SKILL.md
planning/executing-plans/SKILL.md
planning/planning-with-files/SKILL.md
planning/writing-plans/SKILL.md
quality/receiving-code-review/SKILL.md
quality/requesting-code-review/SKILL.md
quality/systematic-debugging/SKILL.md
quality/test-driven-development/SKILL.md
quality/verification-before-completion/SKILL.md
seo/google-official-seo-guide/SKILL.md
vercel/vercel-deploy/SKILL.md
vercel/vercel-react-best-practices/SKILL.md
vercel/vercel-web-design-guidelines/SKILL.md
creative/ui-ux-pro-max/SKILL.md

Metadata

Files
0
Version
849c38a
Hash
145e0257
Indexed
2026-07-05 09:21

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-08 20:29
浙ICP备14020137号-1 $Carte des visiteurs$