Commit Graph

60 Commits

Author SHA1 Message Date
shaolong.wang b65b0fb3c3 chore(ci): add workflow_dispatch to opensource-guard
- enable manual 'Run workflow' button in Actions UI
- for dispatch events, use sentinel __none__ as base so the script
  falls back to full-tree scan instead of erroring on missing base

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 18:46:20 +08:00
numpy0001 3a2758026b Merge pull request #9 from okx/feat/opensource-guard
feat: add open-source guard (CI + local hook)
2026-04-20 18:14:19 +08:00
shaolong.wang 044566f2fb feat: add open-source guard (CI + local hook)
Two-layer interception to prevent internal files / secrets from reaching
the public repo. Same setup as okx/agent-trade-kit.

- scripts/check-opensource.sh + opensource-denylist.txt
  Layer 0 scanner: path + content denylist. In diff mode vs BASE; falls
  back to full-tree scan when BASE is missing or has no merge-base with
  HEAD (orphan / force-push / first push).
- .github/workflows/opensource-guard.yml
  CI gate: runs on PR to master and push to master. Job name
  'opensource-guard' — add it as required status check in branch rules.
- .githooks/pre-push
  Local fast feedback. Enable once per clone:
    git config core.hooksPath .githooks
  Bypass with --no-verify (CI gate is the authoritative check).

To extend coverage, edit scripts/opensource-denylist.txt only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 18:10:57 +08:00
shaolong.wang c6e0b06132 chore(skills): sync skills/ from forGithub branch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 11:15:55 +08:00
shaolong.wang 088654cfdd chore(skills): sync skills/ from forGithub branch
Replace skills/ folder content with the version from forGithub branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 21:20:22 +08:00
numpy0001 bc0c878443 Merge pull request #4 from okx/sync/skills-to-master
feat(skills): sync skills v1.2.8 — add okx-cex-skill-mp, preflight, u…
2026-04-03 14:54:40 +08:00
shaolong.wang 4604ee72cc feat(skills): sync skills v1.2.8 — add okx-cex-skill-mp, preflight, update market/trade/bot/earn/portfolio 2026-04-03 14:52:31 +08:00
shaolong.wang 25f369096f feat(skills): sync skills/ from forGithub branch
- Add README.md and README.zh-CN.md
- Add okx-cex-earn/references/autoearn-commands.md
- Update okx-cex-bot/SKILL.md
- Update okx-cex-earn/SKILL.md
- Update okx-cex-earn/references/savings-commands.md
- Update okx-cex-earn/references/workflows.md
- Update okx-cex-trade/SKILL.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 22:41:05 +08:00
shaolong.wang@okg.com 0bf9ee1467 Merge branch 'feat/okx-cex-indicator' into 'master'
feat(okx-cex-market): add technical indicator support to market skill

See merge request retail-ai/agent-skills!40
2026-03-23 03:55:58 +00:00
shaolong.wang 6a3158a0d3 refactor(okx-cex-market): split monolithic skill into progressive-loading structure
Restructure SKILL.md as a lean entry point (106 lines) and extract
detailed content into 5 reference files loaded on demand:
- references/price-data-commands.md  (ticker/orderbook/candles/trades)
- references/indicator-commands.md   (full indicator table, --backtest-time, return fields)
- references/derivatives-commands.md (funding-rate/mark-price/OI/price-limit/index-ticker)
- references/instrument-commands.md  (instruments/stock-tokens + jq fallback)
- references/workflows.md            (cross-skill workflows + MCP tool name mapping)

Restores content lost in v2: --backtest-time param, per-command return
fields, MCP tool names, index-candles --history flag, stock-tokens fallback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 11:07:38 +08:00
shaolong.wang dad2fd9e01 feat(okx-cex-market): add technical indicator support to market skill
Add market_get_indicator command coverage to okx-cex-market skill:
- Update skill description and routing to include indicator trigger phrases
- Add Quickstart examples for RSI, EMA, MACD, AHR999, and historical list
- Add three core investment scenario workflows: trend/entry signal,
  overbought/oversold exit timing, and BTC macro cycle analysis
- Add full CLI reference for okx market indicator with params table
  and categorized indicator catalog (Trend, Momentum, Volatility, BTC Cycle)
- Add MCP tool reference, I/O examples, and edge cases for indicator usage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 16:07:02 +08:00
jay.fan@okg.com 2f1d678df4 Merge branch 'fix/issue-21-tgtccy-sync' into 'master'
fix(okx-cex-trade): sync tgtCcy parameter and add sz unit rule

Closes #21

See merge request retail-ai/agent-skills!38
2026-03-20 07:11:54 +00:00
jay.fan@okg.com a1cd10fac0 fix(okx-cex-trade): sync tgtCcy parameter and add sz unit rule 2026-03-20 07:11:54 +00:00
jay.fan@okg.com afebad6459 Merge branch 'docs/update-review-checklist' into 'master'
docs: complete review checklist with missing conventions

Closes #20

See merge request retail-ai/agent-skills!35
2026-03-19 02:58:23 +00:00
jay.fan b660cd36ca docs: add directory structure, variant pattern, and theory of mind to review checklist
- Add standard directory structure guideline (SKILL.md, scripts/, references/, assets/)
- Add domain variant pattern for multi-scenario skills
- Add "use theory of mind" writing style guideline

Closes #20

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:28:12 +08:00
jay.fan@okg.com 2071cd6b0f Merge branch 'feat/dcd-atomic-tools' into 'master'
fix(okx-cex-earn): update DCD references for atomic subscribe/redeem tools

See merge request retail-ai/agent-skills!33
2026-03-17 07:45:32 +00:00
chuan.wang@okg.com c7acca6b14 fix(okx-cex-earn): update DCD references for atomic subscribe/redeem tools 2026-03-17 07:45:32 +00:00
jay.fan@okg.com 2712d74fbf Merge branch 'feat/fix-algo-place-trailing-stop' into 'master'
fix(trade-skill): update algo place commands with trailing stop params

Closes #19

See merge request retail-ai/agent-skills!31
2026-03-14 13:57:10 +00:00
jay.fan c928e70aa6 fix: address review feedback [agent_developer]
- Nit 1: 补全 spot/swap/futures algo place 参数表中缺失的基本参数
  (--instId, --side, --ordType, --sz, --tdMode, --posSide, --reduceOnly)
- Nit 2: 为所有 algo place 和 trail 章节中 --callbackRatio / --callbackSpread
  的描述列添加互斥说明 ("cannot be combined with ..."),使表格自成一体
- Nit 3: 将 Futures algo place 的 --instId 格式说明从代码块与表格之间
  移到表格下方,与 Spot/Swap 章节保持一致

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:52:53 +08:00
jay.fan adea5e2985 fix(trade-skill): add trailing stop params to algo place commands
- Update spot/swap/futures algo place sections to include
  --ordType move_order_stop and trailing stop params
  (--callbackRatio, --callbackSpread, --activePx)
- Rename section titles to "TP/SL / Trail" to reflect expanded support
- Add full param tables to swap/futures algo place sections
- Add --instId format note to futures algo place section
- Wording unified with existing trail sections for consistency

Closes #19
2026-03-14 21:44:06 +08:00
jay.fan@okg.com ae9678d1b8 Merge branch 'feat/feat-update-okx-cex-trade-skil' into 'master'
feat(okx-cex-trade): add futures + option parity to skill [agent_developer]

Closes #18

See merge request retail-ai/agent-skills!30
2026-03-14 10:04:02 +00:00
jay.fan d55fb485c5 feat(okx-cex-trade): add futures + option parity to skill
Add missing futures commands to match swap parity (MR !127 + !128):
- Command Index: add futures amend/close/leverage/get-leverage (27→41), renumber Options 38→42-51
- Operation Flow Step 1: expand futures routing to include amend/close/leverage/get-leverage
- Step 2: add confirmation rules for futures close and futures leverage
- Step 3: add verification steps for futures place and futures close
- CLI Reference: add Futures — Amend Order, Close Position, Set Leverage, Get Leverage sections
- MCP Tool Reference: add futures_amend_order, futures_close_position, futures_set_leverage, futures_get_leverage, futures_place_move_stop_order
- Edge Cases: replace incorrect "No swap close" note with accurate futures close/leverage descriptions
- Examples: add 3 futures examples (close position, set leverage, TP/SL algo place)

