@bitget-ai/bitget-agent-skill 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +123 -0
- package/VERSION +1 -0
- package/package.json +47 -0
- package/references/auth-setup.md +26 -0
- package/references/commands.md +1258 -0
- package/references/demo-trading.md +55 -0
- package/references/error-codes.md +53 -0
- package/references/trading/README.md +36 -0
- package/references/trading/futures-cancel-orders.md +113 -0
- package/references/trading/futures-get-orders.md +155 -0
- package/references/trading/futures-leverage-config.md +184 -0
- package/references/trading/futures-modify-order.md +173 -0
- package/references/trading/futures-place-order.md +429 -0
- package/references/trading/futures-positions.md +154 -0
- package/references/trading/spot-cancel-orders.md +87 -0
- package/references/trading/spot-get-orders.md +120 -0
- package/references/trading/spot-modify-order.md +95 -0
- package/references/trading/spot-place-order.md +166 -0
- package/references/trading/spot-plan-orders.md +160 -0
- package/scripts/gen-references.js +70 -0
- package/scripts/install.js +177 -0
- package/skills/SKILL.md +172 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `bitget-agent-skill` are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.2.0] - 2026-05-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **`bitget-agent-skill` binary** — exposes the installer as a re-runnable command, so users can redeploy the skill to a different AI host without reinstalling the npm package:
|
|
12
|
+
```bash
|
|
13
|
+
npx bitget-agent-skill --target codex # add to Codex
|
|
14
|
+
npx bitget-agent-skill --target claude,codex # multiple targets
|
|
15
|
+
npx bitget-agent-skill --interactive # interactive picker
|
|
16
|
+
```
|
|
17
|
+
Previously this script only ran during `postinstall`.
|
|
18
|
+
- **Provenance attestations** on published artefacts (`publishConfig.provenance: true`) for supply-chain verification on npm.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- **Renamed package: `bitget-skill` → `bitget-agent-skill`.** The new name aligns with the `bitget-agent-*` family naming convention. The previous `bitget-skill` name is no longer maintained on npm.
|
|
22
|
+
- **Skill directory renamed:** the postinstall script now writes to `~/.claude/skills/bitget-agent-skill/` (was `~/.claude/skills/bitget-skill/`). Same for Codex and OpenClaw targets. Existing users on the old name should remove the old directory after upgrading.
|
|
23
|
+
- **Generated references now reference `@bitget-ai/bitget-agent-sdk`** (was `bitget-core`). The `references/commands.md` catalog of 59 tools is auto-regenerated on publish.
|
|
24
|
+
- **Minimum Node.js version: 20.0.0** (was 18). Node 18 reached end-of-life in April 2025.
|
|
25
|
+
- **Repository moved** from monorepo `agent_hub/packages/bitget-skill/` to standalone repo [`bitget/agent-skill`](https://github.com/bitget/agent-skill).
|
|
26
|
+
|
|
27
|
+
### Unchanged
|
|
28
|
+
- The skill's trigger description, behaviour, and content. Your AI assistant will recognise the same trading intents and respond the same way.
|
|
29
|
+
- Dependency on `bgc` CLI (now `bitget-agent-cli`) — install both for full functionality.
|
|
30
|
+
|
|
31
|
+
[1.2.0]: https://github.com/bitget/agent-skill/releases/tag/v1.2.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Bitget
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# @bitget-ai/bitget-agent-skill
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@bitget-ai/bitget-agent-skill)
|
|
4
|
+
[](https://nodejs.org)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
The **skill surface** of the [Bitget Agent Hub](https://github.com/Bitget-AI/agent-hub) — installs an AI skill that teaches Claude Code, Codex, and OpenClaw **when and how** to use [`bgc`](https://github.com/Bitget-AI/agent-cli) for natural-language Bitget trading. Pure markdown, runtime-free.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @bitget-ai/bitget-agent-cli # the bgc CLI this skill drives
|
|
11
|
+
npx @bitget-ai/bitget-agent-skill # one-shot: deploys SKILL.md into your AI tool
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
> Why one is `-g` and the other is `npx`? `bgc` is a persistent CLI your AI calls dozens of times per session — it goes on `$PATH`. This skill, by contrast, is a one-shot deploy: it copies markdown into your AI tool's skill directory and exits, then is never used again until you upgrade. `npx` always pulls the latest version, so subsequent runs auto-upgrade you.
|
|
15
|
+
|
|
16
|
+
> **Prerequisites:** Node.js ≥ 20. The `bgc` CLI ([`@bitget-ai/bitget-agent-cli`](https://github.com/Bitget-AI/agent-cli)) installed and on `$PATH`. A Bitget API key, secret, and passphrase ([create one](https://www.bitget.com/api-doc/common/intro)).
|
|
17
|
+
|
|
18
|
+
> Installation is a separate, explicit step (no postinstall side effects). By default it deploys to Claude Code at `~/.claude/skills/bitget-agent-skill/`.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Why a skill (vs. just installing `bgc`)
|
|
23
|
+
|
|
24
|
+
The CLI alone gives the AI 59 commands but no semantics — the assistant doesn't know **when** to reach for Bitget, or **how** to compose the right tool.
|
|
25
|
+
|
|
26
|
+
The skill adds:
|
|
27
|
+
|
|
28
|
+
- A **trigger description** so Claude Code / Codex / OpenClaw automatically invokes the skill on any Bitget-relevant request — including casual phrasings (*"buy 0.1 BTC at market"*) and Chinese (*"查看我的持仓"*).
|
|
29
|
+
- A **reference catalog** of every command with parameters and examples, auto-generated from the SDK's tool definitions.
|
|
30
|
+
- **Operational guidance** for write operations, demo trading, error codes, auth setup, and safety patterns.
|
|
31
|
+
|
|
32
|
+
Result: you say *"buy 0.1 BTC at market on Bitget"* and it actually works — the assistant knows to compose `bgc spot spot_place_order --symbol BTCUSDT --side buy --orderType market --size 0.1`, surfaces a `[CAUTION]` confirmation, and runs it.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Targets
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Default — Claude Code
|
|
40
|
+
npx @bitget-ai/bitget-agent-skill
|
|
41
|
+
|
|
42
|
+
# Pick targets explicitly
|
|
43
|
+
npx @bitget-ai/bitget-agent-skill --target claude
|
|
44
|
+
npx @bitget-ai/bitget-agent-skill --target claude,codex
|
|
45
|
+
npx @bitget-ai/bitget-agent-skill --target all
|
|
46
|
+
|
|
47
|
+
# Pick interactively
|
|
48
|
+
npx @bitget-ai/bitget-agent-skill --interactive
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Currently supported skill destinations:
|
|
52
|
+
|
|
53
|
+
| Target | Skill location |
|
|
54
|
+
|---|---|
|
|
55
|
+
| Claude Code | `~/.claude/skills/bitget-agent-skill/` |
|
|
56
|
+
| Codex | `~/.codex/skills/bitget-agent-skill/` |
|
|
57
|
+
| OpenClaw | `~/.openclaw/skills/bitget-agent-skill/` |
|
|
58
|
+
|
|
59
|
+
After installing, restart your AI host so the new skill is picked up.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## How it fits together
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
You → Claude Code / Codex / OpenClaw (with this skill loaded)
|
|
67
|
+
│
|
|
68
|
+
│ "buy 0.1 BTC at market on Bitget"
|
|
69
|
+
▼
|
|
70
|
+
bgc CLI (@bitget-ai/bitget-agent-cli)
|
|
71
|
+
│
|
|
72
|
+
▼
|
|
73
|
+
Bitget REST API
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`bitget-agent-skill` ships **pure markdown** — no daemon, no runtime, no MCP server. The actual API calls go through `bgc`, which the skill teaches the AI to invoke correctly.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## What ships in the skill
|
|
81
|
+
|
|
82
|
+
| File | Purpose |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `SKILL.md` | Top-level skill definition with trigger phrases (English + Chinese) so the AI knows when to invoke. |
|
|
85
|
+
| `references/commands.md` | Auto-generated catalog of all 59 tools — names, parameters, defaults, auth requirements. |
|
|
86
|
+
| `references/auth-setup.md` | How to create a Bitget API key and configure environment variables. |
|
|
87
|
+
| `references/demo-trading.md` | How to use `--paper-trading` for safe rehearsal. |
|
|
88
|
+
| `references/error-codes.md` | Bitget API error codes and recommended AI responses. |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Pair with market signals
|
|
93
|
+
|
|
94
|
+
For market analysis (no API key needed), pair this skill with [`@bitget-ai/bitget-signal`](https://github.com/Bitget-AI/bitget-signal):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npx @bitget-ai/bitget-signal
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Five additional skills get installed (macro / market-intel / sentiment / technical / news) and Bitget's public market-data MCP server is registered. The two products are complementary — one trades, the other analyses.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Manage everything with the meta installer
|
|
105
|
+
|
|
106
|
+
If you're using more than one Bitget AI package, the meta installer can install / upgrade / rollback the lot:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npx @bitget-ai/bitget-agent-installer
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
See [agent-hub](https://github.com/Bitget-AI/agent-hub) for the full installer feature list.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
[MIT](LICENSE)
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
<sub>Part of the **[Bitget Agent Hub](https://github.com/Bitget-AI/agent-hub)** ecosystem · Trading Stack · Surface.<br/>
|
|
123
|
+
Foundation: [agent-sdk](https://github.com/Bitget-AI/agent-sdk) · Other surfaces: [agent-cli](https://github.com/Bitget-AI/agent-cli) · [agent-mcp](https://github.com/Bitget-AI/agent-mcp) · Market signals: [bitget-signal](https://github.com/Bitget-AI/bitget-signal)</sub>
|
package/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.2.0
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bitget-ai/bitget-agent-skill",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"packageManager": "pnpm@8.14.1",
|
|
5
|
+
"description": "Official Bitget AI skill — teaches Claude Code, Codex, and OpenClaw how to drive the Bitget API via the bgc CLI for natural-language trading. Run `npx bitget-agent-skill` to deploy into your AI tool's skill directory.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"bin": {
|
|
9
|
+
"bitget-agent-skill": "scripts/install.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"skills",
|
|
13
|
+
"references",
|
|
14
|
+
"scripts",
|
|
15
|
+
"CHANGELOG.md",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"VERSION"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"gen-references": "node scripts/gen-references.js",
|
|
22
|
+
"install-skill": "node scripts/install.js",
|
|
23
|
+
"prepublishOnly": "node scripts/gen-references.js"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=20.0.0"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"bitget",
|
|
30
|
+
"bitget-skill",
|
|
31
|
+
"skill",
|
|
32
|
+
"claude-code",
|
|
33
|
+
"codex",
|
|
34
|
+
"openclaw",
|
|
35
|
+
"trading",
|
|
36
|
+
"crypto",
|
|
37
|
+
"ai-agent",
|
|
38
|
+
"natural-language"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public",
|
|
42
|
+
"registry": "https://registry.npmjs.org/"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@bitget-ai/bitget-agent-sdk": "^1.2.0"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Bitget API Authentication Setup
|
|
2
|
+
|
|
3
|
+
## Environment Variables (recommended)
|
|
4
|
+
|
|
5
|
+
Set these before running bgc:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
export BITGET_API_KEY="your-api-key"
|
|
9
|
+
export BITGET_SECRET_KEY="your-secret-key"
|
|
10
|
+
export BITGET_PASSPHRASE="your-passphrase"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Get API Credentials
|
|
14
|
+
|
|
15
|
+
1. Log in to https://www.bitget.com
|
|
16
|
+
2. Go to Settings → API Management
|
|
17
|
+
3. Create a new API key with the permissions you need:
|
|
18
|
+
- Read Only: for market data and account queries
|
|
19
|
+
- Trade: for placing/cancelling orders
|
|
20
|
+
|
|
21
|
+
## Read-Only Mode
|
|
22
|
+
|
|
23
|
+
To prevent any write operations:
|
|
24
|
+
```bash
|
|
25
|
+
bgc --read-only spot spot_get_ticker --symbol BTCUSDT
|
|
26
|
+
```
|