Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问许可证需确认审计通过

hydration-guardian补水卫士

Agent Skill

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

总安装

1,248

周安装

51

GitHub Stars

10

下载量

404
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/oakoss/agent-skills --skill hydration-guardian

简介

hydration-guardian 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用于开发类 Agent 工作流,尤其关注代码协作与仓库管理场景。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Hydration Guardian

Overview

Ensures zero-mismatch integrity between server-rendered HTML and client-side React trees. Covers hydration error diagnosis, selective hydration via Suspense boundaries, deterministic data bridges with the React 19 use() hook, 'use cache' for eliminating data drift, two-pass rendering for client-only content, React 19's single-diff hydration error reporting for pinpointing exact mismatches, and automated validation of rendered DOM state.

When to use: Debugging hydration mismatch errors, fixing text content mismatches, handling browser extension DOM pollution, implementing deterministic data bridges, optimizing SSR/client hydration performance, setting up error monitoring with onRecoverableError.

When NOT to use: Client-only React applications without SSR, static sites without hydration, API-only backends.

Quick Reference

PatternApproachKey Points
Selective hydration<Suspense fallback={...}> boundaryHydrates independently; prioritizes user interaction
Deterministic bridgeuse(serverPromise) instead of useEffectDirect server-to-client data transition (React 19)
Cache directive'use cache' in data fetchersShare exact server result with client during hydration
Two-pass renderinguseState + useEffect for client-onlyFirst render matches server; second adds client content
Client-only skipnext/dynamic with ssr: falseExclude component from server render entirely
Error monitoringonRecoverableError on hydrateRootDetect and report silent hydration recovery
Error reportingReact 19 single-diff error formatPinpoints exact mismatch location with unified diff output
Error callbacksonUncaughtError, onCaughtErrorGranular error handling on createRoot/hydrateRoot
Date/time safetyUTC normalization or server-synced contextPrevent locale-dependent hydration mismatches
Extension resilienceTest with common browser extensions activeDetect DOM pollution from translators, dark-mode tools

Hydration Error Diagnosis

Error MessageLikely CauseCorrective Action
Text content did not matchNon-deterministic render (dates, random values)Use two-pass rendering or suppressHydrationWarning
Expected server HTML to containClient renders content server did notMove client-only code to useEffect or dynamic import
Hydration failedInvalid HTML nesting (<p> inside <p>)Fix HTML structure; browsers auto-correct causing drift
Extra attributes from serverServer-only attributes not on clientEnsure attribute parity or use suppressHydrationWarning
There was an error while hydratingExtension-modified DOM or major mismatchCheck for browser extensions; verify HTML validity

Common Mistakes

MistakeCorrect Pattern
Using suppressHydrationWarning on container elementsFix the root cause; suppress only on leaf elements with unavoidable differences
Accessing window or document in the render bodyWrap client-only code in useEffect or use next/dynamic with ssr: false
Using Math.random() or new Date() without stable seedsUse UTC normalization, server-cached values, or two-pass rendering
Ignoring silent hydration recovery in productionConfigure onRecoverableError on hydrateRoot to log and monitor
Using dangerouslySetInnerHTML with server/client mismatchEnsure identical content or use a dedicated key change to force remount
Checking typeof window!== 'undefined' in renderUse two-pass rendering; the check runs on server too (it returns false)
Nesting <p> inside <p> or <div> inside <p>Fix invalid HTML nesting; browsers correct it causing server/client drift

Delegation

  • Scan rendered pages for hidden hydration warnings: Use Explore agent with Chrome DevTools to run the hydration audit script
  • Fix hydration mismatches across multiple routes: Use Task agent to isolate, correct, and verify each affected component
  • Design hydration-safe architecture for new features: Use Plan agent to select between Suspense boundaries, two-pass rendering, and cache patterns

References

  • Common Mismatches -- causes, diagnosis, and fixes for hydration mismatch errors including dates, locales, HTML nesting, and browser extensions
  • Selective Hydration -- Suspense-based selective hydration, streaming SSR, two-pass rendering, and client-only components
  • Use Cache Patterns -- data drift prevention, Next.js use cache directive, React 19 use() hook, deterministic data bridges
  • Validation Techniques -- automated DOM verification, mutation monitoring, onRecoverableError, and production hydration monitoring

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.23%
按下载量换算142

Claude

30.79%
按下载量换算124

Cursor

21.49%
按下载量换算87

Gemini CLI

8.73%
按下载量换算35

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills