aicoin-trading

aicoin-trading is a skill for Claude Code from aicoincom/coinos-skills. It costs 353 tokens per session (3,720 once invoked), scanned B, original, MIT.

A skill for placing leveraged trades on centralized cryptocurrency exchanges such as Binance, OKX, Bybit, and Bitget. A centralized exchange is a company-operated marketplace where the exchange holds the account and processes orders.

In plain words
What is it for?
Use it to preview and, after explicit confirmation, place or close exchange orders and adjust trading settings. It supports actions such as creating orders, closing positions, and setting leverage through the required exchange script.
Why use it?
It enforces a preview-and-confirm process before an order is sent and prevents accidental changes to leverage or margin settings. It also uses a separate closing action to reduce the risk of opening an unwanted opposite position.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code; built for openclaw.

Part of the coinos-skills plugin — 6 skills shipped together

not rated 57repo 2mo ago B scan Socket: warnSnyk: failSkillSpector: warn 353 tokens original MIT

Good fit Use it to preview and, after explicit confirmation, place or close exchange orders and adjust trading settings. It supports actions such as creating orders, closing positions, and setting leverage through the required exchange script.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aicoincom/coinos-skills/aicoin-trading
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aicoincom/coinos-skills --skill aicoin-trading
Clone the repo
git clone --depth 1 https://github.com/aicoincom/coinos-skills

Made for: Claude Code.

Or install coinos-skills, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aicoin-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/aicoincom/coinos-skills/aicoin-trading/github.svg)](https://agentmods.dev/skills/aicoincom/coinos-skills/aicoin-trading)
Your own site
<a href="https://agentmods.dev/skills/aicoincom/coinos-skills/aicoin-trading"><img src="https://agentmods.dev/badge/skills/aicoincom/coinos-skills/aicoin-trading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aicoin-trading

Your own site · 80×15
<a href="https://agentmods.dev/skills/aicoincom/coinos-skills/aicoin-trading"><img src="https://agentmods.dev/badge/skills/aicoincom/coinos-skills/aicoin-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 353 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,720 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket warn 18 Sept 2026
  • Snyk fail 18 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 120
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00353 $0.03720
Opus 5.5 $0.00141 $0.01488
Sonnet 5.5 $0.00071 $0.00744
Haiku 4.5 $0.00035 $0.00372

Measured 2mo ago against content hash b6c81472793f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

aicoin-trading scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 8 executable files (lib/cli.mjs, lib/env-loader.mjs, scripts/api-key-info.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| 存交易所 key(本地,用户在 chat 给了 key 时) | `node scripts/exchange.mjs save_key '{"exchange":"binance","api_key":"...","api_secret":"..."}'` — 写进 `~/.coinos/.env`、`chmod 600`、不回显 secret(OKX/Bitget 还要 `"password":"..."`)。容器内引导用户去
skills/aicoin-trading/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

运行脚本: 从 SKILL.md 所在目录运行 node scripts/exchange.mjs <action>. 三引擎(OpenClaw / Hermes / Claude Code)容器自动加载 skill, 直接 cd 到 skill 目录即可.

AiCoin Trading — 下单专用

⛔ 铁律(违反任何一条都是严重错误)

  1. 禁止写代码下单。 不准写 import ccxt、new ccxt.okx()、fetch("https://...") 或任何自定义代码来下单。所有订单只能通过 node scripts/exchange.mjs create_order 执行。
  2. 禁止自动确认。 create_order / close_position 第一次调用返回预览(含风险提示),你必须把预览完整展示给用户,等用户回复"确认"或"yes"后,才能第二次调用加 "confirmed":"true" 执行。
  3. 禁止修改用户参数。 余额不够就告诉用户,不准自动调整数量或杠杆。
  4. 禁止主动平仓。 除非用户明确要求。
  5. 平仓必须用 close_position。 禁止用 create_order 构建平仓单(容易开反向单)。
  6. 杠杆 / 保证金模式改动必须先确认。 set_trading_params 和 set_leverage 不是只读操作 — 它们改交易所账户的合约配置,直接影响后续所有订单的保证金占用、爆仓价、强平距离。100x 杠杆和 5x 杠杆的爆仓距离差 20 倍,用户没明确说改之前不准 silent set。调用前必须:用自然语言告诉用户你准备把哪个交易所、哪个交易对的杠杆 / margin_mode 从什么改成什么、影响是什么,等用户回复"确认"或"yes"才能执行。

反例 ❌:用户说"开 100x 多 BTC",你不反问杠杆是不是写错了直接 set_trading_params leverage=100 然后下单 — 用户可能是口误想说 10x,100x 直接 silent 设了风险极高。 正确 ✅:先回"100x 杠杆爆仓距离只有约 0.95%(不算手续费),BTC 一根 5 分钟 K 线就能扫掉。确认是 100x 还是想说 10x?",等用户明确回答再 set。

下单流程(两步,不可跳过)

步骤1: node scripts/exchange.mjs create_order '{"exchange":"okx","symbol":"BTC/USDT:USDT","type":"market","side":"buy","amount":1,"market_type":"swap"}'
→ 返回预览(交易对、方向、数量、价格、杠杆、保证金、风险提示)
→ 你必须把所有字段展示给用户

步骤2: 用户确认后
node scripts/exchange.mjs create_order '{"exchange":"okx","symbol":"BTC/USDT:USDT","type":"market","side":"buy","amount":1,"market_type":"swap","confirmed":"true"}'
→ 实际下单

平仓流程(两步,不可跳过)

平仓必须用 close_position,禁止用 create_order 手动构建平仓单(容易开反向单)。

步骤1: node scripts/exchange.mjs close_position '{"exchange":"okx","market_type":"swap"}'
→ 返回所有持仓预览(交易对、方向、张数、盈亏)
→ 展示给用户

步骤2: 用户确认后
node scripts/exchange.mjs close_position '{"exchange":"okx","market_type":"swap","confirmed":"true"}'
→ 市价平掉所有持仓(自动 reduceOnly)

步骤3: 执行后必须验证 + 总结(不可省略)
node scripts/exchange.mjs positions '{"exchange":"okx","market_type":"swap"}'
→ 确认仓位已清空,然后用一句话告诉用户结果(平了什么、盈亏多少)

指定交易对只平部分:加 "symbol":"BTC/USDT:USDT"

为什么有步骤3: close_position 的返回有时被 streaming 截断,用户看不到结果。多查一次 positions 既能确认平仓成功,又能把结论写进最终消息让用户看到。

Read the full file on GitHub · 131 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 131 lines · 353 tokens per session scan B b6c81472793f

Subscribe to this mod's changes

aicoin-trading is a skill published in the GitHub repository aicoincom/coinos-skills (57 stars, last pushed 2mo ago), licensed MIT. It adds 353 tokens to every session and 3,720 once invoked, about $0.0014 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

aicoin-trading compared with skills from other repositories

aicoin-trading next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aicoin-tradingaicoincom/coinos-skillsSkill572mo agoMITB353Claude Code
compare-crypto-paymentsPayRam/payram-mcpSkill1587d agononeA116Claude Code, Codex
payram-webhook-integrationPayRam/payram-mcpSkill1587d agononeA107Claude Code, Codex
payram-payoutsPayRam/payram-mcpSkill1587d agononeA79Claude Code, Codex
payram-topup-wallet-integrationPayRam/payram-mcpSkill1587d agononeA146Claude Code, Codex
payram-bitcoin-paymentsPayRam/payram-mcpSkill1587d agononeA81Claude Code, Codex
payram-crypto-paymentsPayRam/payram-mcpSkill1587d agononeA147Claude Code, Codex