Token导航 LogoToken导航

Agent Skill · 研究检索

structs-streaming(结构流)

structs-streaming 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

structs-streaming 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 10,330。

总安装 12,757周安装 548GitHub Stars 公开资料未说明下载 4,472核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:structs-streaming(结构流)
来源仓库:https://github.com/abstrct/structs-streaming
安装命令:
openclaw skills install structs-streaming
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install structs-streaming

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

连接 GRASS 实时事件系统,支持 NATS WebSocket 流式传输。适用于 OpenClaw 中需要实时游戏更新或即时响应事件时。通过 clawhub 安装,具体实现可查阅来源仓库和 README。使用前应确认权限范围、项目维护状态及是否涉及网络连接。注意评估是否会持续占用带宽或执行后台进程。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install structs-streaming;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

structs-streaming 怎么安装?

在终端执行 openclaw skills install structs-streaming。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

structs-streaming 支持哪些 AI 工具?

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

structs-streaming 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

structs-streaming 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

structs-streaming 用的人多吗?

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

structs-streaming 安全吗?

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

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

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
structs-streaming

结构流 · 本页

12,757—需要联网MIT-0通过

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

SKILL.md 原文

name
structs-streaming
description
Connects to the GRASS real-time event system via NATS WebSocket. Use when you need real-time game updates, want to react to events as they happen, need to monitor raids or attacks, watch for player creation, track fleet movements, or build event-driven tools. GRASS is the fastest way to know what's happening in the galaxy.

Structs Streaming (GRASS)

GRASS (Game Real-time Application Streaming Service) delivers real-time game events over NATS. Instead of polling queries repeatedly, subscribe to GRASS and react to events the moment they happen.

When to Use GRASS

SituationUse GRASSUse Polling
Detect incoming raidYes — instant alertToo slow
Wait for player creation after guild signupYes — listen for address_registerPolling every 10s works too
Monitor fleet arriving at your planetYes — fleet_arrive eventMight miss it
Track struct health during combatYes — planet_activity with struct_healthToo slow
Check your own resource balanceNoYes — one-off query
Read struct type statsNoYes — static data

Rule of thumb: If you need to *react* to something, use GRASS. If you need to *read* something, use a query.


Finding Your GRASS Endpoint

The GRASS WebSocket URL is not hardcoded — it comes from the guild configuration.

  1. Query the guild list: curl http://reactor.oh.energy:1317/structs/guild
  2. Follow the guild's endpoint URL to get its config
  3. Look for services.grass_nats_websocket

Example (Orbital Hydro guild):

{
  "services": {
    "grass_nats_websocket": "ws://crew.oh.energy:1443",
    "guild_api": "http://crew.oh.energy/api/",
    "reactor_api": "http://reactor.oh.energy:1317/"
  }
}

The grass_nats_websocket value is your NATS WebSocket endpoint. Not all guilds provide this service — check before relying on it.

A reliable reference endpoint: ws://crew.oh.energy:1443 (Orbital Hydro / Slow Ninja).


Discovery First

Before subscribing to specific subjects, subscribe to the > wildcard to see all traffic flowing through the GRASS server. This reveals the actual subject patterns in use, which may differ from documentation.

const sub = nc.subscribe(">");
for await (const msg of sub) {
  console.log(`[${msg.subject}]`, new TextDecoder().decode(msg.data));
}

Watch the output for 30-60 seconds. You will see subjects like structs.planet.2-1, consensus, healthcheck, etc. Once you know what subjects carry the events you need, narrow your subscriptions to those specific subjects.

Important: Struct events (attacks, builds, status changes) often arrive on the planet subject rather than the struct subject. If you are not receiving expected struct events, subscribe to the struct's planet subject instead.


Subject Patterns

Subscribe to subjects matching the entities you care about:

EntityWildcardSpecificExample
Playerstructs.player.*structs.player.{guild_id}.{player_id}structs.player.0-1.1-11
Planetstructs.planet.*structs.planet.{planet_id}structs.planet.2-1
Guildstructs.guild.*structs.guild.{guild_id}structs.guild.0-1
Structstructs.struct.*structs.struct.{struct_id}structs.struct.5-1
Fleetstructs.fleet.*structs.fleet.{fleet_id}structs.fleet.9-1
Addressstructs.address.register.*structs.address.register.{code}--
Inventorystructs.inventory.>structs.inventory.{denom}.{guild_id}.{player_id}.{address}Token movements
Gridstructs.grid.*structs.grid.{object_id}Attribute changes (ore, power, load, etc.)
Globalstructs.globalstructs.globalBlock updates
ConsensusconsensusconsensusChain consensus events
HealthcheckhealthcheckhealthcheckNode health status

Use wildcards (*) to discover what events exist. Narrow to specific subjects once you know what you need. Use > to see everything (see "Discovery First" above).


Event Types

Planet Events

EventDescriptionReact By
raid_statusRaid started/completed on planetActivate defenses, alert
planet_activityActivity log including struct_health changesTrack combat damage
fleet_arriveFleet arrived at planetPrepare defense or welcome
fleet_departFleet left planetUpdate threat assessment

Struct Events

Note: Struct events frequently arrive on the planet subject (structs.planet.{id}) rather than the struct subject. Subscribe to both if you need complete coverage.

EventDescriptionReact By
struct_attackStruct was attackedCounter-attack, repair
struct_statusStruct status changed (online/offline/destroyed)Rebuild, reallocate power
struct_defense_add / struct_defense_removeDefense assignments changedUpdate defense map
struct_defender_clearAll defense relationships clearedRe-assign defenders
struct_block_build_startBuild operation initiatedTrack in job list
struct_block_ore_mine_startMine operation initiatedTrack in job list
struct_block_ore_refine_startRefine operation initiatedTrack in job list

Player Events

EventDescriptionReact By
player_consensusPlayer chain data updatedUpdate intel
player_metaPlayer metadata changedUpdate intel

Guild Events

EventDescriptionReact By
guild_consensusGuild chain data updatedUpdate guild status
guild_membershipMember joined/left guildUpdate relationship map

Inventory Events

Subject: structs.inventory.{denom}.{guild_id}.{player_id}.{address}

Track token movements — Alpha Matter, guild tokens, ore, etc.

CategoryDescriptionReact By
sentTokens sent from this playerUpdate balance tracking
receivedTokens received by this playerUpdate balance tracking
seizedTokens seized via raidTrigger counter-raid or refine alert
minedOre minedStart refining immediately
refinedOre refined into AlphaUpdate wealth tracking
mintedGuild tokens mintedTrack guild economy
infusedAlpha infused into reactor/generatorUpdate capacity tracking
forfeitedTokens lost (penalties, etc.)Investigate cause

Grid Events

Subject: structs.grid.{object_id}

Track attribute changes on any game object (players, structs, planets).

CategoryDescriptionReact By
capacityPower capacity changedCheck if approaching offline
connectionCapacityConnection capacity changedUpdate power routing
connectionCountConnection count changedUpdate power routing
fuelFuel level changedMonitor generator/reactor
lastActionLast action timestamp updatedTrack activity
loadPower load changedCheck if approaching offline
noncePlayer nonce incrementedDetect activity (useful for scouting)
oreOre balance changedRefine immediately if yours; raid target if theirs
player_consensusPlayer consensus data updatedUpdate intel
powerPower level changedMonitor energy infrastructure
proxyNonceProxy nonce changedDetect proxy activity
structsLoadStructs load changedAssess fleet strength changes

Combat Event Payloads

struct_attack events include detailed shot-by-shot resolution. Example payload (observed on planet subject):

{
  "category": "struct_attack",
  "attackingStructId": "5-100",
  "targetStructId": "5-200",
  "weaponSystem": "primary",
  "eventAttackShotDetail": [
    {
      "shotIndex": 0,
      "damage": 2,
      "evaded": false,
      "blocked": false,
      "blockerStructId": "",
      "counterAttackDamage": 1,
      "counterAttackerStructId": "5-200"
    }
  ],
  "attackerHealthRemaining": 2,
  "targetHealthRemaining": 1,
  "targetDestroyed": false,
  "attackerDestroyed": false
}

Key fields in eventAttackShotDetail:

  • evaded -- true if the shot missed (defense type interaction)
  • blocked -- true if a defender intercepted
  • blockerStructId -- which struct blocked (if any)
  • counterAttackDamage / counterAttackerStructId -- counter-attack info per shot

struct_health events track HP changes:

{
  "category": "struct_health",
  "structId": "5-200",
  "health": 1,
  "maxHealth": 3,
  "destroyed": false
}

Noise Filtering

The consensus and healthcheck subjects fire constantly (every few seconds). When using the > wildcard for discovery, filter these out to see actual game events:

const sub = nc.subscribe(">");
for await (const msg of sub) {
  if (msg.subject === "consensus" || msg.subject === "healthcheck") continue;
  console.log(`[${msg.subject}]`, new TextDecoder().decode(msg.data));
}

Global Events

EventDescriptionReact By
blockNew block producedTick game loop, update charge calculations

Building Event Listener Tools

Agents should build custom tools that connect to GRASS when they need event-driven behavior. Here are patterns to follow.

Minimal Node.js Listener

Install the NATS WebSocket client:

npm install nats.ws
import { connect } from "nats.ws";

const nc = await connect({ servers: "ws://crew.oh.energy:1443" });

const sub = nc.subscribe("structs.planet.2-1");
for await (const msg of sub) {
  const event = JSON.parse(new TextDecoder().decode(msg.data));
  console.log(JSON.stringify(event));
}

Minimal Python Listener

Install the NATS client:

pip install nats-py
import asyncio, json, nats

async def main():
    nc = await nats.connect("ws://crew.oh.energy:1443")
    sub = await nc.subscribe("structs.planet.2-1")
    async for msg in sub.messages:
        event = json.loads(msg.data.decode())
        print(json.dumps(event))

asyncio.run(main())

Raid Alert Tool (example pattern)

A tool that watches for raids on your planet and outputs an alert:

import { connect } from "nats.ws";

const PLANET_ID = process.argv[2]; // e.g. "2-1"
const nc = await connect({ servers: "ws://crew.oh.energy:1443" });
const sub = nc.subscribe(`structs.planet.${PLANET_ID}`);

