clodds 1.2.8 → 1.3.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.
Files changed (232) hide show
  1. package/dist/skills/bundled/acp/SKILL.md +188 -0
  2. package/dist/skills/bundled/acp/index.d.ts +0 -3
  3. package/dist/skills/bundled/acp/index.js +1 -1
  4. package/dist/skills/bundled/acp/index.js.map +1 -1
  5. package/dist/skills/bundled/agentbets/SKILL.md +19 -0
  6. package/dist/skills/bundled/ai-strategy/SKILL.md +111 -0
  7. package/dist/skills/bundled/ai-strategy/index.js +1 -1
  8. package/dist/skills/bundled/ai-strategy/index.js.map +1 -1
  9. package/dist/skills/bundled/alerts/SKILL.md +87 -0
  10. package/dist/skills/bundled/analytics/SKILL.md +252 -0
  11. package/dist/skills/bundled/analytics/index.js +2 -2
  12. package/dist/skills/bundled/analytics/index.js.map +1 -1
  13. package/dist/skills/bundled/arbitrage/SKILL.md +287 -0
  14. package/dist/skills/bundled/auto-reply/SKILL.md +285 -0
  15. package/dist/skills/bundled/auto-reply/index.js +2 -2
  16. package/dist/skills/bundled/auto-reply/index.js.map +1 -1
  17. package/dist/skills/bundled/automation/SKILL.md +242 -0
  18. package/dist/skills/bundled/automation/index.js +2 -2
  19. package/dist/skills/bundled/automation/index.js.map +1 -1
  20. package/dist/skills/bundled/backtest/SKILL.md +225 -0
  21. package/dist/skills/bundled/bags/SKILL.md +131 -0
  22. package/dist/skills/bundled/bankr/SKILL.md +114 -0
  23. package/dist/skills/bundled/betfair/SKILL.md +113 -0
  24. package/dist/skills/bundled/binance-futures/SKILL.md +84 -0
  25. package/dist/skills/bundled/binance-futures/index.d.ts +0 -3
  26. package/dist/skills/bundled/binance-futures/index.js +1 -2
  27. package/dist/skills/bundled/binance-futures/index.js.map +1 -1
  28. package/dist/skills/bundled/botchan/SKILL.md +66 -0
  29. package/dist/skills/bundled/botchan/index.d.ts +0 -3
  30. package/dist/skills/bundled/botchan/index.js +0 -1
  31. package/dist/skills/bundled/botchan/index.js.map +1 -1
  32. package/dist/skills/bundled/bridge/SKILL.md +215 -0
  33. package/dist/skills/bundled/bybit-futures/SKILL.md +84 -0
  34. package/dist/skills/bundled/bybit-futures/index.d.ts +0 -3
  35. package/dist/skills/bundled/bybit-futures/index.js +0 -1
  36. package/dist/skills/bundled/bybit-futures/index.js.map +1 -1
  37. package/dist/skills/bundled/clanker/SKILL.md +125 -0
  38. package/dist/skills/bundled/clanker/index.d.ts +0 -3
  39. package/dist/skills/bundled/clanker/index.js +0 -1
  40. package/dist/skills/bundled/clanker/index.js.map +1 -1
  41. package/dist/skills/bundled/copy-trading/SKILL.md +285 -0
  42. package/dist/skills/bundled/copy-trading/index.js +2 -2
  43. package/dist/skills/bundled/copy-trading/index.js.map +1 -1
  44. package/dist/skills/bundled/copy-trading-solana/SKILL.md +66 -0
  45. package/dist/skills/bundled/credentials/SKILL.md +261 -0
  46. package/dist/skills/bundled/crypto-hft/SKILL.md +121 -0
  47. package/dist/skills/bundled/dca/SKILL.md +27 -0
  48. package/dist/skills/bundled/dex/SKILL.md +87 -0
  49. package/dist/skills/bundled/dex/index.d.ts +36 -0
  50. package/dist/skills/bundled/dex/index.js +537 -0
  51. package/dist/skills/bundled/dex/index.js.map +1 -0
  52. package/dist/skills/bundled/divergence/SKILL.md +83 -0
  53. package/dist/skills/bundled/doctor/SKILL.md +267 -0
  54. package/dist/skills/bundled/doctor/index.js +2 -8
  55. package/dist/skills/bundled/doctor/index.js.map +1 -1
  56. package/dist/skills/bundled/drift/SKILL.md +53 -0
  57. package/dist/skills/bundled/drift-sdk/SKILL.md +103 -0
  58. package/dist/skills/bundled/drift-sdk/index.d.ts +0 -3
  59. package/dist/skills/bundled/drift-sdk/index.js +0 -1
  60. package/dist/skills/bundled/drift-sdk/index.js.map +1 -1
  61. package/dist/skills/bundled/edge/SKILL.md +84 -0
  62. package/dist/skills/bundled/embeddings/SKILL.md +244 -0
  63. package/dist/skills/bundled/endaoment/SKILL.md +65 -0
  64. package/dist/skills/bundled/endaoment/index.d.ts +0 -3
  65. package/dist/skills/bundled/endaoment/index.js +0 -1
  66. package/dist/skills/bundled/endaoment/index.js.map +1 -1
  67. package/dist/skills/bundled/ens/SKILL.md +63 -0
  68. package/dist/skills/bundled/ens/index.d.ts +0 -3
  69. package/dist/skills/bundled/ens/index.js +0 -1
  70. package/dist/skills/bundled/ens/index.js.map +1 -1
  71. package/dist/skills/bundled/erc8004/SKILL.md +79 -0
  72. package/dist/skills/bundled/erc8004/index.d.ts +0 -3
  73. package/dist/skills/bundled/erc8004/index.js +0 -1
  74. package/dist/skills/bundled/erc8004/index.js.map +1 -1
  75. package/dist/skills/bundled/execution/SKILL.md +278 -0
  76. package/dist/skills/bundled/farcaster/SKILL.md +80 -0
  77. package/dist/skills/bundled/features/SKILL.md +20 -0
  78. package/dist/skills/bundled/feeds/SKILL.md +288 -0
  79. package/dist/skills/bundled/harden/SKILL.md +74 -0
  80. package/dist/skills/bundled/history/SKILL.md +257 -0
  81. package/dist/skills/bundled/hyperliquid/SKILL.md +200 -0
  82. package/dist/skills/bundled/hyperliquid/index.d.ts +0 -3
  83. package/dist/skills/bundled/hyperliquid/index.js +0 -1
  84. package/dist/skills/bundled/hyperliquid/index.js.map +1 -1
  85. package/dist/skills/bundled/identity/SKILL.md +228 -0
  86. package/dist/skills/bundled/identity/index.js +2 -2
  87. package/dist/skills/bundled/identity/index.js.map +1 -1
  88. package/dist/skills/bundled/integrations/SKILL.md +321 -0
  89. package/dist/skills/bundled/integrations/index.js +2 -2
  90. package/dist/skills/bundled/integrations/index.js.map +1 -1
  91. package/dist/skills/bundled/jupiter/SKILL.md +163 -0
  92. package/dist/skills/bundled/kamino/SKILL.md +69 -0
  93. package/dist/skills/bundled/ledger/SKILL.md +20 -0
  94. package/dist/skills/bundled/lighter/SKILL.md +83 -0
  95. package/dist/skills/bundled/lighter/index.d.ts +0 -3
  96. package/dist/skills/bundled/lighter/index.js +0 -1
  97. package/dist/skills/bundled/lighter/index.js.map +1 -1
  98. package/dist/skills/bundled/marginfi/SKILL.md +62 -0
  99. package/dist/skills/bundled/market-index/SKILL.md +242 -0
  100. package/dist/skills/bundled/market-index/index.js +1 -3
  101. package/dist/skills/bundled/market-index/index.js.map +1 -1
  102. package/dist/skills/bundled/markets/SKILL.md +49 -0
  103. package/dist/skills/bundled/mcp/SKILL.md +235 -0
  104. package/dist/skills/bundled/mcp/index.js +1 -3
  105. package/dist/skills/bundled/mcp/index.js.map +1 -1
  106. package/dist/skills/bundled/memory/SKILL.md +209 -0
  107. package/dist/skills/bundled/metaculus/SKILL.md +62 -0
  108. package/dist/skills/bundled/meteora/SKILL.md +28 -0
  109. package/dist/skills/bundled/meteora-dbc/SKILL.md +25 -0
  110. package/dist/skills/bundled/metrics/SKILL.md +338 -0
  111. package/dist/skills/bundled/mev/SKILL.md +239 -0
  112. package/dist/skills/bundled/mev/index.js +2 -2
  113. package/dist/skills/bundled/mev/index.js.map +1 -1
  114. package/dist/skills/bundled/mexc-futures/SKILL.md +86 -0
  115. package/dist/skills/bundled/mexc-futures/index.d.ts +0 -3
  116. package/dist/skills/bundled/mexc-futures/index.js +0 -1
  117. package/dist/skills/bundled/mexc-futures/index.js.map +1 -1
  118. package/dist/skills/bundled/mm/SKILL.md +142 -0
  119. package/dist/skills/bundled/monitoring/SKILL.md +249 -0
  120. package/dist/skills/bundled/news/SKILL.md +95 -0
  121. package/dist/skills/bundled/onchainkit/SKILL.md +83 -0
  122. package/dist/skills/bundled/opinion/SKILL.md +87 -0
  123. package/dist/skills/bundled/opportunity/SKILL.md +308 -0
  124. package/dist/skills/bundled/orca/SKILL.md +28 -0
  125. package/dist/skills/bundled/pairing/SKILL.md +275 -0
  126. package/dist/skills/bundled/pancakeswap/SKILL.md +93 -0
  127. package/dist/skills/bundled/pancakeswap/index.d.ts +0 -3
  128. package/dist/skills/bundled/pancakeswap/index.js +0 -1
  129. package/dist/skills/bundled/pancakeswap/index.js.map +1 -1
  130. package/dist/skills/bundled/percolator/SKILL.md +22 -0
  131. package/dist/skills/bundled/permissions/SKILL.md +269 -0
  132. package/dist/skills/bundled/permissions/index.js +2 -2
  133. package/dist/skills/bundled/permissions/index.js.map +1 -1
  134. package/dist/skills/bundled/plugins/SKILL.md +263 -0
  135. package/dist/skills/bundled/plugins/index.js +2 -2
  136. package/dist/skills/bundled/plugins/index.js.map +1 -1
  137. package/dist/skills/bundled/portfolio/SKILL.md +161 -0
  138. package/dist/skills/bundled/portfolio/index.js +1 -1
  139. package/dist/skills/bundled/portfolio/index.js.map +1 -1
  140. package/dist/skills/bundled/portfolio-sync/SKILL.md +466 -0
  141. package/dist/skills/bundled/positions/SKILL.md +262 -0
  142. package/dist/skills/bundled/predictfun/SKILL.md +109 -0
  143. package/dist/skills/bundled/predictfun/index.js +1 -1
  144. package/dist/skills/bundled/predictfun/index.js.map +1 -1
  145. package/dist/skills/bundled/predictit/SKILL.md +66 -0
  146. package/dist/skills/bundled/presence/SKILL.md +217 -0
  147. package/dist/skills/bundled/presence/index.js +2 -2
  148. package/dist/skills/bundled/presence/index.js.map +1 -1
  149. package/dist/skills/bundled/processes/SKILL.md +254 -0
  150. package/dist/skills/bundled/pump-swarm/SKILL.md +309 -0
  151. package/dist/skills/bundled/pumpfun/SKILL.md +145 -0
  152. package/dist/skills/bundled/pumpfun/index.d.ts +8 -1
  153. package/dist/skills/bundled/pumpfun/index.js +221 -11
  154. package/dist/skills/bundled/pumpfun/index.js.map +1 -1
  155. package/dist/skills/bundled/qmd/SKILL.md +129 -0
  156. package/dist/skills/bundled/qrcoin/SKILL.md +60 -0
  157. package/dist/skills/bundled/qrcoin/index.d.ts +0 -3
  158. package/dist/skills/bundled/qrcoin/index.js +0 -1
  159. package/dist/skills/bundled/qrcoin/index.js.map +1 -1
  160. package/dist/skills/bundled/raydium/SKILL.md +198 -0
  161. package/dist/skills/bundled/remote/SKILL.md +201 -0
  162. package/dist/skills/bundled/research/SKILL.md +83 -0
  163. package/dist/skills/bundled/research/index.js +2 -2
  164. package/dist/skills/bundled/research/index.js.map +1 -1
  165. package/dist/skills/bundled/risk/SKILL.md +323 -0
  166. package/dist/skills/bundled/router/SKILL.md +233 -0
  167. package/dist/skills/bundled/routing/SKILL.md +258 -0
  168. package/dist/skills/bundled/sandbox/SKILL.md +257 -0
  169. package/dist/skills/bundled/search-config/SKILL.md +257 -0
  170. package/dist/skills/bundled/search-config/index.js +2 -2
  171. package/dist/skills/bundled/search-config/index.js.map +1 -1
  172. package/dist/skills/bundled/sessions/SKILL.md +251 -0
  173. package/dist/skills/bundled/sessions/index.js +1 -1
  174. package/dist/skills/bundled/sessions/index.js.map +1 -1
  175. package/dist/skills/bundled/setup/SKILL.md +53 -0
  176. package/dist/skills/bundled/shield/SKILL.md +21 -0
  177. package/dist/skills/bundled/signals/SKILL.md +106 -0
  178. package/dist/skills/bundled/signals/index.d.ts +0 -3
  179. package/dist/skills/bundled/signals/index.js +3 -4
  180. package/dist/skills/bundled/signals/index.js.map +1 -1
  181. package/dist/skills/bundled/sizing/SKILL.md +238 -0
  182. package/dist/skills/bundled/slippage/SKILL.md +306 -0
  183. package/dist/skills/bundled/smarkets/SKILL.md +107 -0
  184. package/dist/skills/bundled/solend/SKILL.md +63 -0
  185. package/dist/skills/bundled/strategy/SKILL.md +266 -0
  186. package/dist/skills/bundled/streaming/SKILL.md +150 -0
  187. package/dist/skills/bundled/streaming/index.js +2 -2
  188. package/dist/skills/bundled/streaming/index.js.map +1 -1
  189. package/dist/skills/bundled/tailscale/SKILL.md +249 -0
  190. package/dist/skills/bundled/tailscale/index.js +2 -2
  191. package/dist/skills/bundled/tailscale/index.js.map +1 -1
  192. package/dist/skills/bundled/ticks/SKILL.md +61 -0
  193. package/dist/skills/bundled/token-security/SKILL.md +18 -0
  194. package/dist/skills/bundled/trading-evm/SKILL.md +329 -0
  195. package/dist/skills/bundled/trading-futures/SKILL.md +865 -0
  196. package/dist/skills/bundled/trading-kalshi/SKILL.md +629 -0
  197. package/dist/skills/bundled/trading-manifold/SKILL.md +387 -0
  198. package/dist/skills/bundled/trading-polymarket/SKILL.md +1080 -0
  199. package/dist/skills/bundled/trading-solana/SKILL.md +418 -0
  200. package/dist/skills/bundled/trading-system/SKILL.md +290 -0
  201. package/dist/skills/bundled/triggers/SKILL.md +433 -0
  202. package/dist/skills/bundled/tts/SKILL.md +220 -0
  203. package/dist/skills/bundled/tweet-ideas/SKILL.md +77 -0
  204. package/dist/skills/bundled/usage/SKILL.md +239 -0
  205. package/dist/skills/bundled/usage/index.js +2 -2
  206. package/dist/skills/bundled/usage/index.js.map +1 -1
  207. package/dist/skills/bundled/veil/SKILL.md +76 -0
  208. package/dist/skills/bundled/veil/index.d.ts +0 -3
  209. package/dist/skills/bundled/veil/index.js +0 -1
  210. package/dist/skills/bundled/veil/index.js.map +1 -1
  211. package/dist/skills/bundled/verify/SKILL.md +199 -0
  212. package/dist/skills/bundled/verify/index.d.ts +0 -3
  213. package/dist/skills/bundled/verify/index.js +0 -1
  214. package/dist/skills/bundled/verify/index.js.map +1 -1
  215. package/dist/skills/bundled/virtuals/SKILL.md +82 -0
  216. package/dist/skills/bundled/voice/SKILL.md +217 -0
  217. package/dist/skills/bundled/voice/index.js +2 -2
  218. package/dist/skills/bundled/voice/index.js.map +1 -1
  219. package/dist/skills/bundled/weather/SKILL.md +80 -0
  220. package/dist/skills/bundled/webhooks/SKILL.md +297 -0
  221. package/dist/skills/bundled/webhooks/index.js +2 -2
  222. package/dist/skills/bundled/webhooks/index.js.map +1 -1
  223. package/dist/skills/bundled/whale-tracking/SKILL.md +287 -0
  224. package/dist/skills/bundled/whale-tracking/index.js +2 -2
  225. package/dist/skills/bundled/whale-tracking/index.js.map +1 -1
  226. package/dist/skills/bundled/yoink/SKILL.md +54 -0
  227. package/dist/skills/bundled/yoink/index.d.ts +0 -3
  228. package/dist/skills/bundled/yoink/index.js +0 -1
  229. package/dist/skills/bundled/yoink/index.js.map +1 -1
  230. package/dist/skills/executor.js +5 -3
  231. package/dist/skills/executor.js.map +1 -1
  232. package/package.json +2 -2
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: harden
3
+ description: VPS security auditing and hardening
4
+ emoji: "🔒"
5
+ commands:
6
+ - /harden
7
+ ---
8
+
9
+ # VPS Hardening
10
+
11
+ Security auditing and automated hardening for remote servers.
12
+
13
+ ## Commands
14
+
15
+ ### `/harden audit <host>`
16
+ Run security audit against a server. Checks:
17
+ - System updates
18
+ - Auto-updates configuration
19
+ - SSH root login status
20
+ - Password authentication
21
+ - Firewall status
22
+ - Fail2ban status
23
+ - System uptime
24
+ - Listening services
25
+ - Sudo user configuration
26
+
27
+ ### `/harden fix <host>`
28
+ Apply safe fixes that won't lock you out:
29
+ - Install system updates
30
+ - Enable unattended-upgrades
31
+ - Configure UFW firewall
32
+ - Install and enable fail2ban
33
+ - Set SSH MaxAuthTries
34
+
35
+ ### `/harden emergency <host>`
36
+ Quick 10-minute hardening for new servers:
37
+ - Full system update
38
+ - Firewall setup
39
+ - Fail2ban installation
40
+ - Root password lock
41
+
42
+ ### `/harden report <host>`
43
+ Generate markdown security report.
44
+
45
+ ## Options
46
+
47
+ | Option | Description |
48
+ |--------|-------------|
49
+ | `--user=NAME` | SSH user (default: root) |
50
+ | `--dry-run` | Preview changes without applying |
51
+
52
+ ## Examples
53
+
54
+ ```
55
+ /harden audit 192.168.1.100
56
+ /harden fix myserver.com --user=admin
57
+ /harden emergency vps.example.com --dry-run
58
+ /harden report server.io > security-report.md
59
+ ```
60
+
61
+ ## Security Checks
62
+
63
+ | Check | Pass Criteria |
64
+ |-------|---------------|
65
+ | System Updates | 0 pending updates |
66
+ | Auto Updates | unattended-upgrades installed |
67
+ | Root Login | PermitRootLogin no |
68
+ | Password Auth | PasswordAuthentication no |
69
+ | Firewall | UFW active or iptables configured |
70
+ | Fail2ban | Service running |
71
+ | Uptime | < 90 days |
72
+ | Services | < 10 listening ports |
73
+ | Sudo Users | At least one non-root sudo user |
74
+ | MaxAuthTries | Set to 3 or less |
@@ -0,0 +1,257 @@
1
+ ---
2
+ name: history
3
+ description: "Trade history tracking, sync, and performance analytics"
4
+ emoji: "📊"
5
+ gates:
6
+ envs:
7
+ anyOf:
8
+ - POLY_API_KEY
9
+ - KALSHI_API_KEY
10
+ ---
11
+
12
+ # Trade History - Complete API Reference
13
+
14
+ Fetch, sync, and analyze trade history from Polymarket and Kalshi with detailed performance metrics.
15
+
16
+ ---
17
+
18
+ ## Chat Commands
19
+
20
+ ### Fetch & Sync
21
+
22
+ ```
23
+ /history fetch # Fetch all trades from APIs
24
+ /history fetch poly # Fetch Polymarket only
25
+ /history fetch --from 2024-01-01 # From specific date
26
+ /history sync # Sync to local database
27
+ ```
28
+
29
+ ### View History
30
+
31
+ ```
32
+ /history list # Recent trades
33
+ /history list --limit 50 # Last 50 trades
34
+ /history list --platform poly # Polymarket only
35
+ /history list --market <id> # Specific market
36
+ ```
37
+
38
+ ### Statistics
39
+
40
+ ```
41
+ /history stats # Overall statistics
42
+ /history stats --period 30d # Last 30 days
43
+ /history stats --platform kalshi # Platform-specific
44
+ ```
45
+
46
+ ### P&L Analysis
47
+
48
+ ```
49
+ /history daily-pnl # Daily P&L
50
+ /history weekly-pnl # Weekly P&L
51
+ /history monthly-pnl # Monthly P&L
52
+ /history by-market # P&L by market category
53
+ ```
54
+
55
+ ### Export
56
+
57
+ ```
58
+ /history export # Export to CSV
59
+ /history export --format json # Export as JSON
60
+ /history export --from 2024-01-01 # Date range
61
+ ```
62
+
63
+ ### Filtering
64
+
65
+ ```
66
+ /history filter --side buy # Only buys
67
+ /history filter --pnl positive # Only winners
68
+ /history filter --pnl negative # Only losers
69
+ /history filter --min-size 100 # Min $100 trades
70
+ ```
71
+
72
+ ---
73
+
74
+ ## TypeScript API Reference
75
+
76
+ ### Create History Service
77
+
78
+ ```typescript
79
+ import { createTradeHistoryService } from 'clodds/history';
80
+
81
+ const history = createTradeHistoryService({
82
+ polymarket: {
83
+ apiKey: process.env.POLY_API_KEY,
84
+ address: process.env.POLY_ADDRESS,
85
+ },
86
+ kalshi: {
87
+ apiKey: process.env.KALSHI_API_KEY,
88
+ },
89
+
90
+ // Local storage
91
+ dbPath: './trade-history.db',
92
+ });
93
+ ```
94
+
95
+ ### Fetch Trades from APIs
96
+
97
+ ```typescript
98
+ // Fetch all trades from exchange APIs
99
+ const trades = await history.fetchTrades({
100
+ platforms: ['polymarket', 'kalshi'],
101
+ from: '2024-01-01',
102
+ });
103
+
104
+ console.log(`Fetched ${trades.length} trades`);
105
+
106
+ // Fetch from specific platform
107
+ const polyTrades = await history.fetchTrades({
108
+ platforms: ['polymarket'],
109
+ limit: 100,
110
+ });
111
+ ```
112
+
113
+ ### Sync to Database
114
+
115
+ ```typescript
116
+ // Sync fetched trades to local database
117
+ await history.syncToDatabase();
118
+
119
+ console.log('Trades synced to database');
120
+ ```
121
+
122
+ ### Get Trades
123
+
124
+ ```typescript
125
+ // Get trades from local storage
126
+ const trades = await history.getTrades({
127
+ platform: 'polymarket',
128
+ from: '2024-01-01',
129
+ to: '2024-12-31',
130
+ limit: 100,
131
+ });
132
+
133
+ for (const trade of trades) {
134
+ console.log(`${trade.timestamp}: ${trade.side} ${trade.market}`);
135
+ console.log(` Size: $${trade.size}`);
136
+ console.log(` Price: ${trade.price}`);
137
+ console.log(` P&L: $${trade.pnl?.toFixed(2) || 'open'}`);
138
+ }
139
+ ```
140
+
141
+ ### Statistics
142
+
143
+ ```typescript
144
+ // Get comprehensive statistics
145
+ const stats = await history.getStats({
146
+ period: '30d',
147
+ platform: 'polymarket',
148
+ });
149
+
150
+ console.log(`=== Trading Statistics (30d) ===`);
151
+ console.log(`Total trades: ${stats.totalTrades}`);
152
+ console.log(`Winning trades: ${stats.winningTrades}`);
153
+ console.log(`Losing trades: ${stats.losingTrades}`);
154
+ console.log(`Win rate: ${(stats.winRate * 100).toFixed(1)}%`);
155
+ console.log(`\nP&L:`);
156
+ console.log(` Total: $${stats.totalPnl.toLocaleString()}`);
157
+ console.log(` Gross profit: $${stats.grossProfit.toLocaleString()}`);
158
+ console.log(` Gross loss: $${stats.grossLoss.toLocaleString()}`);
159
+ console.log(` Profit factor: ${stats.profitFactor.toFixed(2)}`);
160
+ console.log(`\nTrade sizes:`);
161
+ console.log(` Average: $${stats.avgTradeSize.toFixed(2)}`);
162
+ console.log(` Largest win: $${stats.largestWin.toFixed(2)}`);
163
+ console.log(` Largest loss: $${stats.largestLoss.toFixed(2)}`);
164
+ console.log(`\nRisk metrics:`);
165
+ console.log(` Sharpe ratio: ${stats.sharpeRatio.toFixed(2)}`);
166
+ console.log(` Max drawdown: ${(stats.maxDrawdown * 100).toFixed(1)}%`);
167
+ ```
168
+
169
+ ### Daily P&L
170
+
171
+ ```typescript
172
+ // Get daily P&L breakdown
173
+ const dailyPnl = await history.getDailyPnL({
174
+ days: 30,
175
+ platform: 'polymarket',
176
+ });
177
+
178
+ console.log('=== Daily P&L ===');
179
+ for (const day of dailyPnl) {
180
+ const sign = day.pnl >= 0 ? '+' : '';
181
+ const bar = day.pnl >= 0
182
+ ? '█'.repeat(Math.min(Math.floor(day.pnl / 10), 20))
183
+ : '▓'.repeat(Math.min(Math.floor(Math.abs(day.pnl) / 10), 20));
184
+
185
+ console.log(`${day.date} | ${sign}$${day.pnl.toFixed(2).padStart(8)} | ${bar}`);
186
+ }
187
+ ```
188
+
189
+ ### Performance by Market
190
+
191
+ ```typescript
192
+ // Get performance breakdown by market category
193
+ const byMarket = await history.getPerformanceByMarket({
194
+ period: '30d',
195
+ });
196
+
197
+ console.log('=== Performance by Market Category ===');
198
+ for (const [category, data] of Object.entries(byMarket)) {
199
+ console.log(`\n${category}:`);
200
+ console.log(` Trades: ${data.trades}`);
201
+ console.log(` Win rate: ${(data.winRate * 100).toFixed(1)}%`);
202
+ console.log(` P&L: $${data.pnl.toLocaleString()}`);
203
+ console.log(` Avg trade: $${data.avgTrade.toFixed(2)}`);
204
+ }
205
+ ```
206
+
207
+ ### Export
208
+
209
+ ```typescript
210
+ // Export to CSV
211
+ await history.exportCsv({
212
+ path: './trades.csv',
213
+ from: '2024-01-01',
214
+ to: '2024-12-31',
215
+ columns: ['timestamp', 'platform', 'market', 'side', 'size', 'price', 'pnl'],
216
+ });
217
+
218
+ // Export to JSON
219
+ const json = await history.exportJson({
220
+ from: '2024-01-01',
221
+ });
222
+ ```
223
+
224
+ ---
225
+
226
+ ## Database Schema
227
+
228
+ ```sql
229
+ CREATE TABLE trades (
230
+ id TEXT PRIMARY KEY,
231
+ platform TEXT NOT NULL,
232
+ market_id TEXT NOT NULL,
233
+ market_question TEXT,
234
+ side TEXT NOT NULL, -- 'buy' or 'sell'
235
+ outcome TEXT, -- 'YES' or 'NO'
236
+ size REAL NOT NULL,
237
+ price REAL NOT NULL,
238
+ fee REAL DEFAULT 0,
239
+ pnl REAL,
240
+ timestamp INTEGER NOT NULL,
241
+ created_at INTEGER DEFAULT (strftime('%s', 'now'))
242
+ );
243
+
244
+ CREATE INDEX idx_trades_platform ON trades(platform);
245
+ CREATE INDEX idx_trades_timestamp ON trades(timestamp);
246
+ CREATE INDEX idx_trades_market ON trades(market_id);
247
+ ```
248
+
249
+ ---
250
+
251
+ ## Best Practices
252
+
253
+ 1. **Sync regularly** - Keep local database up to date
254
+ 2. **Export backups** - Periodically export to CSV
255
+ 3. **Review weekly** - Analyze performance patterns
256
+ 4. **Track by category** - Identify strong/weak areas
257
+ 5. **Monitor drawdown** - Set alerts for max drawdown
@@ -0,0 +1,200 @@
1
+ ---
2
+ name: hyperliquid
3
+ description: Hyperliquid L1 perps DEX (69% market share)
4
+ emoji: "🔷"
5
+ commands:
6
+ - /hl
7
+ ---
8
+
9
+ # Hyperliquid
10
+
11
+ Full integration with the dominant perpetual futures DEX. 130+ perp markets, spot trading, HLP vault, TWAP orders.
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ # Set credentials
17
+ export HYPERLIQUID_WALLET="0x..."
18
+ export HYPERLIQUID_PRIVATE_KEY="0x..."
19
+
20
+ # Check balance
21
+ /hl balance
22
+
23
+ # Open a position
24
+ /hl long BTC 0.1
25
+ /hl short ETH 1 3000
26
+
27
+ # Close position
28
+ /hl close BTC
29
+ ```
30
+
31
+ ## Commands
32
+
33
+ ### Market Data
34
+
35
+ | Command | Description |
36
+ |---------|-------------|
37
+ | `/hl stats` | HLP TVL, APR, top funding rates |
38
+ | `/hl markets [query]` | List perp/spot markets |
39
+ | `/hl price <coin>` | Get current price |
40
+ | `/hl book <coin>` | Show orderbook depth |
41
+ | `/hl candles <coin> [1m\|5m\|15m\|1h\|4h\|1d]` | OHLCV candle data |
42
+ | `/hl funding [coin]` | Funding rates (current + predicted) |
43
+
44
+ ### Account
45
+
46
+ | Command | Description |
47
+ |---------|-------------|
48
+ | `/hl balance` | Positions, balances, margin |
49
+ | `/hl portfolio` | PnL breakdown (day/week/month/all) |
50
+ | `/hl orders` | List open orders |
51
+ | `/hl orders cancel <coin> [orderId]` | Cancel orders |
52
+ | `/hl orders cancelall` | Cancel all orders |
53
+ | `/hl fills [coin]` | Recent trade fills |
54
+ | `/hl history` | Order history |
55
+
56
+ ### Trading
57
+
58
+ | Command | Description |
59
+ |---------|-------------|
60
+ | `/hl long <coin> <size> [price]` | Open long position |
61
+ | `/hl short <coin> <size> [price]` | Open short position |
62
+ | `/hl close <coin>` | Close position at market |
63
+ | `/hl closeall` | Close all positions |
64
+ | `/hl leverage <coin> <1-50>` | Set leverage |
65
+ | `/hl margin <coin> <amount>` | Add/remove isolated margin |
66
+
67
+ **Examples:**
68
+ ```bash
69
+ /hl long BTC 0.1 # Market long 0.1 BTC
70
+ /hl long BTC 0.1 45000 # Limit long at $45,000
71
+ /hl short ETH 1 # Market short 1 ETH
72
+ /hl close BTC # Close BTC position
73
+ /hl leverage BTC 10 # Set 10x leverage
74
+ ```
75
+
76
+ ### TWAP Orders
77
+
78
+ Execute large orders over time to minimize slippage.
79
+
80
+ | Command | Description |
81
+ |---------|-------------|
82
+ | `/hl twap buy <coin> <size> <minutes>` | Start TWAP buy |
83
+ | `/hl twap sell <coin> <size> <minutes>` | Start TWAP sell |
84
+ | `/hl twap cancel <coin> <twapId>` | Cancel TWAP |
85
+ | `/hl twap status` | Show active TWAP fills |
86
+
87
+ **Example:**
88
+ ```bash
89
+ /hl twap buy BTC 1 60 # Buy 1 BTC over 60 minutes
90
+ /hl twap sell ETH 10 30 # Sell 10 ETH over 30 minutes
91
+ ```
92
+
93
+ ### Spot Trading
94
+
95
+ | Command | Description |
96
+ |---------|-------------|
97
+ | `/hl spot markets` | List spot markets |
98
+ | `/hl spot book <coin>` | Spot orderbook |
99
+ | `/hl spot buy <coin> <amount> [price]` | Buy spot |
100
+ | `/hl spot sell <coin> <amount> [price]` | Sell spot |
101
+
102
+ ### HLP Vault
103
+
104
+ Earn yield by providing liquidity to the HLP vault.
105
+
106
+ | Command | Description |
107
+ |---------|-------------|
108
+ | `/hl hlp` | Show vault stats (TVL, APR) |
109
+ | `/hl hlp deposit <amount>` | Deposit USDC to vault |
110
+ | `/hl hlp withdraw <amount>` | Withdraw from vault |
111
+ | `/hl vaults` | Your vault positions |
112
+
113
+ ### Transfers
114
+
115
+ | Command | Description |
116
+ |---------|-------------|
117
+ | `/hl transfer spot2perp <amount>` | Move USDC to perps |
118
+ | `/hl transfer perp2spot <amount>` | Move USDC to spot |
119
+ | `/hl transfer send <address> <amount>` | Send USDC on Hyperliquid |
120
+ | `/hl transfer withdraw <address> <amount>` | Withdraw to L1 (Arbitrum) |
121
+
122
+ ### Account Info
123
+
124
+ | Command | Description |
125
+ |---------|-------------|
126
+ | `/hl fees` | Your fee tier & rate limits |
127
+ | `/hl points` | Points balance |
128
+ | `/hl referral` | Referral info & rewards |
129
+ | `/hl claim` | Claim referral rewards |
130
+ | `/hl leaderboard [day\|week\|month\|allTime]` | Top traders |
131
+ | `/hl sub` | List subaccounts |
132
+ | `/hl sub create <name>` | Create subaccount |
133
+ | `/hl lend` | Borrow/lend rates |
134
+
135
+ ## Shortcuts
136
+
137
+ Most commands have short aliases:
138
+
139
+ | Full | Short |
140
+ |------|-------|
141
+ | `/hl balance` | `/hl b` |
142
+ | `/hl markets` | `/hl m` |
143
+ | `/hl price` | `/hl p` |
144
+ | `/hl book` | `/hl ob` |
145
+ | `/hl candles` | `/hl c` |
146
+ | `/hl funding` | `/hl f` |
147
+ | `/hl orders` | `/hl o` |
148
+ | `/hl history` | `/hl h` |
149
+ | `/hl long` | `/hl l` |
150
+ | `/hl short` | `/hl s` |
151
+ | `/hl leverage` | `/hl lev` |
152
+ | `/hl portfolio` | `/hl pf` |
153
+ | `/hl leaderboard` | `/hl lb` |
154
+ | `/hl referral` | `/hl ref` |
155
+
156
+ ## Configuration
157
+
158
+ ```bash
159
+ # Required for trading
160
+ export HYPERLIQUID_WALLET="0x..."
161
+ export HYPERLIQUID_PRIVATE_KEY="0x..."
162
+
163
+ # Optional: dry run mode (no real trades)
164
+ export DRY_RUN=true
165
+ ```
166
+
167
+ ## Features
168
+
169
+ - **130+ Perp Markets** with up to 50x leverage
170
+ - **Spot Trading** with native HYPE token
171
+ - **HLP Vault** - Earn yield providing liquidity
172
+ - **TWAP Orders** - Execute large orders over time
173
+ - **Points System** - Earn rewards for activity
174
+ - **Subaccounts** - Manage multiple strategies
175
+ - **Real-time WebSocket** - Live orderbook and fills
176
+
177
+ ### Database/History
178
+
179
+ All trades are automatically logged to SQLite for tracking.
180
+
181
+ | Command | Description |
182
+ |---------|-------------|
183
+ | `/hl trades [coin] [limit]` | Trade history from database |
184
+ | `/hl dbstats [coin] [period]` | Win rate, PnL, profit factor |
185
+ | `/hl dbfunding [coin]` | Funding payments history |
186
+ | `/hl dbpositions [all]` | Position history |
187
+
188
+ **Stats periods:** `day`, `week`, `month`
189
+
190
+ **Example:**
191
+ ```bash
192
+ /hl trades BTC 10 # Last 10 BTC trades
193
+ /hl dbstats week # This week's performance
194
+ /hl dbstats ETH month # ETH stats for the month
195
+ ```
196
+
197
+ ## Resources
198
+
199
+ - [Hyperliquid App](https://app.hyperliquid.xyz)
200
+ - [API Documentation](https://hyperliquid.gitbook.io/hyperliquid-docs)
@@ -11,9 +11,6 @@ export declare const skill: {
11
11
  description: string;
12
12
  usage: string;
13
13
  }[];
14
- requires: {
15
- env: string[];
16
- };
17
14
  handler(args: string): Promise<string>;
18
15
  };
19
16
  export default skill;
@@ -1120,7 +1120,6 @@ exports.skill = {
1120
1120
  usage: '/hl <command>',
1121
1121
  },
1122
1122
  ],
1123
- requires: { env: ['HYPERLIQUID_PRIVATE_KEY'] },
1124
1123
  async handler(args) {
1125
1124
  const parts = args.trim().split(/\s+/);
1126
1125
  const cmd = parts[0]?.toLowerCase();