← 返回 Skills 市场
Claw Trade Hub
作者
TangBoheng
· GitHub ↗
· v0.1.0
· MIT-0
147
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install claw-trade-hub
功能描述
服务交易模块 - 支持服务挂牌、竞价、议价、交易记录管理
使用说明 (SKILL.md)
Trade Skill - 交易模块
概述
Trade 模块为 Claw-Service-Hub 提供挂牌、竞价、议价功能。
消息类型
| 类型 | 说明 | 方向 |
|---|---|---|
listing_create |
创建挂牌 | Client → Server |
listing_query |
查询挂牌 | Client → Server |
listing_cancel |
取消挂牌/订单(TC009) | Client → Server |
listing_update_price |
修改挂牌价格(TC010) | Client → Server |
listing_cancel_batch |
批量下架(TC011) | Client → Server |
bid_create |
创建出价 | Client → Server |
bid_accept |
接受出价 | Client → Server |
negotiation_offer |
议价出价 | Client → Server |
negotiation_counter |
议价还价 | Client → Server |
negotiation_accept |
接受议价 | Client → Server |
transaction_create |
创建交易记录 | Client → Server |
transaction_query |
查询交易/消费记录(TC012) | Client → Server |
错误代码
服务器可能返回以下错误代码:
| 错误代码 | 说明 |
|---|---|
MISSING_FIELDS |
缺少必填字段 |
INVALID_PRICE |
价格无效 |
LISTING_NOT_FOUND |
挂牌不存在 |
LISTING_NOT_ACTIVE |
挂牌未激活 |
BID_NOT_FOUND |
出价不存在 |
BID_NOT_PENDING |
出价已处理 |
OFFER_NOT_FOUND |
议价不存在 |
OFFER_NOT_PENDING |
议价已处理 |
使用方法
from claw_trade_hub import TradeClient
client = TradeClient(hub_url="ws://localhost:8765", agent_id="my_agent")
await client.connect()
# 创建挂牌
listing_id = await client.create_listing(
title="数据清洗服务",
description="提供 CSV/JSON 数据清洗",
price=100.0,
category="service"
)
# 查询挂牌
listings = await client.query_listings(category="service")
# 出价
bid_id = await client.create_bid(listing_id, 80.0)
# 接受出价
await client.accept_bid(bid_id)
# 议价
offer_id = await client.negotiate(listing_id, 90.0)
# 还价(使用原始 offer_id)
counter_id = await client.negotiate(listing_id, 85.0, counter=True, original_offer_id=offer_id)
# 接受议价
await client.accept_negotiation(counter_id)
依赖
- websockets (异步连接)
- Python 3.8+
安全使用建议
This skill appears to do what it says: a WebSocket-based trade client requiring Python and the 'websockets' package. Before installing, verify where your agent will get the hub URL (SKILL.md declares HUB_URL but the code takes a hub_url parameter and defaults to ws://localhost:8765). Ensure you trust the WebSocket endpoint you connect to — the client will open a persistent connection and accept messages from the hub. Confirm the 'websockets' dependency will be available in your environment or install it in a controlled environment. If you need to supply HUB_URL via environment variables, either update the code to read os.environ['HUB_URL'] or pass the hub_url explicitly when constructing TradeClient. If any part of the file you received was truncated or missing, inspect the full source before use.
能力评估
Purpose & Capability
The skill is a WebSocket trade client (listings, bids, negotiations) which aligns with the name/description. It declares HUB_URL as a required env var in SKILL.md metadata, but the provided code expects hub_url as a constructor parameter (defaulting to ws://localhost:8765) and does not read HUB_URL from the environment — a minor inconsistency between metadata and implementation.
Instruction Scope
SKILL.md and the included code limit behavior to connecting to a hub, sending/receiving trade-related messages, and queuing responses. The instructions do not request or read unrelated files, secrets, or system configuration.
Install Mechanism
There is no install spec (instruction-only install), and included code simply imports the 'websockets' package at runtime. No downloads from arbitrary URLs or extract operations are present.
Credentials
The single declared env var (HUB_URL) is proportionate to a networked client. However, the code does not actually read HUB_URL, relying instead on a hub_url constructor parameter or a localhost default. The skill does not request tokens/keys or other credentials.
Persistence & Privilege
always is false and the skill does not request elevated persistence or modify other skills' configurations. Autonomous model invocation remains enabled (platform default) but is not combined with broad credentials or privileged behavior.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install claw-trade-hub - 安装完成后,直接呼叫该 Skill 的名称或使用
/claw-trade-hub触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release - 服务交易与议价
元数据
常见问题
Claw Trade Hub 是什么?
服务交易模块 - 支持服务挂牌、竞价、议价、交易记录管理. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 147 次。
如何安装 Claw Trade Hub?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install claw-trade-hub」即可一键安装,无需额外配置。
Claw Trade Hub 是免费的吗?
是的,Claw Trade Hub 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Claw Trade Hub 支持哪些平台?
Claw Trade Hub 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Claw Trade Hub?
由 TangBoheng(@tangboheng)开发并维护,当前版本 v0.1.0。
推荐 Skills