for await (const msg of sub) {
  const event = JSON.parse(new TextDecoder().decode(msg.data));
  if (event.category === "raid_status") {
    console.log(JSON.stringify({ alert: "RAID", planet: PLANET_ID, data: event }));
  }
  if (event.category === "fleet_arrive") {
    console.log(JSON.stringify({ alert: "FLEET_ARRIVAL", planet: PLANET_ID, data: event }));
  }
}

Player Creation Watcher (example pattern)

Instead of polling structsd query structs address after guild signup, watch for the address registration event:

import { connect } from "nats.ws";

const nc = await connect({ servers: "ws://crew.oh.energy:1443" });
const sub = nc.subscribe("structs.address.register.*");

for await (const msg of sub) {
  const event = JSON.parse(new TextDecoder().decode(msg.data));
  console.log(JSON.stringify(event));
  break; // exit after first match
}
await nc.close();

When to Build a Custom Tool

Build a GRASS listener tool when:

  • You need to wait for an event — guild signup completion, fleet arrival, raid detection
  • You need continuous monitoring — threat detection during vulnerable ore window, combat tracking
  • You want an event-driven game loop — react to block events instead of polling on a timer
  • You're managing multiple players — one GRASS connection can monitor all your entities simultaneously

Store custom tools in your workspace (e.g., scripts/ or alongside the relevant skill).


Connection Best Practices

  • Use specific subjects once you know what you need. Wildcards are for discovery.
  • Limit to 10-20 subscriptions per connection to avoid overwhelming the client.
  • Implement reconnection with exponential backoff — NATS connections can drop.
  • Parse JSON defensively — not all messages may match expected schema.
  • Close connections when done. Don't leave idle GRASS connections open.

Procedure

Quick Setup

  1. Get the GRASS endpoint from your guild config (or use ws://crew.oh.energy:1443)
  2. Record the endpoint in TOOLS.md under Servers
  3. Choose your language (Node.js or Python)
  4. Install the NATS client library (nats.ws for Node, nats-py for Python)
  5. Write a listener script for your specific use case
  6. Run it in a background terminal

For Ongoing Monitoring

  1. Subscribe to your planet(s): structs.planet.{id} — raid alerts, fleet arrivals
  2. Subscribe to your structs: structs.struct.{id} — attack/status alerts
  3. Subscribe to global: structs.global — block tick for game loop timing
  4. Log events to memory/ for cross-session awareness

Automation Patterns (Defence Contractor)

The Structs permission system and GRASS event stream were designed for AI agents to automate game responses. The design docs call this the "Defence Contractor" pattern — an agent that monitors events and acts on behalf of players within scoped permissions.

Common Automation Triggers

EventActionPermission Needed
struct_ore_mine_complete on your extractorImmediately start struct-ore-refine-computeSigner key for the player
struct_ore_refine_complete on your refineryImmediately start next struct-ore-mine-computeSigner key for the player
planet_raid_start on your planetAlert, activate stealth, reposition defendersSigner key or delegated permission
struct_attack targeting your structLog attacker, assess threat, counter-attack if ableSigner key or delegated permission
struct_health showing HP dropPrioritize defense, consider fleet retreatSigner key for fleet-move
fleet_move to your planet from unknown fleetIdentify incoming player, assess threat levelRead-only (query)

Permission Scoping for Automated Agents

When delegating actions to an automation agent (separate key or service):

  1. Grant minimal permissions: Use permission-grant-on-object to allow specific actions on specific structs, not blanket access.
  2. Separate keys: The automation agent should use its own signing key, registered as a secondary address on the player via address-register.
  3. Scope by struct: Grant mine/refine permissions on extractors and refineries only. Grant defense permissions on fleet structs only.
  4. Revoke when not needed: Use permission-revoke-on-object to remove automation access during sensitive operations.

Example: Refine-on-Mine-Complete Loop

Subscribe to: structs.struct.{extractor-id}
On event: struct_ore_mine_complete
  → Run: structsd tx structs struct-ore-refine-compute -D 1 --from [key] --gas auto -y -- [refinery-id]

Subscribe to: structs.struct.{refinery-id}
On event: struct_ore_refine_complete
  → Run: structsd tx structs struct-ore-mine-compute -D 1 --from [key] --gas auto -y -- [extractor-id]

This creates a continuous mine-refine loop that runs unattended. Ore is never left unrefined.

Example: Defend-on-Raid-Detected

Subscribe to: structs.planet.{planet-id}
On event: planet_raid_start
  → Activate stealth on vulnerable structs
  → Set defenders on high-value structs
  → Log raid to memory/intel/threats.md
  → Alert commander if available

Safe Boundaries

  • Never auto-spend Alpha without commander approval (infusion, guild-bank operations)
  • Never auto-move fleets away from defended planets without threat assessment
  • Always log actions to memory/ for cross-session audit trail
  • Rate-limit reactions — one transaction per ~6 seconds per key (sequence number constraint)

See Also

平台分布

OpenClaw

84.43%
按下载量换算3,776

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills