Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

hyperstack-consume超堆栈消耗

Agent Skill

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

总安装

245

周安装

10

GitHub Stars

公开资料未说明

下载量

79
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/usehyperstack/skills --skill hyperstack-consume

简介

hyperstack-consume 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于资源消耗监控、性能分析和优化建议等场景,帮助 Agent 获取相关数据支持决策。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法和功能细节。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 可结合来源仓库和 SKILL.md 继续核验具体用法,确保与当前宿主环境兼容。

SKILL.md

Consuming Hyperstack Streams

The workflow is: discover the schema, understand what the user needs, plan the integration, write the code, verify it works.

1. Prerequisites

Required: Hyperstack CLI (hs) for schema discovery. Run once:

OS="$(uname -s 2>/dev/null || echo Windows)"

if command -v hs &>/dev/null; then
  HS_CLI="hs"
elif command -v hyperstack-cli &>/dev/null; then
  HS_CLI="hyperstack-cli"
else
  if ! command -v cargo &>/dev/null; then
    if [ "$OS" = "Darwin" ] || [ "$OS" = "Linux" ]; then
      curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
      source "$HOME/.cargo/env"
    else
      curl -sSLo /tmp/rustup-init.exe https://win.rustup.rs/x86_64
      /tmp/rustup-init.exe -y
      export PATH="$USERPROFILE/.cargo/bin:$PATH"
    fi
  fi
  cargo install hyperstack-cli
  HS_CLI="hs"
fi
All examples use hs. If installed via cargo (cargo install hyperstack-cli) or npm (npm install -g hyperstack-cli).

2. Discover the Stack Schema

Do this before writing any code. Never guess entity names, field paths, or types.

# List all available stacks
hs explore --json

# Get entities and views for a specific stack
hs explore <stack-name> --json

# Get detailed fields for a specific entity
hs explore <stack-name> <EntityName> --json
Custom stacks must be pushed first. hs explore only works for stacks that have been pushed to Hyperstack. If the user is working with their own custom stack, they must run hs stack push before hs explore will return results. Public/global stacks (like ore) work immediately.

Review the output to build a mental model of:

  • Which entities exist (e.g., OreRound, OreMiner, OreTreasury)
  • What sections each entity has (e.g., id, state, metrics)
  • What fields are in each section with their types
  • What views are available (e.g., latest, list, state, custom views)

3. Understand What the User Needs

Adapt depth to how specific the user's request is:

Clear requirements

The user names specific data points — "show miner rewards and round info."

Map each requirement to a concrete entity field from the schema you discovered in step 2:

User wantsRequired dataAvailable in stack?
"Show mining rewards"reward amount, miner addressOreMiner.state.reward, OreMiner.id.miner_pubkey
"Current round info"round ID, total minersOreRound.id.round_id, OreRound.state.total_miners
"Transaction history"past transactions❌ Not in stack

Confirm every requested data point maps to a real field. If anything is missing, stop and tell the user immediately — don't proceed with implementation if critical data isn't available:

❌ "The ore stack doesn't expose transaction history. It tracks live state,
   not historical transactions. You'd need to query Solana directly via RPC."

⚠️ "The ore stack has current round data but doesn't store historical rounds.
   You'll get live updates but can't query past rounds."

✅ "The ore stack has everything you need — miner rewards are in
   OreMiner.state.reward and round info is in OreRound."

App idea but unclear data needs

The user describes what they want to build — "a mining dashboard" — but hasn't specified which data points.

Present what the stack offers organized by entity, explain what each entity represents, and propose which ones are relevant to their idea. Get confirmation before proceeding.

Exploratory

The user wants to know what's possible — "what can I build with this stack?"

Surface all entities with a one-liner on what each tracks. Let the user narrow scope before planning anything.

4. Plan the Integration

Before writing code, make four decisions:

SDK choice

Match to the user's project and use case:

  • TypeScript — scripts, backends, CLIs, any Node.js context
  • React — UI components, dashboards, anything with a render loop
  • Rust — high-performance consumers, infra, bots

If the user already has a project, match the existing stack. If greenfield, ask.

Streaming mode

User needsMethodWhy
Live-updating data, simplest API.use()Emits merged entity after each change
Know what changed (create/update/delete).watch()Emits operation type with data
Before/after diffs.watchRich()Emits before and after state for comparison
Current snapshot, no live updates.get()One-shot read, returns once

Default to .use() unless the user explicitly needs operation types or diffs.

Single vs multi-entity

If the user's requirements span multiple entities, plan the correlation strategy:

  • Which entities to stream in parallel
  • What shared keys link them (e.g., round_id across OreRound and OreMiner)
  • Whether to use Promise.all (TS) or parallel hooks (React)

Schema validation

Decide upfront whether to use schema filtering:

  • Partial data is fine — fields are optional, use optional chaining (round.state?.motherlode)
  • Must have all fields present — use the generated CompletedSchema variant to guarantee non-null fields
  • Only need specific fields — define a custom Zod schema to validate just what the code requires

5. Install & Connect

TypeScript

npm install hyperstack-typescript
# For prepackaged stacks:
npm install hyperstack-stacks
import { HyperStack } from 'hyperstack-typescript';
import { ORE_STREAM_STACK } from 'hyperstack-stacks/ore';

const hs = await HyperStack.connect(ORE_STREAM_STACK);

For custom stacks (after hs sdk create typescript <stack-name>):

import { HyperStack } from 'hyperstack-typescript';
import MY_STACK from './generated/my-stack';

const hs = await HyperStack.connect(MY_STACK);
Full connection options, error handling, and state management: see references/typescript-api.md

