Passive Income Claw
Tools
This skill includes TypeScript scripts in {baseDir}/bin/ for all deterministic operations. Always use these via node {baseDir}/bin/<script>.ts instead of doing arithmetic, file parsing, or API calls manually.
| Script | Purpose |
|---|
| INLINECODE2 | Binance Earn API + 账户资产明细查询 (balance 命令) |
| INLINECODE4 |
Binance Cross Margin API (借贷、还款、账户状态、利率) |
|
bin/profile.ts | User profile read/write/daily-reset |
|
bin/auth-check.ts | 5-step authorization validation |
|
bin/snapshot.ts | Snapshot diff & update |
|
bin/log.ts | Execution log append & query |
Official Binance Skills (use for prices only)
| Skill | 用途 |
|---|
| Binance Spot | 行情价格查询、币种换算(不要用 Spot 查余额,它只返回总额) |
| Market Ranking |
市场热度(扫描时参考) |
|
Trading Signals | 买卖信号(扫描时参考) |
|
Token Details | Token 基本信息、价格 |
查账户资产明细 → node {baseDir}/bin/earn-api.ts balance
查价格/行情 → Binance Spot skill
不要用 Spot skill 查余额 — 它只返回 BTC 总额,没有资产明细。
All scripts output JSON to stdout. Errors go to stderr with non-zero exit code. All timestamps use UTC.
Routing
First use (~/passive-income-claw/user-profile.md does not exist):
→ Read INLINECODE11
User triggers scan ("scan", "what's available", "recommend", cron job):
→ Read {baseDir}/scan.md — full-path scan: direct earn + borrow-to-earn, all candidates scored and sorted
User triggers execution ("buy #1", "execute", "redeem"):
→ Read INLINECODE13
User asks about borrow-to-earn details ("how does borrowing work", "explain #4"):
→ Read INLINECODE14
User wants to update settings ("change my limit", "switch to auto"):
→ node {baseDir}/bin/profile.ts dump → show current → collect changes → INLINECODE16
User asks execution history ("what did you execute"):
→ node {baseDir}/bin/log.ts recent 20
→ If no entries: "No executions recorded yet."
Before all write operations: run node {baseDir}/bin/auth-check.ts first.
被动收入爪
工具
本技能包含 {baseDir}/bin/ 目录下的 TypeScript 脚本,用于所有确定性操作。请始终通过 node {baseDir}/bin/<脚本名>.ts 使用这些脚本,而非手动执行算术、文件解析或 API 调用。
| 脚本 | 用途 |
|---|
| bin/earn-api.ts | 币安理财 API + 账户资产明细查询 (balance 命令) |
| bin/margin-api.ts |
币安全仓杠杆 API (借贷、还款、账户状态、利率) |
| bin/profile.ts | 用户配置文件读写/每日重置 |
| bin/auth-check.ts | 5 步授权验证 |
| bin/snapshot.ts | 快照差异对比与更新 |
| bin/log.ts | 执行日志追加与查询 |
官方币安技能(仅用于价格查询)
| 技能 | 用途 |
|---|
| 币安现货 | 行情价格查询、币种换算(不要用现货查询余额,它只返回总额) |
| 市场排名 |
市场热度(扫描时参考) |
|
交易信号 | 买卖信号(扫描时参考) |
|
代币详情 | 代币基本信息、价格 |
查询账户资产明细 → node {baseDir}/bin/earn-api.ts balance
查询价格/行情 → 币安现货技能
不要用现货技能查询余额 — 它只返回 BTC 总额,没有资产明细。
所有脚本输出 JSON 到标准输出。错误信息输出到标准错误,并返回非零退出码。所有时间戳使用 UTC。
路由
首次使用 (~/passive-income-claw/user-profile.md 不存在):
→ 读取 {baseDir}/setup.md
用户触发扫描 (扫描, 有什么可用的, 推荐, 定时任务):
→ 读取 {baseDir}/scan.md — 全路径扫描:直接理财 + 借贷理财,所有候选方案评分并排序
用户触发执行 (买入 #1, 执行, 赎回):
→ 读取 {baseDir}/execute.md
用户询问借贷理财详情 (借贷如何运作, 解释 #4):
→ 读取 {baseDir}/path-analysis.md
用户想要更新设置 (更改我的限额, 切换为自动):
→ node {baseDir}/bin/profile.ts dump → 显示当前设置 → 收集更改 → profile.ts set
用户查询执行历史 (你执行了什么):
→ node {baseDir}/bin/log.ts recent 20
→ 如果没有记录: 暂无执行记录。
所有写入操作前: 先运行 node {baseDir}/bin/auth-check.ts。