subscription-audit
npx skills add https://github.com/andy160675/sovereign-skills-season1 --skill subscription-audit
Agent 安装分布
Skill 文档
Subscription Audit
Search Gmail and Slack via MCP to discover, extract, and report on all IT/AI/SaaS subscription fees.
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
Step 1: Search Gmail
Use gmail_search_messages via MCP. Run queries from references/search-queries.md, starting with Tier 1 (highest yield). Set max_results to 50â100 per query.
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:
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.
Step 2: Search Slack
Use slack_search_public_and_private via MCP:
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.
Step 3: Read Thread Details
For threads identified as IT/AI subscriptions, read full content to extract amounts:
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
Step 4: Consolidate
Optionally run the consolidation script on saved MCP result files:
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 |
Step 5: Generate Report
Use templates/report_template.md as the structural guide. The report must include:
- 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.
IT/AI Service Categories
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 |