Option section already fully up to date — no changes needed.

Closes #18
2026-03-14 17:56:36 +08:00
jay.fan@okg.com 811cf0a85d Merge branch 'feat/issue-17' into 'master'
feat: update trade skill with trailing stop for spot/swap/futures [agent_developer]

Closes #17

See merge request retail-ai/agent-skills!27
2026-03-13 15:04:08 +00:00
jay.fan bf2198828b fix: address review feedback [agent_developer]
- Fix phantom MCP tool name: `place_move_stop_order` → `swap_place_move_stop_order`
  (confirmed via human feedback: spot uses core directly, futures reuses swap tool)
- Replace hardcoded futures date `250328` with `<YYMMDD>` placeholder across
  workflow examples, instId format docs, and edge cases section
- Align trailing stop edge case notes for Spot and Futures with consistent
  format: add (relative/absolute price) clarifiers to both sections

Closes #17
2026-03-13 23:01:55 +08:00
jay.fan ee212ef94b feat: update trade skill with trailing stop for spot/swap/futures
Add trailing stop (move_order_stop) documentation for all three modules.
Update tool name from swap_place_move_stop_order to place_move_stop_order.

Closes #17

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 22:45:56 +08:00
jay.fan@okg.com 400fce9eba Merge branch 'fix/okx-cex-earn-post-merge' into 'master'
fix(earn): post-merge bug fixes for okx-cex-earn

See merge request retail-ai/agent-skills!26
2026-03-13 13:01:54 +00:00
chuan.wang@okg.com 391bd6d25d fix(earn): post-merge bug fixes for okx-cex-earn 2026-03-13 13:01:54 +00:00
shaolong.wang@okg.com 0551bb6996 Merge branch 'dsw/feat/stock-optimize' into 'master'
feat: add stock token support to market and trade skills

See merge request retail-ai/agent-skills!25
2026-03-13 11:30:28 +00:00
jay.fan@okg.com 7ecb33d21a Merge branch 'feature/okx-cex-earn' into 'master'
feat(earn): merge Dual Investment (DCD) into okx-cex-earn, split references by module

See merge request retail-ai/agent-skills!18
2026-03-13 11:10:28 +00:00
chuan.wang@okg.com 8f151a654f feat(earn): merge Dual Investment (DCD) into okx-cex-earn, split references by module 2026-03-13 11:10:28 +00:00
shaolong.wang 2de67b40b6 feat: add stock token support to market and trade skills
- okx-cex-market: add `stock-tokens` command (Command Index, CLI Reference,
  Quickstart, Cross-Skill workflow, I/O examples, Edge Cases)
- okx-cex-trade: add stock token trading workflow (Quickstart examples with
  correct --tdMode/--posSide, Cross-Skill flow, leverage 5x cap warning,
  Edge Cases)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 19:05:20 +08:00
weilong.zhao@okg.com aa54f47058 Merge branch 'fix/description' into 'master'
fix: add algoId/algoOrdType usage rules to bot skill to prevent AI agent errors

See merge request retail-ai/agent-skills!22
2026-03-13 08:13:07 +00:00
donghui.yang 15c63e78df fill missing description 2026-03-13 15:59:24 +08:00
jay.fan@okg.com 82653e6314 Merge branch 'feat/issue-15' into 'master'
feat: Add skill review checklist (REVIEWING.md) to codify quality standards [agent_developer]

Closes #15

See merge request retail-ai/agent-skills!21
2026-03-13 07:32:52 +00:00
jay.fan 2d4520fa2f fix: calibrate description word count to match existing skills
Update REVIEWING.md description word-count guideline from 80–120 to
80–150 words, which accurately reflects the actual range found in the
four existing skill files (83, 88, 112, 145 words). The previous upper
bound of 120 would have flagged the largest existing skill as
non-conformant.

