substracker

Manage SubsTracker subscriptions and configuration via CLI scripts. Handles login, subscription CRUD, config updates, notifications, and dashboard queries. Use this skill whenever the user mentions subscriptions, recurring payments, subscription tracking, renewal reminders, payment history, notification configuration (Telegram, Bark, email, webhook, Gotify), or anything related to their SubsTracker instance — even if they just say "add a subscription", "what am I paying for", "check my renewals", "how much do I spend monthly", "update my Telegram config", "加个订阅", "我订阅了什么", "有哪些快到期了", "每月花多少钱", "续费", "订阅提醒", "通知设置", "看下订阅", "账单" without explicitly mentioning SubsTracker.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "substracker" with this command: npx skills add ianchenx/substracker

SubsTracker API Skill

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.

Load priority (first found wins):

  1. System environment variables
  2. <cwd>/.substracker-skills/.env
  3. ~/.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 <SKILL_DIR>/scripts/main.ts <command> [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

Login

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 <id>
bun scripts/main.ts s update <id> --amount 19.99
bun scripts/main.ts s delete <id>
bun scripts/main.ts s toggle <id> --active false
bun scripts/main.ts s renew <id> --amount 15.99 --note "March renewal"
bun scripts/main.ts s test-notify <id>

Subscription Flags (create / update)

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

Toggle 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 <sub-id>
bun scripts/main.ts p edit <sub-id> <payment-id> --amount 19.99 --note "adjusted"
bun scripts/main.ts p delete <sub-id> <payment-id>

Payment Edit Flags

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

Dashboard

bun scripts/main.ts d

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

Config

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

Config 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 Notification

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.

Error Handling

  • Missing env vars: script exits with instructions to create .env
  • 401 Unauthorized: auto re-login and retry (once)
  • API errors: response includes success: false and message explaining what went wrong

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Miaoji Asin Clinic Pro

亚马逊ASIN诊所Pro版,90天行动计划+竞品对标+季节性优化日历。 从合规度、广告度、评论度、视觉度、内容度五维升级为可执行的长期作战方案。 基础功能可使用 miaoji-asin-clinic 免费版。

Registry SourceRecently Updated
Coding

wechat-publish-pro

Pure Python tool to convert Markdown to styled HTML and publish articles to WeChat official account drafts with AI-based content refinement and theme support.

Registry SourceRecently Updated
Coding

Miaoji Asin Clinic

基于ASIN和品类,快速诊断亚马逊Listing五维健康指数并智能排序修复优先级,提供详细分析与个性化修复方案。

Registry SourceRecently Updated
Coding

Toonany

A Claude Code skill for creating AI-generated short dramas (漫剧) from novels and stories. Use when user mentions "漫剧创作", "小说转剧本", "分镜生成", "短剧制作", "故事线生成", "大纲...

Registry SourceRecently Updated