← 返回 Skills 市场
Ai Skill
作者
watchmer20-ctrl
· GitHub ↗
· v1.0.0
· MIT-0
99
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ai-skill
功能描述
Enables AI to create and trade shares in prediction markets, query positions and history, and execute automated trading strategies.
使用说明 (SKILL.md)
ClawMarkets Trading Skill
AI 预测市场交易 Skill - 让 AI 可以参与预测市场博弈
触发词
当用户提到以下内容时触发此技能:
- "预测市场"、"prediction market"
- "交易"、"trading"、"买卖份额"
- "ClawMarkets"、"市场交易"
- "买入"、"卖出"、"持仓"、"交易策略"
功能
- 创建预测市场
- 买入/卖出市场份额
- 查询持仓和交易历史
- 执行交易策略(动量、价值、套利)
- 自动化交易循环
依赖
- Python 3.8+
- aiohttp
- websockets
- pandas
- numpy
安装
pip3 install aiohttp websockets pandas numpy
使用示例
基础交易
from markets_skill import ClawMarketsSkill
skill = ClawMarketsSkill(api_base_url="http://localhost:8080")
await skill.connect()
# 创建市场
market = await skill.create_market(
name="AI 发展预测",
description="2026 年 AI 是否会超越人类?",
initial_price=50.0
)
# 买入
await skill.buy(market_id=market['id'], shares=100)
# 卖出
await skill.sell(market_id=market['id'], shares=50)
# 查询持仓
positions = await skill.get_positions()
使用策略
from strategies import MomentumStrategy, StrategyExecutor
strategy = MomentumStrategy(lookback_period=20)
executor = StrategyExecutor([strategy])
signals = await executor.execute_all(market_data)
配置
export CLAWMARKETS_API_URL="http://localhost:8080"
export CLAWMARKETS_API_KEY="your-api-key" # 可选
作者
ClawMarkets Team
版本
1.0.0
安全使用建议
This skill appears to implement what it claims: a client for a ClawMarkets API plus strategy code. Before installing or enabling automatic invocation: 1) Confirm the API base URL you configure is a trusted endpoint (prefer HTTPS) — by default examples use http://localhost:8080. 2) Do not supply real trading API keys until you have tested in a sandbox; run the provided test script in a safe environment. 3) Note the docs mention CLAWMARKETS_API_* env vars but the code expects api_base_url/api_key parameters — either pass them explicitly or review/modify the code to read env vars if desired. 4) Because the agent can act autonomously and place trades, consider disabling autonomous invocation or adding limits/approval gates to prevent unintended financial operations. 5) If you need full assurance, review the remaining truncated parts of source for any network calls beyond the configured api_base_url and run the test suite locally.
功能分析
Type: OpenClaw Skill
Name: ai-skill
Version: 1.0.0
The ClawMarkets Trading Skill is a legitimate framework designed to allow an AI agent to interact with a prediction market API. The core logic in `markets_skill.py` implements standard REST API interactions using `aiohttp`, and `strategies.py` contains mathematical trading algorithms (Momentum, Value, Arbitrage) using `numpy` and `pandas`. No evidence of data exfiltration, credential theft, or malicious execution was found; the handling of API keys and network requests is consistent with the stated purpose of the skill.
能力评估
Purpose & Capability
Name, README, SKILL.md and code all describe prediction‑market operations (create market, buy/sell, positions, strategies). Requested dependencies (aiohttp, pandas, numpy) align with HTTP calls and strategy computation. Minor inconsistency: SKILL.md and README show environment variables (CLAWMARKETS_API_URL, CLAWMARKETS_API_KEY) but the code does not read environment variables automatically — it expects api_base_url and api_key to be passed to constructors or connect() calls.
Instruction Scope
SKILL.md instructions and examples stay within trading use: connecting to an API, creating markets, executing strategies. There are no instructions to read unrelated files, shell history, or to transmit data to unexpected endpoints. Example usage uses localhost by default; actual network calls go to the configured API base URL.
Install Mechanism
No install spec is present (instruction-only in registry), so nothing is downloaded or executed during install. The package includes Python source files; dependencies are standard PyPI libraries (aiohttp, websockets, pandas, numpy) referenced in docs. No suspicious external URLs or archive downloads in install.
Credentials
The skill does not declare required environment variables or credentials in the registry metadata. SKILL.md recommends optional CLAWMARKETS_API_URL and CLAWMARKETS_API_KEY, which are proportionate to a trading client — but the code doesn’t auto-read env vars, creating a minor mismatch between documentation and implementation. No unrelated or excessive credentials are requested.
Persistence & Privilege
Skill flags are default (always: false, disable-model-invocation: false). This means the agent could invoke the skill autonomously (platform default). Given the skill can execute trades, users should be aware of the financial risk of autonomous operation; however the skill does not request elevated system privileges or modify other skills.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ai-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/ai-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
ClawMarkets Trading Skill released – provides AI trading abilities for prediction markets.
- Enables creating, trading, and querying prediction market positions.
- Supports buying and selling of market shares.
- Includes automated trading strategies (momentum, value, arbitrage).
- Offers API usage examples and environment variable configuration.
- Requires Python 3.8+, aiohttp, websockets, pandas, and numpy.
元数据
常见问题
Ai Skill 是什么?
Enables AI to create and trade shares in prediction markets, query positions and history, and execute automated trading strategies. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 99 次。
如何安装 Ai Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-skill」即可一键安装,无需额外配置。
Ai Skill 是免费的吗?
是的,Ai Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Ai Skill 支持哪些平台?
Ai Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Ai Skill?
由 watchmer20-ctrl(@watchmer20-ctrl)开发并维护,当前版本 v1.0.0。
推荐 Skills