React

npm install hyperstack-react hyperstack-stacks
import { HyperstackProvider } from 'hyperstack-react';

function App() {
  return (
    <HyperstackProvider>
      <MyComponent />
    </HyperstackProvider>
  );
}
import { useHyperstack } from 'hyperstack-react';
import { ORE_STREAM_STACK } from 'hyperstack-stacks/ore';

function MyComponent() {
  const { views, isConnected } = useHyperstack(ORE_STREAM_STACK);
  // views is now typed and ready to use
}
hyperstack-react re-exports everything from hyperstack-typescript. You don't need both packages. Full provider props, hook signatures, filtering operators, and conditional subscriptions: see references/react-api.md

Rust

[dependencies]
hyperstack-sdk = "0.5"
tokio = { version = "1", features = ["full"] }
use hyperstack_sdk::prelude::*;
use hyperstack_stacks::ore::{OreStack, OreRound};

let hs = HyperStack::<OreStack>::connect().await?;
Full Rust SDK API: see references/rust-api.md

6. Implement the Data Layer

Use the decisions from step 4 to write the minimal code. Examples below cover the most common patterns.

For the full API surface (all methods, options, types, and edge cases), read the reference for the SDK you chose in step 4:

  • TypeScript: references/typescript-api.md — connection options, .use()/.watch()/.watchRich() signatures, one-shot reads, update types, error handling
  • React: references/react-api.md — provider props, hook return types, where filtering operators, useOne(), conditional subscriptions, connection state
  • Rust: references/rust-api.mdHyperStack::<T>::connect(), .listen(), tokio integration

Streaming with .use() (TypeScript)

for await (const round of hs.views.OreRound.latest.use()) {
  console.log("Round:", round.id.round_id);
  console.log("Motherlode:", round.state.motherlode);
}

Streaming with hooks (React)

function MiningDashboard() {
  const { views } = useHyperstack(ORE_STREAM_STACK);
  const { data: rounds, isLoading } = views.OreRound.latest.use();

  if (isLoading) return <p>Connecting...</p>;

  return (
    <ul>
      {rounds?.map((round) => (
        <li key={round.id?.round_id}>
          Round #{round.id?.round_id} — Motherlode: {round.state?.motherlode}
        </li>
      ))}
    </ul>
  );
}

One-shot read (TypeScript)

const rounds = await hs.views.OreRound.list.get();
const round = await hs.views.OreRound.state.get(roundAddress);

Multi-entity correlation

const [rounds, miners] = await Promise.all([
  hs.views.OreRound.latest.get(),
  hs.views.OreMiner.list.get(),
]);

const currentRoundId = rounds.values().next().value?.id?.round_id;
const minersInRound = [...miners.values()].filter(
  m => m.state?.current_round_id === currentRoundId
);

Schema validation

import { OreRoundCompletedSchema } from 'hyperstack-stacks/ore';

// Only receive fully-hydrated entities — all fields guaranteed non-null
for await (const round of hs.views.OreRound.latest.use({
  schema: OreRoundCompletedSchema,
})) {
  console.log(round.id.round_id, round.state.motherlode);
}

Custom schemas work too — validate only what your code needs:

import { z } from 'zod';

const TradableTokenSchema = z.object({
  id: z.object({ mint: z.string() }),
  reserves: z.object({ current_price_sol: z.number() }),
});

for await (const token of hs.views.PumpfunToken.list.use({
  schema: TradableTokenSchema,
})) {
  console.log(token.id.mint, token.reserves.current_price_sol);
}

Stream control

Break to stop streaming:

for await (const round of hs.views.OreRound.latest.use()) {
  if ((round.state.motherlode ?? 0) > 1_000_000_000) break;
}

Cancel from outside the loop:

const controller = new AbortController();
setTimeout(() => controller.abort(), 30_000);

try {
  for await (const round of hs.views.OreRound.latest.use()) {
    if (controller.signal.aborted) break;
    console.log("Round:", round.id.round_id);
  }
} catch (e) {
  if (!controller.signal.aborted) throw e;
}

Generating SDK types for custom stacks

hs sdk create typescript <stack-name>
# If the stack was shared via URL:
hs sdk create typescript <stack-name> --url wss://their-stack.stack.usehyperstack.com

7. Verify

After implementation, confirm everything works:

  1. Connection — check that the WebSocket connects successfully (connection state reaches connected)
  2. Data flowing — log or render the first entity received to confirm the stream is live
  3. Field paths — verify fields aren't undefined where you expect data (a sign of wrong field paths or entity names)
  4. Schema filtering — if using schemas, confirm entities are passing validation (not silently filtered to empty)

Common Mistakes

  • Guessing entity names or field paths. Always run hs explore <stack> --json first. Training data may be outdated.
  • Confusing .use() with .watch(). .use() emits the merged entity (T). .watch() emits the operation type (upsert/patch/delete).
  • Forgetting React hooks return {data, isLoading, error}. Always destructure — don't treat the hook result as raw data.
  • Misusing skip as field names. WatchOptions.skip is a number for pagination ({skip: 20, take: 10}), not field exclusion.
  • Not pushing custom stacks. hs explore only works after hs stack push. Custom stacks won't appear until pushed.
  • Not reading the API reference for your SDK. The examples in step 6 are starting points. For complete method signatures, option types, filtering operators, error handling, and edge cases, read the relevant reference: references/typescript-api.md, references/react-api.md, or references/rust-api.md.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

39.25%
按下载量换算31

Claude

29.35%
按下载量换算23

Cursor

19.98%
按下载量换算16

Gemini CLI

9.21%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills