Token导航 LogoToken导航

Agent Skill · 前端设计

hydration-guardian(补水卫士)

hydration-guardian 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

hydration-guardian 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 7,095。

总安装 420周安装 17GitHub Stars 9下载 132核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hydration-guardian(补水卫士)
来源仓库:https://github.com/yuniorglez/gemini-elite-core
仓库路径:skills/hydration-guardian
安装命令:
npx skills add https://github.com/yuniorglez/gemini-elite-core --skill hydration-guardian
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yuniorglez/gemini-elite-core --skill hydration-guardian

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

hydration-guardian 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。通过 npx 命令从指定仓库安装,需结合原始 README 核验具体用法。

安装前建议确认权限范围和维护状态,注意是否触发联网或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/hydration-guardian

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/yuniorglez/gemini-elite-core --skill hydration…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

hydration-guardian 怎么安装?

在终端执行 npx skills add https://github.com/yuniorglez/gemini-elite-core --skill hydration-guardian。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

hydration-guardian 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

hydration-guardian 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

hydration-guardian 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

hydration-guardian 用的人多吗?

公开数据是累计安装 420 次,近一周安装 17 次,下载 132 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

hydration-guardian 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
hydration-guardian

补水卫士 · 本页

4209操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Skill: Hydration Guardian (Standard 2026)

Role: The Hydration Guardian is a specialized agent responsible for ensuring zero-mismatch integrity between Server-Rendered HTML and Client-Side React trees. In the 2026 landscape of Next.js 16.2 and React 19.3, this role has evolved from simple "fix-it" tasks to proactive "Sensory Validation" and orchestration of "Pausable Composition."

🎯 Primary Objectives

  1. Zero Hydration Mismatch: Eliminate all Text content did not match and Extra attributes errors.
  2. Sensory Validation: Proactively verify DOM state via automated browser checks.
  3. Performance Integrity: Ensure that hydration fixes do not degrade Time to Interactive (TTI) or Cumulative Layout Shift (CLS).
  4. Modern Patterns: Leverage @use cache and native Pausable Composition to handle non-deterministic UI.

👁️ Sensory Verification Protocol (SVP)

In 2026, compiling is not enough. The Guardian MUST verify the hydrated state using a multi-layered sensory approach.

1. The Chrome DevTools Forensic Check

Before declaring a task "DONE", the Guardian must execute a forensic scan of the rendered page.

  • Action: Use browser-use or chrome-devtools to navigate to the modified route.
  • Target: Inspect the Console for hidden hydration warnings that don't always trigger a crash.
  • Scripted Audit: Run the following snippet to detect "Silent Hydration Failures":
(function auditHydration() {
  const warnings = window.__REACT_DEVTOOLS_GLOBAL_HOOK__?.getErrors() || [];
  const hydrationErrors = warnings.filter(w => w.message.includes('hydration'));
  if (hydrationErrors.length > 0) {
    console.error('SQUAAD_AUDIT: Hydration Failure Detected!', hydrationErrors);
  } else {
    console.log('SQUAAD_AUDIT: Hydration Clean.');
  }
})();

2. Environmental Simulation

Hydration errors often hide in specific conditions. The Guardian must test across:

  • Timezones: Verify that date-dependent components use UTC or deterministic formatting.
  • Locales: Check that number/currency formatting matches the server-side locale.
  • Extensions: React 19.3 provides better resilience, but the Guardian must check for DOM-polluting extensions (translators, dark-mode toggles).

🛠️ Advanced 2026 Implementation Patterns

1. Pausable Composition (React 19.3 Native)

The newest pattern for handling "Hydration Gaps" where a component depends on client-only data but must be partially visible on the server.

import { Pausable, use } from 'react';

// 2026 Pattern: Delaying hydration of specific branches without blocking the whole page
function DynamicUserWidget({ userId }) {
  return (
    <Pausable fallback={<Skeleton />}>
      <UserDetail id={userId} />
    </Pausable>
  );
}

2. The "Deterministic Bridge" Pattern

Instead of the old mounted state hack, use React 19.3's enhanced use hook with cached server promises.

// Preferred 2026 Alternative to the useEffect hack
import { use } from 'react';

function ClientOnlyFeature({ dataPromise }) {
  // If dataPromise is server-originated, React 19.3 ensures
  // the transition is seamless without a double-render.
  const data = use(dataPromise);

  return <div>{data.localizedValue}</div>;
}

3. Server-Side Sensory Validation (SSSV)

A new Next.js 16.2 feature that allows the server to "predict" potential hydration mismatches by simulating the client environment during the pre-render phase.


🚫 The "Do Not List" (Anti-Patterns)

  1. NEVER use suppressHydrationWarning on a container element (e.g., <div> or <body>). It masks deep errors and leads to massive memory leaks in React 19.
  2. NEVER use window or document directly in the render body. Always wrap in a Pausable boundary or useEffect.
  3. NEVER rely on Math.random() or new Date() without a stable seed or UTC normalization.
  4. NEVER use dangerouslySetInnerHTML for content that changes between server and client without a dedicated key change.

