Install any skill in seconds. Free to start, no credit card required.
Get Started Free →基于Hyperliquid成功实现经验,为新交易所供应商提供Yuan框架集成指南。使用此技能当需要为新的交易所创建供应商实现,包括项目结构设计、API集成、核心服务实现和最佳实践。适用于交易所API集成、金融系统开发、微服务架构设计。
.claude/skills/microck-vendor-implementation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 93% | 0% |
为新的交易所供应商提供完整的 Yuan 框架集成指南,基于 Hyperliquid、Aster、OKX 等成功实现经验。
使用此技能当需要:
上下文窗口是公共资源。技能与系统提示、对话历史、其他技能的元数据和用户请求共享上下文。
默认假设:Claude 已经很智能。只添加 Claude 不具备的上下文。对每条信息进行挑战:"Claude 真的需要这个解释吗?","这个段落是否值得其令牌成本?"
优先使用简洁示例而非冗长解释。
将特异性级别与任务的脆弱性和可变性匹配:
高自由度(文本指令):当多种方法都有效、决策依赖上下文,或启发式指导方法时使用。
中等自由度(伪代码或带参数的脚本):当存在首选模式、某些变化可接受,或配置影响行为时使用。
低自由度(特定脚本,少数参数):当操作易错、一致性至关重要,或必须遵循特定序列时使用。
apps/vendor-{exchange}/src/
├── api/ # API层
│ ├── client.ts # HTTP客户端设置
│ ├── public-api.ts # 公共API端点
│ ├── private-api.ts # 私有API端点
│ └── types.ts # TypeScript类型定义
├── services/ # 服务层
│ ├── accounts/ # 账户服务
│ │ └── perp.ts # 永续账户信息
│ ├── orders/ # 订单管理
│ │ ├── submitOrder.ts # 订单提交
│ │ ├── cancelOrder.ts # 订单取消
│ │ ├── modifyOrder.ts # 订单修改
│ │ └── listOrders.ts # 订单列表
│ ├── markets/ # 市场数据
│ │ ├── quote.ts # 实时报价
│ │ ├── product.ts # 产品信息
│ │ ├── ohlc.ts # K线数据
│ │ └── interest-rate.ts # 利率数据
│ ├── account-actions-with-credential.ts # 账户RPC
│ ├── order-actions-with-credential.ts # 订单RPC
│ └── fill-history.ts # 成交记录(如果支持)
├── utils.ts # 工具函数
├── sign.ts # 请求签名
├── index.ts # 主入口
├── cli.ts # CLI入口
├── AGENTS.md # Agent文档
├── SESSION_NOTES.md # 会话记录
└── package.json # 依赖typescriptimport { createCache } from '@yuants/cache'; const CACHE_TTL = 60_000; const metaCache = createCache<Map<string, AssetInfo>>( async () => { console.info(`[${formatTime(Date.now())}] 刷新交易所元数据缓存`); const data = await fetchExchangeMetadata(); return processData(data); }, { expire: CACHE_TTL }, ); export const getAssetInfo = async (symbol: string) => { const cache = await metaCache.query('meta'); return cache.get(symbol); };
typescriptexport const submitOrder = async (credential: ICredential, order: IOrder) => { console.info(`[${formatTime(Date.now())}] 提交订单: ${order.product_id}`); try { const payload = buildOrderPayload(order); const result = await placeOrder(credential, payload); if (!result.status || result.status !== 'ok') { throw new Error(`订单提交失败: ${result.error}`); } const orderId = extractOrderId(result); console.info(`[${formatTime(Date.now())] 订单提交成功: ${orderId}`); return { order_id: `${orderId}` }; } catch (error) { const errorMessage = error instanceof Error ? error.message : '未知错误'; console.error(`[${formatTime(Date.now())}] 订单提交失败: ${errorMessage}`); throw new Error(`订单提交失败: ${errorMessage}`); } };
typescriptimport { provideOrderActionsWithCredential } from '@yuants/data-order'; provideOrderActionsWithCredential<ICredential>( Terminal.fromNodeEnv(), 'EXCHANGE', { type: 'object', required: ['private_key', 'address'], properties: { private_key: { type: 'string' }, address: { type: 'string' }, }, }, { submitOrder, cancelOrder, modifyOrder, listOrders, }, );
createCache高效缓存createCache vs 手动管理优先使用交易所的原生 API 而非模拟方案:
typescriptconsole.info(`[${formatTime(Date.now())] 操作成功`); console.error(`[${formatTime(Date.now())] 操作失败: ${error.message}`);
typescriptinterface IExchangeResponse { status: string; data?: any; error?: string; } function validateResponse<T>(response: IExchangeResponse): T { if (response.status !== 'ok') { throw new Error(response.error || 'API调用失败'); } return response.data as T; }
SESSION_NOTES.md 记录每次重要变更,包括:
成功的供应商实现应该:
_基于 Hyperliquid、Aster、OKX 供应商实现经验生成_
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-15 | pass→pass | 14,849 | 7,228 | -51% | 1 | 1 | 0% | 2,843 | 3,507 | +23% | 0 | 0 | — |
case-06 | fail→pass | 16,468 | 11,978 | -27% | 1 | 1 | 0% | 2,648 | 4,200 | +59% | 0 | 0 | — |
case-07 | fail→pass | 14,656 | 7,971 | -46% | 1 | 1 | 0% | 2,830 | 3,636 | +28% | 0 | 0 | — |
case-08 | fail→pass | 11,253 | 2,804 | -75% | 1 | 1 | 0% | 1,879 | 2,570 | +37% | 0 | 0 | — |
case-14 | pass→pass | 6,239 | 2,813 | -55% | 1 | 1 | 0% | 1,010 | 2,593 | +157% | 0 | 0 | — |
case-01 | fail→pass | 17,892 | 11,279 | -37% | 1 | 1 | 0% | 3,221 | 4,376 | +36% | 0 | 0 | — |
case-02 | fail→pass | 13,130 | 12,530 | -5% | 1 | 1 | 0% | 2,492 | 4,806 | +93% | 0 | 0 | — |
case-03 | fail→pass | 20,302 | 15,272 | -25% | 1 | 1 | 0% | 3,190 | 4,867 | +53% | 0 | 0 | — |
case-04 | pass→pass | 16,160 | 10,365 | -36% | 1 | 1 | 0% | 2,830 | 4,096 | +45% | 0 | 0 | — |
case-05 | fail→pass | 16,664 | 4,796 | -71% | 1 | 1 | 0% | 3,001 | 3,008 | +0% | 0 | 0 | — |
case-09 | fail→pass | 10,721 | 3,929 | -63% | 1 | 1 | 0% | 1,924 | 2,841 | +48% | 0 | 0 | — |
case-10 | fail→pass | 11,062 | 4,289 | -61% | 1 | 1 | 0% | 1,990 | 2,930 | +47% | 0 | 0 | — |
case-11 | fail→pass | 10,102 | 2,773 | -73% | 1 | 1 | 0% | 1,425 | 2,662 | +87% | 0 | 0 | — |
case-12 | fail→pass | 4,751 | 2,909 | -39% | 1 | 1 | 0% | 842 | 2,604 | +209% | 0 | 0 | — |
case-13 | pass→pass | 16,531 | 7,348 | -56% | 1 | 1 | 0% | 3,308 | 3,590 | +9% | 0 | 0 | — |
case-16 | fail→pass | 13,261 | 4,183 | -68% | 1 | 1 | 0% | 2,056 | 2,915 | +42% | 0 | 0 | — |
case-17 | pass→pass | 4,364 | 2,664 | -39% | 1 | 1 | 0% | 631 | 2,572 | +308% | 0 | 0 | — |
case-18 | fail→pass | 14,625 | 2,770 | -81% | 1 | 1 | 0% | 2,143 | 2,596 | +21% | 0 | 0 | — |
case-19 | fail→pass | 19,118 | 5,614 | -71% | 1 | 1 | 0% | 1,818 | 3,201 | +76% | 0 | 0 | — |
case-20 | pass→pass | 24,171 | 19,381 | -20% | 1 | 1 | 0% | 4,936 | 6,294 | +28% | 0 | 0 | — |
case-21 | pass→pass | 10,696 | 8,470 | -21% | 1 | 1 | 0% | 2,205 | 3,936 | +79% | 0 | 0 | — |
case-22 | pass→pass | 10,088 | 5,535 | -45% | 1 | 1 | 0% | 2,015 | 3,229 | +60% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +64 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.