Addresses nit from MR !21 review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 15:28:34 +08:00
jay.fan e1146fc6d9 fix: address review feedback [agent_developer]
- CONTRIBUTING.md: add "### For reviewers" subheading before the
  reviewer checklist reference, separating it clearly from the
  contributor PR checklist (nit from MR !21 review)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 15:21:48 +08:00
jay.fan c00bdde7a1 feat(docs): add REVIEWING.md skill review checklist
- Add REVIEWING.md at repo root with four-section review checklist
  (Structure, Content Accuracy, Interaction Design, Writing Style)
- Each section is priority-tagged so reviewers can triage efficiently
- Add cross-reference line to CONTRIBUTING.md PR checklist section
  pointing reviewers to REVIEWING.md before approving skill MRs

Closes #15

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 14:31:10 +08:00
shaolong.wang@okg.com d7e1b2669b Merge branch 'fix/issue-60-derivative-sz-conversion' into 'master'
fix(skill): add derivative sz conversion rules for swap/futures/options

See merge request retail-ai/agent-skills!17
2026-03-11 14:57:58 +00:00
shaolong.wang aa2c9b1612 fix(skill): add derivative sz conversion rules for swap/futures/options
When placing swap, futures, or option orders, sz must always be number
of contracts. Users often specify a USDT amount instead, which without
conversion leads to dangerously oversized positions.

Added a dedicated "Sz Conversion Rules for Derivatives" section that:
- Identifies contract type (linear vs inverse) from instId pattern
- Detects user sz intent (USDT amount vs contracts vs ambiguous)
- Provides the correct formula per contract type:
  - Linear (USDT-margined): sz = floor(usdtAmt / (markPx × ctVal))
  - Inverse (USD-margined): sz = floor(usdtAmt / ctVal)
  - Inverse options: sz = floor(usdtAmt / (markPx_BTC × btcPx × ctVal))
- Validates sz against minSz/lotSz before placing
- Requires showing conversion summary to user for confirmation
- Warns users about BTC settlement for inverse contracts

Also added two new workflow examples (linear and inverse swap by USDT
amount), updated Edge Cases and Global Notes for all derivative types.

Fixes #60

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 22:55:59 +08:00
jay.fan@okg.com 6a53066d84 Merge branch 'docs/skill-place-attach-tp-sl' into 'master'
docs: sync place command TP/SL params to SKILL.md

Closes #10

See merge request retail-ai/agent-skills!16
2026-03-11 12:43:07 +00:00
jay.fan fed84a2c20 docs: sync place command TP/SL params to okx-cex-trade SKILL.md (#10)
Update spot/swap/futures place command references, cross-skill workflow,
quickstart, and examples to reflect attached TP/SL support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 18:26:12 +08:00
jay.fan@okg.com 3e32055fce Merge branch 'fix/risk' into 'master'
fix risk

See merge request retail-ai/agent-skills!15
2026-03-11 08:18:10 +00:00
donghui.yang 008759e8fa fix risk 2026-03-11 16:03:14 +08:00
jay.fan@okg.com 115e558c03 Merge branch 'fix/issue-9-doc-links' into 'master'
Fix broken links and replace MoltBot references in docs (#9)

Closes #9

See merge request retail-ai/agent-skills!14
2026-03-10 15:05:54 +00:00
jay.fan@okg.com 47c710308e Fix broken links and replace MoltBot references in docs (#9) 2026-03-10 15:05:54 +00:00
weilong.zhao@okg.com 9824758961 Merge branch 'fix/dca_param' into 'master'
Fix/dca param

See merge request retail-ai/agent-skills!11
2026-03-10 04:20:01 +00:00
donghui.yang 27ed610ce6 fix bug 2026-03-10 12:14:05 +08:00
donghui.yang 036467b17c 删除spot dca 2026-03-10 11:21:36 +08:00
donghui.yang d36abde91a fix dca_param 2026-03-10 10:12:01 +08:00
donghui.yang b8b79a64ed fix dca_param 2026-03-10 00:28:24 +08:00