Skip to content

Add cloudflare-billing skill (Cloudflare REST API, no MCP)#53

Open
dalexeenko wants to merge 2 commits into
cloudflare:mainfrom
dalexeenko:add-billing-skill
Open

Add cloudflare-billing skill (Cloudflare REST API, no MCP)#53
dalexeenko wants to merge 2 commits into
cloudflare:mainfrom
dalexeenko:add-billing-skill

Conversation

@dalexeenko

@dalexeenko dalexeenko commented May 18, 2026

Copy link
Copy Markdown

Summary

Adds skills/cloudflare-billing/ — a structured investigation playbook that helps a confused Cloudflare customer make sense of their bill: outstanding balances, why they're on FREE/PRO/BUSINESS, possible double charges, pending authorizations, which zones/products drive cost.

The skill calls the Cloudflare REST API directly via curl with a scoped Account → Billing → Read token — no MCP server, no third-party dependencies. Same pattern as cloudflare-email-service.

What's included

  • SKILL.md — Trigger description, prerequisites (one scoped Cloudflare token), the four REST endpoints used (with example curl invocations), a two-question-max intake, a three-step investigation order (subscriptions → billing history → reconcile), a presentation template, tone guidance, and edge cases (multi-account, deprecated history endpoint, missing per-product usage breakdown).

Endpoints used (all read-only GET)

Endpoint Purpose
GET /accounts/{account_id}/subscriptions Primary — full plan picture per account
GET /user/subscriptions Fallback when user doesn't know their account ID
GET /user/billing/history?per_page=50 Charges, refunds, prorations, statuses
GET /zones/{zone_id}/subscription Drill into one specific domain

Changes from the original PR

  • Dropped the dependency on mcp-billing-server per review feedback — the skill no longer requires a non-Cloudflare MCP server.
  • Dropped the Stripe tools (also non-Cloudflare).
  • Removed tools.json (was the MCP server's tool schema; no longer applicable).
  • Renamed the folder from billingcloudflare-billing to match the cloudflare-<product> naming used by cloudflare-email-service.

Notes

  • No changes to .mcp.json, marketplace.json, or the top-level README.md — the skill is self-contained and uses only the public Cloudflare API.
  • The investigation playbook (intake → subscriptions → history → reconcile → plain-language summary) is unchanged from the original PR.

Test plan

  • SKILL.md frontmatter name matches the folder (cloudflare-billing)
  • Skill loads in Claude Code via the plugin marketplace install
  • Auto-load trigger fires on "why was I charged" / "what plan am I on" style questions
  • Investigation playbook runs end-to-end against a real account (token with Account → Billing → Read)
  • Each documented curl example returns valid JSON against the live API

🤖 Generated with Claude Code

dalexeenko and others added 2 commits May 18, 2026 12:10
Adds skills/billing/ with a structured investigation playbook for
helping confused customers debug Cloudflare and Stripe billing.
Backed by the open-source, read-only mcp-billing-server MCP
(https://github.com/dalexeenko/mcp-billing-server).

Includes tools.json with the full JSON Schema for every tool the
MCP exposes, so code-mode hosts can generate TypeScript types
without first connecting to the server.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Address review feedback that a Cloudflare-hosted skill shouldn't require
a non-Cloudflare MCP server. The skill now calls the public Cloudflare
billing endpoints (account/user subscriptions, billing history, zone
subscription) directly via curl with a scoped `Account → Billing → Read`
token — same pattern as cloudflare-email-service.

- Rename `skills/billing` → `skills/cloudflare-billing` to match the
  `cloudflare-<product>` convention used elsewhere in the repo.
- Drop the Stripe portion entirely — it was also a non-Cloudflare
  dependency and the skill's purpose is Cloudflare-bill debugging.
- Remove `tools.json` (was the MCP server's tool schema; no longer
  applicable).
- Rewrite SKILL.md to document the four REST endpoints with example
  curl invocations and drop all references to mcp-billing-server.

Investigation playbook (intake → subscriptions → history → reconcile
→ plain-language summary) is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dalexeenko dalexeenko changed the title Add billing skill (Cloudflare + Stripe via mcp-billing-server) Add cloudflare-billing skill (Cloudflare REST API, no MCP) May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants