pdf-reader-mcp: Command for OpenCode

.opencode/command/saas-billing.md

saas-billing is a command for OpenCode from SylphxAI/pdf-reader-mcp. It costs 20 tokens per session (897 once invoked), scanned A, original, MIT.

A checklist for reviewing SaaS billing and payments, including Stripe subscriptions, payment events, pricing, webhooks, and financial records.

In plain words
What is it for?
Use it to review subscription state handling, webhook processing, pricing rules, tax and invoice behavior, refunds, disputes, and entitlement decisions.
Why use it?
It helps prevent mismatches between payment-provider events and customer access, as well as errors in retries, refunds, disputes, and subscription states.

Command for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: agent in frontmatter.

This is SylphxAI/pdf-reader-mcp's own configuration. It tells OpenCode how to work on pdf-reader-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pdf-reader-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to SylphxAI/pdf-reader-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/SylphxAI/pdf-reader-mcp/main/.opencode/command/saas-billing.md
Clone the repo
git clone --depth 1 https://github.com/SylphxAI/pdf-reader-mcp

Made for: OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for saas-billing

README.md
[![agentmods](https://agentmods.dev/badge/commands/sylphxai/pdf-reader-mcp/saas-billing.svg)](https://agentmods.dev/commands/sylphxai/pdf-reader-mcp/saas-billing)
Your own site
<a href="https://agentmods.dev/commands/sylphxai/pdf-reader-mcp/saas-billing"><img src="https://agentmods.dev/badge/commands/sylphxai/pdf-reader-mcp/saas-billing.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 897 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00897
Opus 5 $0.00010 $0.00449
Sonnet 5 $0.00004 $0.00179
Haiku 4.5 $0.00002 $0.00090

Measured 2d ago against content hash 60a836f13dc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

saas-billing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.opencode/command/saas-billing.md · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Billing & Payments Review

Scope

Review all payment and billing systems: Stripe integration, webhook handling, pricing governance, subscription state machine, and financial-grade ledger (if applicable).

Specification

Billing State Machine (Hard Requirement)

  • Billing and access state machine is mandatory: define and validate the mapping Stripe state → internal subscription state → entitlements, including trial, past_due, unpaid, canceled, refund, and dispute outcomes.
  • UI must only present interpretable, non-ambiguous states derived from server-truth.
  • No dual-write (hard requirement): subscription/payment truth must be derived from Stripe-driven events; internal systems must not directly rewrite billing truth or authorize entitlements based on non-Stripe truth, except for explicitly defined admin remediation flows that are fully server-enforced and fully audited.

Stripe Integration

  • Support subscriptions and one-time payments as product needs require.
  • Tax/invoicing and refund/dispute handling must be behaviorally consistent with product UX and entitlement state.

Webhook Handling (Hard Requirement)

  • Webhooks must be idempotent, retry-safe, out-of-order safe, auditable; billing UI reflects server-truth state without ambiguity.
  • Webhook trust is mandatory (high-risk): webhook origin must be verified (signature verification and replay resistance). The Stripe event id must be used as the idempotency and audit correlation key; unverifiable events must be rejected and must trigger alerting.
  • Out-of-order behavior must be explicit: all webhook handlers must define and enforce a clear out-of-order strategy (event ordering is not guaranteed even for the same subscription), and must define final-state decision rules.

Pricing Governance (Stripe-first, not Dashboard-first)

  • Stripe is the system-of-record for products, prices, subscriptions, invoices, and disputes; internal systems must not contradict Stripe truth.
  • Pricing changes must be performed by creating new Stripe Prices and updating the "active sellable price" policy; historical prices must remain immutable for existing subscriptions unless an approved migration is executed.
  • Default pricing change policy is grandfathering: existing subscribers keep their current price; new customers use the currently active sellable price.
  • An operational-grade Pricing Admin must exist to manage creation of new Stripe Prices, activation/deactivation of sellable prices, and (optionally) controlled bulk subscription migrations; all actions must be governed by RBAC, step-up controls, and audit logs.
  • Stripe Dashboard is treated as monitoring/emergency access; non-admin Stripe changes must be detectable (drift), alertable, and remediable.

Read the full file on GitHub · 69 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 69 lines · 20 tokens per session scan A 60a836f13dc3

Subscribe to this mod's changes

saas-billing is a command published in the GitHub repository SylphxAI/pdf-reader-mcp (919 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 897 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.

Related

Other commands, from other repositories

latex-polish

Inspect a cleanly compiling LaTeX document for source pathologies and rendered visual defects by linting and viewing selected PDF pages. Use when compilation succeeds but title pages, floats, tables, figures, or layout still need publication-quality review. Not for basic compilation health; use $latex-health-check.

flonat/flonat-research · 60 tokens

latex

Compile one specified LaTeX document, resolve build errors, audit citations, and report build quality. Use when a .tex source must be built or a concrete compilation failure repaired. Not for corpus-wide build checks, visual polish after a clean build, or creating a project; use $latex-health-check, $latex-polish, or…

flonat/flonat-research · 72 tokens

bib-filter

Filter a LaTeX project's bibliography to the entries actually cited, with Overleaf-source resolution, temporary staging, validation, approval-gated canonical replacement, and compilation. Use before submission or after large revisions.

flonat/flonat-research · 41 tokens

brief-compliance-check

Check a LaTeX coursework submission against the requirements in a supplied PDF assessment brief. Use when verifying format, required sections, word limits, or deliverables before submission. Not for general prose proofreading; use $proofread.

flonat/flonat-research · 45 tokens

split-pdf

Download, split, and deeply read an academic PDF that is not available through Paperpile. Use when a long external PDF needs page-wise ingestion. For Paperpile items, use the Paperpile text-extraction route instead.

flonat/flonat-research · 44 tokens

cost-optimize

You are a cloud cost optimization expert specializing in reducing infrastructure expenses while maintaining performance and reliability. Analyze cloud spending, identify savings opportunities, and implement cost-effective architectures across AWS, Azure, and GCP.

HermeticOrmus/LibreUIUX-Claude-Code · 0 tokens