首页龙虾技能列表 › SubsTracker — 订阅追踪器

SubsTracker — 订阅追踪器

v1.1.0

订阅追踪器工具。

0· 244·0 当前·0 累计
by @ianchenx·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/8
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill's code matches its stated purpose (a CLI wrapper for a SubsTracker REST API) but metadata and runtime instructions are inconsistent and it will read/write local secrets and auto-login against an arbitrary SUBSTRACKER_URL; review before installing or granting it access to credentials.
评估建议
This skill appears to be a legitimate CLI wrapper for a SubsTracker REST API, but exercise caution before enabling it: - The skill requires SUBSTRACKER_URL, SUBSTRACKER_USER, and SUBSTRACKER_PASS at runtime, but the registry metadata doesn’t declare those — confirm you are comfortable providing those credentials and that the registry omission is acceptable. - It will read .env files from the current working directory and from your home directory and will write a cookie file to ~/.substracker-sk...
详细分析 ▾
用途与能力
The scripts implement a CLI client for a SubsTracker REST API (login, subscription CRUD, payments, config, notifications, dashboard). That capability aligns with the skill name and description. However the registry metadata lists no required environment variables or primary credential while the skill actually requires SUBSTRACKER_URL, SUBSTRACKER_USER, and SUBSTRACKER_PASS — a clear metadata omission (incoherence between declared requirements and actual needs).
指令范围
Runtime instructions and code auto-load credentials from environment or .substracker-skills/.env (cwd or home), perform automatic login, and write a cookie to ~/.substracker-skills/cookie. The SKILL.md also instructs the platform to invoke this skill whenever the user mentions subscriptions (very broad trigger). The code will send credentials to whatever SUBSTRACKER_URL is configured and can POST config updates including admin passwords, webhook URLs, and notification tokens. Reading/writing dotfiles and auto-logging in are expected for a CLI client but these actions access sensitive data and are broader than what the registry metadata advertises.
安装机制
No install spec is provided (instruction-only). The code is included in the skill bundle and expects to be run with bun (or npx -y bun). There is no external download or archive extraction in the manifest, so installation risk is low from an installer perspective.
凭证需求
The code requires SUBSTRACKER_URL, SUBSTRACKER_USER, and SUBSTRACKER_PASS to operate and will read those from system env or .env files; however the registry declares no required env vars or primary credential. The skill also accepts many configuration flags that map to secret fields (tokens, webhook URLs, email API keys, etc.). Requesting and sending these secrets is coherent with the purpose but the metadata omission and the number of secret-capable fields mean you should only provide credentials for a trusted SubsTracker instance.
持久化与权限
The skill does not request 'always: true' and does not alter other skills. It will create and write a cookie file under ~/.substracker-skills and may create ~/.substracker-skills/.env if the user follows instructions; this is expected for a CLI client but constitutes persistent local state that contains session data and should be considered sensitive.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.1.02026/3/7

Complete parameter tables for all commands; partial update support (GET-merge-PUT)

● 无害

安装命令 点击复制

官方npx clawhub@latest install substracker
镜像加速npx clawhub@latest install substracker --registry https://cn.clawhub-mirror.com

技能文档

Manage subscriptions via CLI scripts that wrap the SubsTracker REST API. The scripts handle authentication, cookie management, and retries — you just call a command and get JSON back.

Skill Structure

substracker-skills/
├── SKILL.md              ← You are here
└── scripts/
    ├── main.ts           ← CLI entry point (routing only)
    ├── client.ts         ← HTTP client, env loading, auth
    ├── types.ts          ← TypeScript interfaces (canonical schema + docs)
    ├── subscriptions.ts  ← Subscription commands
    ├── payments.ts       ← Payment commands
    ├── config.ts         ← Config commands
    ├── dashboard.ts      ← Dashboard command
    └── notifications.ts  ← Notification test command

Read scripts/types.ts for all field names, types, defaults, and descriptions (TSDoc comments).

Configuration

Scripts auto-load credentials from .env files. No manual setup in the session.

加载 priority (第一个 found wins):

  • System environment variables
  • /.substracker-skills/.env
  • ~/.substracker-skills/.env

Required variables in .env:

SUBSTRACKER_URL=https://sub.example.com
SUBSTRACKER_USER=admin
SUBSTRACKER_PASS=your_password

If variables are missing, the script exits with a clear error. Ask the user to create their .env file.

Running Commands

Resolve the runtime: use bun if installed, otherwise npx -y bun.

All commands follow the same pattern:

bun /scripts/main.ts  [subcommand] [--flags]

Scripts output JSON to stdout (for you to parse) and log to stderr (for debugging). Authentication and session cookies are handled automatically — if a session expires, the script re-logs in and retries.

Command Reference

登录

bun scripts/main.ts login

Usually not needed — all commands auto-login when no session exists. Use this to verify credentials.

Subscriptions

bun scripts/main.ts s list
bun scripts/main.ts s create --name "Netflix" --expiry-date 2026-04-07 --amount 15.99
bun scripts/main.ts s get 
bun scripts/main.ts s update  --amount 19.99
bun scripts/main.ts s delete 
bun scripts/main.ts s toggle  --active false
bun scripts/main.ts s renew  --amount 15.99 --note "March renewal"
bun scripts/main.ts s test-notify 

Subscription Flags (创建 / 更新)

FlagTypeRequiredDescription
--namestringcreate onlySubscription name
--expiry-datestringcreate onlyExpiration date (ISO format)
--amountnumber-Cost per billing cycle
--currencystring-Currency code, default CNY
--period-unitday\month\year-Billing cycle unit, default month
--period-valuenumber-Billing cycle length, default 1
--categorystring-Category label (e.g. 娱乐)
--custom-typestring-Custom type (e.g. 视频流媒体)
--modecycle\reset-Subscription mode
--start-datestring-Start date (ISO format)
--auto-renewtrue\false-Auto-renew flag, default true
--activetrue\false-Active status
--reminder-unitday\hour-Reminder unit
--reminder-valuenumber-Reminder value
--reminder-daysnumber-Reminder days before expiry
--lunartrue\false-Use lunar calendar
--notesstring-Notes / memo

切换 Flags

FlagTypeDescription
--activetrue\falseSet active or inactive

Renew Flags

FlagTypeDescription
--amountnumberPayment amount
--period-multipliernumberMultiply billing cycle
--payment-datestringPayment date
--notestringPayment note

Payments

bun scripts/main.ts p list 
bun scripts/main.ts p edit   --amount 19.99 --note "adjusted"
bun scripts/main.ts p delete  

Payment 编辑 Flags

FlagTypeDescription
--datestringPayment date
--amountnumberPayment amount
--notestringPayment note

Dashboard

bun scripts/main.ts d

Returns monthly/yearly spend, active count, upcoming renewals, expense breakdown.

配置

bun scripts/main.ts c get
bun scripts/main.ts c update --timezone Asia/Shanghai --notifiers telegram,bark

配置 Flags

FlagTypeDescription
--usernamestringAdmin username
--passwordstringAdmin password
--timezonestringTimezone (e.g. Asia/Shanghai)
--show-lunartrue\falseShow lunar calendar dates
--themestringTheme mode
--notifiersstringComma-separated: telegram,bark,email,webhook,wechatbot,gotify
--tg-bot-tokenstringTelegram bot token
--tg-chat-idstringTelegram chat ID
--bark-keystringBark device key
--bark-serverstringBark server URL
--webhook-urlstringWebhook URL
--webhook-methodstringWebhook HTTP method
--webhook-templatestringWebhook body template
--wechat-webhookstringWeChat bot webhook URL
--gotify-urlstringGotify server URL
--gotify-tokenstringGotify app token
--email-fromstringSender email
--email-tostringRecipient email
--resend-keystringResend API key
--clear-secretsstringComma-separated fields to clear
--debugtrue\falseEnable debug logs
--payment-history-limitnumberMax payment history entries

Test 通知

bun scripts/main.ts t --type telegram
FlagTypeRequiredDescription
--typestringtelegram\notifyx\webhook\wechatbot\email\bark\gotify
Other flags--Passed as config overrides (e.g. --tg-bot-tokenTG_BOT_TOKEN)

Presenting Results

When showing subscription data to the user, format JSON responses as readable tables or summaries — don't dump raw JSON. For example, a subscription list should look like a table with name, amount, cycle, next renewal date, and status.

错误 Handling

  • Missing env vars: script exits 带有 instructions 到 创建 .env
  • 401 Unauthorized: auto re-登录 和 重试 (once)
  • API errors: 响应 includes 成功: 假消息 explaining 什么 went wrong
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务