Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

iii-state-reactions三态 React

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

2,421

周安装

97

GitHub Stars

6

下载量

784
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/iii-hq/skills --skill iii-state-reactions

简介

iii-state-reactions 用于辅助前端页面、组件、样式和交互逻辑的开发与维护。

  • 它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。
  • 使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段。
  • 通过 npx skills add 命令从指定仓库安装,具体用法请参考原始 README。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

State Reactions

Comparable to: Firebase onSnapshot, Convex mutations

Key Concepts

Use the concepts below when they fit the task. Not every state reaction needs all of them.

  • A state trigger fires whenever a value changes within a watched scope
  • The handler receives {new_value, old_value, key, event_type} describing the change
  • condition_function_id gates execution — the reaction only fires if the condition returns truthy
  • Multiple reactions can independently watch the same scope
  • Reactions fire on state::set, state::update, and state::delete operations

Architecture

state::set / state::update / state::delete
  → StateModule emits change event
    → registerTrigger type:'state' (scope match)
      → condition_function_id check (if configured)
        → registerFunction handler ({ new_value, old_value, key, event_type })

iii Primitives Used

PrimitivePurpose
registerFunctionDefine the reaction handler
registerTrigger({type: 'state'})Watch a scope for changes
config: {scope, key, condition_function_id}Scope filter and optional condition gate
Event payload: {new_value, old_value, key, event_type}Change details passed to the handler

Reference Implementation

See ../references/state-reactions.js for the full working example — a reaction that watches a state scope and fires side effects when values change, with an optional condition gate.

Also available in Python: ../references/state-reactions.py

Also available in Rust: ../references/state-reactions.rs

Common Patterns

Code using this pattern commonly includes, when relevant:

  • registerWorker(url, {workerName}) — worker initialization
  • registerFunction(id, handler) — define the reaction handler
  • registerTrigger({type: 'state', config: {scope, key, condition_function_id}}) — watch for changes
  • payload.new_value / payload.old_value — compare before and after
  • payload.event_type — distinguish between set, update, and delete events
  • trigger({function_id: 'state::set', payload}) — write derived state from the reaction
  • const logger = new Logger() — structured logging per reaction

Adapting This Pattern

Use the adaptations below when they apply to the task.

  • Set scope to watch a specific domain (e.g. orders, user-profiles)
  • Use key to narrow reactions to a single key within a scope
  • Add a condition_function_id to filter — only react when the condition function returns truthy
  • Chain reactions by writing state in one handler that triggers another reaction on a different scope

Engine Configuration

StateModule must be enabled in iii-config.yaml for state triggers to fire. See ../references/iii-config.yaml for the full annotated config reference.

Pattern Boundaries

  • If the task is about directly reading or writing state without reactions, prefer iii-state-management.
  • If the task needs conditional trigger logic shared across trigger types, prefer iii-trigger-conditions.
  • Stay with iii-state-reactions when the primary need is automatic side effects on state changes.

When to Use

  • Use this skill when the task is primarily about iii-state-reactions in the iii engine.
  • Triggers when the request directly asks for this pattern or an equivalent implementation.

Boundaries

  • Never use this skill as a generic fallback for unrelated tasks.
  • You must not apply this skill when a more specific iii skill is a better fit.
  • Always verify environment and safety constraints before applying examples from this skill.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.87%
按下载量换算281

Claude

30.5%
按下载量换算239

Cursor

15.45%
按下载量换算121

Gemini CLI

8.96%
按下载量换算70

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills