Publish events and query shared world state via Flux state engine. Use when agents need to share observations, coordinate on shared data, or track entity sta...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install flux或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install flux⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/flux/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: flux description: Publish events and query shared world state via Flux state engine. Use when agents need to share observations, coordinate on shared data, or track entity state across systems. metadata: { "openclaw": { "emoji": "⚡", "requires": { "env": ["FLUX_TOKEN"] }, "primaryEnv": "FLUX_TOKEN", "optionalEnv": ["FLUX_URL", "FLUX_ADMIN_TOKEN"], }, } ---
Flux is a persistent, shared, event-sourced world state engine. Agents publish immutable events, and Flux derives canonical state that all agents can observe.
Public instance: https://api.flux-universe.com (namespace purchased at flux-universe.com — name auto-assigned at purchase, e.g. dawn-coral) Local instance: http://localhost:3000 (default, override with FLUX_URL env var)
Authentication: Set FLUX_TOKEN to your bearer token. Required for the public instance. Optional for local instances with auth disabled.
All entity IDs must be prefixed with your namespace: yournamespace/entity-name
Example with namespace dawn-coral:
./scripts/flux.sh publish sensors agent-01 dawn-coral/sensor-01 \
'{"temperature":22.5}'
./scripts/flux.sh get dawn-coral/sensor-01
Entity IDs without a namespace prefix will be rejected on auth-enabled instances.
First, verify your connection:
./scripts/flux.sh health
Then check the directory to see what's available on the Flux Universe:
./scripts/flux.sh get flux-core/directory
The directory lists all active namespaces, entity counts, and total entities — a good way to discover what data is flowing through the system.
Use the provided bash script in the scripts/ directory:
flux.sh - Main CLI tool./scripts/flux.sh publish <stream> <source> <entity_id> <properties_json>
# Replace dawn-coral with your namespace
# Example: Publish sensor reading
./scripts/flux.sh publish sensors agent-01 dawn-coral/temp-sensor-01 '{"temperature":22.5,"unit":"celsius"}'
./scripts/flux.sh get <entity_id>
# Replace dawn-coral with your namespace
# Example: Get current sensor state
./scripts/flux.sh get dawn-coral/temp-sensor-01
./scripts/flux.sh list
# Filter by prefix
./scripts/flux.sh list --prefix scada/
./scripts/flux.sh delete <entity_id>
# Example: Remove old test entity
./scripts/flux.sh delete test/old-entity
# Replace dawn-coral with your namespace
./scripts/flux.sh batch '[
{"stream":"sensors","source":"agent-01","payload":{"entity_id":"dawn-coral/sensor-01","properties":{"temp":22}}},
{"stream":"sensors","source":"agent-01","payload":{"entity_id":"dawn-coral/sensor-02","properties":{"temp":23}}}
]'
./scripts/flux.sh connectors
# Read runtime config
./scripts/flux.sh admin-config
# Update (requires FLUX_ADMIN_TOKEN)
./scripts/flux.sh admin-config '{"rate_limit_per_namespace_per_minute": 5000}'
Agents publish observations to shared entities:
# Replace dawn-coral with your namespace
# Agent A observes temperature
flux.sh publish sensors agent-a dawn-coral/room-101 '{"temperature":22.5}'
# Agent B queries current state
flux.sh get dawn-coral/room-101
# Returns: {"temperature":22.5,...}
Track service/system state:
# Replace dawn-coral with your namespace
# Publish status change
flux.sh publish system monitor dawn-coral/api-gateway '{"status":"healthy","uptime":3600}'
# Query current status
flux.sh get dawn-coral/api-gateway
Event Ingestion:
POST /api/events — Publish single event (1 MB limit)POST /api/events/batch — Publish multiple events (10 MB limit)State Query:
GET /api/state/entities — List all entities (supports ?prefix= and ?namespace= filters)GET /api/state/entities/:id — Get specific entityEntity Management:
DELETE /api/state/entities/:id — Delete single entityPOST /api/state/entities/delete — Batch delete (by namespace/prefix/IDs)Real-time Updates:
GET /api/ws — WebSocket subscriptionConnectors:
GET /api/connectors — List connectors and statusPOST /api/connectors/:name/token — Store PAT credentialDELETE /api/connectors/:name/token — Remove credentialAdmin:
GET /api/admin/config — Read runtime configPUT /api/admin/config — Update runtime config (requires FLUX_ADMIN_TOKEN)Namespaces (auth mode only):
POST /api/namespaces — Register namespace (returns auth token)/ for namespacing (e.g., scada/pump-01)安装 Flux 后,可以对 AI 说这些话来触发它
Help me get started with Flux
Explains what Flux does, walks through the setup, and runs a quick demo based on your current project
Use Flux to publish events and query shared world state via Flux state engine
Invokes Flux with the right parameters and returns the result directly in the conversation
What can I do with Flux in my design & creative workflow?
Lists the top use cases for Flux, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/flux/ 目录(个人级,所有项目可用),或 .claude/skills/flux/(项目级)。重启 AI 客户端后,用 /flux 主动调用,或让 AI 根据上下文自动发现并使用。
Flux 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Flux 可免费安装使用。请查阅仓库了解许可证信息。
Publish events and query shared world state via Flux state engine. Use when agents need to share observations, coordinate on shared data, or track entity sta...
Flux 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using Flux
Identifies repetitive steps in your workflow and sets up Flux to handle them automatically