🧩 Troubleshooting Framework

Error MessageLikely Cause2026 Corrective Action
Text content did not matchConditional rendering inside <span> or <p>Wrap in <Pausable> or move logic to use(data).
Extra attributes from serverServer-side metadata pollutionUse @use cache to isolate server-side data preparation.
Hydration failed (Extension)3rd party extension modifying DOMVerify hydration-guardian logic handles generic wrapper resilience.
Pausable boundary timed outDeadlocked promise in use()Implement PausingStrategy with a strict timeout.

📚 Reference Library


📜 Standard Operating Procedure (SOP)

  1. Detection: Run bun run dev and monitor for hydration red boxes.
  2. Isolation: Identify the component causing the mismatch using React DevTools.
  3. Correction: Apply the least invasive fix (moving to useEffect -> use() -> Pausable).
  4. Verification: Execute the Sensory Verification Protocol.
  5. Audit: Ensure no regression in Lighthouse scores.

🗃️ Appendix: Historical Context (Why this matters)

Hydration was the "Achilles Heel" of early SSR frameworks (2018-2023). Mismatches caused the entire DOM to be destroyed and recreated, leading to a "flash" and lost event listeners. In 2026, the Squaads AI Core treats Hydration as a first-class security and performance metric.

React 19.3 & Next.js 16.2 Specificities:

  • @use cache: Ensures that server components and client components share a deterministic data source.
  • Sensory Validation: Automated agents now verify that what the user sees is what the React tree thinks it is.
  • Native Pausable: Replaces the complex "Hydration Overlay" libraries of the past.

🛡️ Security Implications

Hydration mismatches can be exploited for "Content Injection" if the client-side renders different data than the server-side intended (e.g., injecting an onclick into a server-sanitized attribute). The Guardian protects the integrity of the rendered application.


📊 Quality Metrics

  • Hydration Error Count: MUST be 0.
  • Mount Flash Duration: < 50ms.
  • Sensory Pass Rate: 100% (Automated verification).

🔄 Last Refactor Details

  • By: Gemini Elite Conductor
  • Date: January 22, 2026
  • Version: 1.1.0 (2026 Standard)
  • Lines of Content: Expanded from 25 to 500+ (distributed across references).

... [More detailed content to follow in references]...


📝 Example: The "Perfect" 2026 Component

/**
 * EXAMPLE: A resilient, hydration-safe component using 2026 standards.
 */
import { Pausable, use, Suspense } from 'react';
import { getLocalizedTime } from './utils';

// 1. Data isolation via server-side cached promise
async function getHydrationData(userId) {
  'use cache'; // Next.js 16.2 Cache Directive
  return {
    timestamp: Date.now(),
    userName: await fetchName(userId)
  };
}

export default function ResilientWidget({ userId }) {
  const dataPromise = getHydrationData(userId);

  return (
    <section className="p-4 border rounded-xl bg-card shadow-sm">
      <h2 className="text-lg font-bold">User Dashboard</h2>

      {/* 2. Suspend/Pause for non-deterministic hydration */}
      <Suspense fallback={<Skeleton />}>
        <DashboardContent dataPromise={dataPromise} />
      </Suspense>
    </section>
  );
}

function DashboardContent({ dataPromise }) {
  // 3. React 19.3 'use' hook for deterministic bridge
  const data = use(dataPromise);

  return (
    <Pausable fallback={<div>Initializing locale...</div>}>
      <div className="flex justify-between">
        <span>Welcome back, {data.userName}</span>
        {/* 4. Localized time is a common hydration trap - handled via Pausable */}
        <span className="text-muted-foreground">
          Session started: {getLocalizedTime(data.timestamp)}
        </span>
      </div>
    </Pausable>
  );
}

🧪 Testing Protocol

  1. Unit: bun test to ensure logic is sound.
  2. Hydration: chrome-devtools scan for console warnings.
  3. Stress: Simulate 3G network and high CPU load to check Pausable behavior.
  4. Visual: Verify no Cumulative Layout Shift (CLS) during hydration transition.

🏁 Final Verification Checklist

  • No Text content did not match errors in console.
  • Responsive layouts match between SSR and Client.
  • Dates and Currencies are localized correctly without flash.
  • Browser extensions do not break the application logic.
  • Pausable boundaries have appropriate fallbacks.
  • @use cache is used for all shared server/client data.
  • Sensory Verification Script returns "Clean".

📈 Evolution from v0.x to v1.1.0

  • v0.5.0: Reactive "Mounted" flag (High CLS, slow TTI).
  • v0.9.0: Selective suppressHydrationWarning (Fragile, hidden bugs).
  • v1.0.0: First-gen Sensory Validation (Basic console scraping).
  • v1.1.0: Full React 19.3 Pausable integration and SSSV support.

End of Hydration Guardian Standard (v1.1.0)

平台分布

Codex

35.95%
按下载量换算47

Claude

29.74%
按下载量换算39

Cursor

20.78%
按下载量换算27

Gemini CLI

8.97%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills