subscription-audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSubscription Audit
订阅费用审计
Search Gmail and Slack via MCP to discover, extract, and report on all IT/AI/SaaS subscription fees.
通过MCP搜索Gmail和Slack,发现、提取并报告所有IT/AI/SaaS订阅费用。
Workflow
工作流程
The audit involves these steps:
- Search Gmail with tiered queries (high-yield first, then broader)
- Search Slack for subscription references
- Read thread details to extract exact amounts
- Consolidate and deduplicate results
- Generate the final audit report
审计包含以下步骤:
- 使用分层查询搜索Gmail(先执行高收益查询,再执行宽泛查询)
- 搜索Slack中的订阅相关信息
- 查看对话详情以提取准确金额
- 合并并去重结果
- 生成最终审计报告
Step 1: Search Gmail
步骤1:搜索Gmail
Use via MCP. Run queries from , starting with Tier 1 (highest yield). Set to 50–100 per query.
gmail_search_messagesreferences/search-queries.mdmax_resultsbash
manus-mcp-cli tool call gmail_search_messages --server gmail --input '{"q": "<QUERY>", "max_results": 100}'For each result file, extract thread IDs and subjects with Python:
python
import json
with open('<result_file>') as f:
data = json.load(f)
for t in data.get('result', {}).get('threads', []):
for msg in t.get('messages', []):
h = msg.get('pickedHeaders', {})
print(f"{t['id']} | {h.get('subject','')} | {h.get('from','')}")Key Tier 1 queries (always run these):
from:stripe.com receiptfrom:github.com receipt paymentfrom:googleplay-noreply@google.com subscriptionfrom:anthropic.com OR from:mail.anthropic.com receipt invoicefrom:openai.com receipt invoice billingfrom:ionos OR from:godaddy OR from:namecheap OR from:cloudflare invoice domain
For the full query list with rationale, read .
references/search-queries.md通过MCP调用工具。从中获取查询语句,优先运行Tier 1(高收益)查询。将设置为每个查询50–100条结果。
gmail_search_messagesreferences/search-queries.mdmax_resultsbash
manus-mcp-cli tool call gmail_search_messages --server gmail --input '{"q": "<QUERY>", "max_results": 100}'对于每个结果文件,使用Python提取对话ID和主题:
python
import json
with open('<result_file>') as f:
data = json.load(f)
for t in data.get('result', {}).get('threads', []):
for msg in t.get('messages', []):
h = msg.get('pickedHeaders', {})
print(f"{t['id']} | {h.get('subject','')} | {h.get('from','')}")核心Tier 1查询语句(必须运行这些):
from:stripe.com receiptfrom:github.com receipt paymentfrom:googleplay-noreply@google.com subscriptionfrom:anthropic.com OR from:mail.anthropic.com receipt invoicefrom:openai.com receipt invoice billingfrom:ionos OR from:godaddy OR from:namecheap OR from:cloudflare invoice domain
如需完整查询列表及理由,请查看。
references/search-queries.mdStep 2: Search Slack
步骤2:搜索Slack
Use via MCP:
slack_search_public_and_privatebash
manus-mcp-cli tool call slack_search_public_and_private --server slack --input '{"query": "subscription invoice payment billing receipt", "limit": 20}'Run 2–3 query variants. Slack rarely contains billing data but may reference costs in discussion.
通过MCP调用工具:
slack_search_public_and_privatebash
manus-mcp-cli tool call slack_search_public_and_private --server slack --input '{"query": "subscription invoice payment billing receipt", "limit": 20}'运行2–3种不同的查询变体。Slack中很少包含账单数据,但可能在讨论中提及费用相关信息。
Step 3: Read Thread Details
步骤3:查看对话详情
For threads identified as IT/AI subscriptions, read full content to extract amounts:
bash
manus-mcp-cli tool call gmail_read_threads --server gmail --input '{"thread_ids": ["<id1>","<id2>"], "include_full_messages": true}'Batch up to 10 thread IDs per call. From the plain text content, extract:
- Amount — look for ,
£,$followed by digits€ - Plan name — e.g. "Claude Pro", "Starter", "Team Plan"
- Billing period — e.g. "Jan 18 – Feb 18, 2026"
- Payment method — e.g. "Visa ending 8149"
- VAT — typically 20% for UK-based users
对于已识别为IT/AI订阅的对话,查看完整内容以提取金额:
bash
manus-mcp-cli tool call gmail_read_threads --server gmail --input '{"thread_ids": ["<id1>","<id2>"], "include_full_messages": true}'每次调用最多批量处理10个对话ID。从纯文本内容中提取:
- 金额 — 查找带有、
£、$符号的数字€ - 套餐名称 — 例如“Claude Pro”、“Starter”、“Team Plan”
- 计费周期 — 例如“2026年1月18日 – 2月18日”
- 支付方式 — 例如“尾号8149的Visa卡”
- 增值税(VAT) — 英国用户通常为20%
Step 4: Consolidate
步骤4:合并结果
Optionally run the consolidation script on saved MCP result files:
bash
python3 /home/ubuntu/skills/subscription-audit/scripts/consolidate_results.py <output_dir> <json1> [json2 ...]Group results by service provider. Deduplicate by thread ID. For each service, record:
| Field | Source |
|---|---|
| Service name | Sender name or subject line |
| Category | AI Assistant, Developer Tools, Cloud/Hosting, AI Voice, etc. |
| Current plan | From receipt body |
| Monthly cost | From receipt body (convert USD→GBP if needed) |
| Payment method | From receipt body |
| Billing cycle | Monthly or Annual |
| First seen / last seen | Earliest and latest receipt dates |
可选择在已保存的MCP结果文件上运行合并脚本:
bash
python3 /home/ubuntu/skills/subscription-audit/scripts/consolidate_results.py <output_dir> <json1> [json2 ...]按服务提供商对结果进行分组,通过对话ID去重。为每个服务记录以下信息:
| 字段 | 来源 |
|---|---|
| 服务名称 | 发件人名称或主题行 |
| 分类 | AI助手、开发工具、云/托管等 |
| 当前套餐 | 来自收据正文 |
| 月度费用 | 来自收据正文(如需可将美元转换为英镑) |
| 支付方式 | 来自收据正文 |
| 计费周期 | 月度或年度 |
| 首次/末次出现时间 | 最早和最晚的收据日期 |
Step 5: Generate Report
步骤5:生成报告
Use as the structural guide. The report must include:
templates/report_template.md- Executive Summary — service count, total monthly/annual cost, summary table
- Detailed Analysis — one section per service with billing history
- Conclusion — recommendations on cost optimisation
Look up the current USD→GBP exchange rate when converting amounts. Deliver the report as a Markdown file with the raw JSON data as a secondary attachment.
以为结构指南。报告必须包含以下部分:
templates/report_template.md- 执行摘要 — 服务数量、月度/年度总费用、摘要表格
- 详细分析 — 每个服务单独成节,包含账单历史
- 结论 — 成本优化建议
转换金额时,请查询当前美元兑英镑汇率。报告以Markdown文件形式交付,原始JSON数据作为次要附件。
IT/AI Service Categories
IT/AI服务分类
When classifying subscriptions, use these categories:
| Category | Examples |
|---|---|
| AI Assistant | Anthropic Claude, OpenAI ChatGPT, Perplexity |
| AI Developer Tools | GitHub Copilot, Cursor, Replit |
| AI Voice / Media | ElevenLabs, Midjourney, Runway |
| Developer Tools | GitHub Plans, JetBrains, VS Code |
| Cloud / Hosting | AWS, Azure, Hetzner, DigitalOcean, Vercel |
| Web Hosting / Domain | IONOS, GoDaddy, Namecheap, Cloudflare |
| AI / Cloud Storage | Google AI Pro, iCloud+ |
| Productivity | Notion, Figma, Slack Pro |
| Security / Network | Tailscale, VPN services |
对订阅服务进行分类时,请使用以下类别:
| 分类 | 示例 |
|---|---|
| AI助手 | Anthropic Claude、OpenAI ChatGPT、Perplexity |
| AI开发工具 | GitHub Copilot、Cursor、Replit |
| AI语音/媒体 | ElevenLabs、Midjourney、Runway |
| 开发工具 | GitHub套餐、JetBrains、VS Code |
| 云/托管 | AWS、Azure、Hetzner、DigitalOcean、Vercel |
| 网站托管/域名 | IONOS、GoDaddy、Namecheap、Cloudflare |
| AI/云存储 | Google AI Pro、iCloud+ |
| 生产力工具 | Notion、Figma、Slack Pro |
| 安全/网络 | Tailscale、VPN服务 |