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

useeffect-audit使用效果审核

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

259

周安装

11

GitHub Stars

公开资料未说明

下载量

91
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/anxndsgn/useeffect-audit --skill useeffect-audit

简介

useeffect-audit 用于辅助安全审计与凭据风险排查,适合梳理敏感配置和分析鉴权逻辑。

  • 适用于 React useEffect 相关组件的安全复核场景。
  • 可自动扫描依赖项中的凭据并生成风险清单。
  • 安装命令为 npx skills add https://github.com/anxndsgn/useeffect-audit --skill useeffect-audit。
  • 不能将工具输出直接作为最终结论,需先确认最小权限与脱敏方式。

SKILL.md

useEffect Audit

Overview

Run a structured review of every useEffect and useLayoutEffect in scope. For each one, decide whether to:

  • keep it as an external synchronization process,
  • move logic to an event handler,
  • derive during render, or
  • split/extract logic (including useEffectEvent where appropriate).

Apply the smallest behavior-preserving refactor that removes unnecessary Effects and fixes dependency/lifecycle bugs.

Primary references:

Audit Workflow

  1. Inventory Effects:

- Scan for useEffect( and useLayoutEffect(. - Group by component and by synchronization intent.

  1. Choose the right primitive first:

- Event handler if logic is caused by a specific interaction. - Effect if logic is caused by rendering/visibility and synchronizes with an external system. - Render-time derivation if logic only computes UI data.

  1. For each kept Effect, validate lifecycle semantics:

- Treat it as an independent start/stop synchronization process. - Ensure cleanup fully undoes setup. - Ensure setup -> cleanup -> setup (development stress-test) is safe. - Split unrelated synchronization into separate Effects.

  1. Fix dependencies by changing code, then dependencies:

- Include every reactive value read by the Effect. - Never suppress react-hooks/exhaustive-deps. - If dependencies are undesirable, refactor: - Move event-specific logic to handlers. - Move non-reactive constants outside the component. - Move object/function creation inside the Effect or extract primitives. - Use state updater functions when reading state only to compute next state. - Extract non-reactive logic into useEffectEvent when needed.

  1. Apply minimal refactors one Effect at a time:

- Preserve behavior and user-visible semantics. - Remove redundant state and redundant re-renders.

  1. Report decisions and verification notes using the output format below.

Decision Rules

  • Keep an Effect only for synchronization with systems outside React:

- Browser/DOM APIs, subscriptions, sockets, timers, imperative widgets, network sync tied to visibility.

  • Remove an Effect when it only transforms data:

- Derive directly during render; avoid mirrored state.

  • Remove an Effect when it only handles a user action:

- Execute in the event handler that caused it.

  • Split Effects by purpose:

- One synchronization process per Effect.

  • Treat dependency arrays as a description of code, not a scheduling knob:

- If you want different dependencies, change the code first.

  • Use useEffectEvent only for non-reactive logic that must read latest props/state without re-synchronizing:

- Do not use it as a shortcut to hide real dependencies. - Do not pass Effect Events to other components/hooks. - Do not include Effect Events in dependency arrays.

Output Format

For each audited effect, produce:

  1. file:line and component name
  2. Current effect intent (one sentence)
  3. Classification: Keep or Remove
  4. Trigger type: Rendering-driven sync or Interaction-driven event
  5. Refactor pattern applied (from references/checklist.md and/or React docs)
  6. Dependency rationale (reactive values read and why listed)
  7. Code-level change summary
  8. Verification notes (what to test)

Guardrails

  • Do not move logic out of Effects if it changes true external synchronization semantics.
  • Do not silence react-hooks/exhaustive-deps to force desired timing.
  • Do not use useEffectEvent to avoid legitimate dependencies.
  • Do not use refs as a hack to prevent Effects from running in development.
  • Do not add useMemo/useCallback unless required for correctness or measured performance.
  • Prefer the smallest safe refactor and verify with targeted tests, including remount/re-sync behavior.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.46%
按下载量换算32

Claude

29.45%
按下载量换算27

Cursor

17.67%
按下载量换算16

Gemini CLI

9.14%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills