billing-automation

billing-automation is a skill for Claude Code from HermeticOrmus/LibreUIUX-Claude-Code. It costs 40 tokens per session (3,766 once invoked), scanned A, original, MIT.

A guide to automating recurring billing, invoices, subscription changes, taxes, and recovery of failed payments.

In plain words
What is it for?
Use it for SaaS subscriptions, invoice generation, dunning, prorated upgrades or downgrades, tax calculation, and usage-based billing.
Why use it?
It removes repetitive billing work and helps keep subscription states and charges consistent.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the payment-processing plugin — 4 skills shipped together

Good fit Use it for SaaS subscriptions, invoice generation, dunning, prorated upgrades or downgrades, tax calculation, and usage-based billing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hermeticormus/libreuiux-claude-code/billing-automation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HermeticOrmus/LibreUIUX-Claude-Code --skill billing-automation
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreUIUX-Claude-Code

Made for: Claude Code.

Or install payment-processing, the plugin that ships this one along with the rest of its 4 skills.

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 billing-automation

README.md
[![agentmods](https://agentmods.dev/badge/skills/hermeticormus/libreuiux-claude-code/billing-automation/github.svg)](https://agentmods.dev/skills/hermeticormus/libreuiux-claude-code/billing-automation)
Your own site
<a href="https://agentmods.dev/skills/hermeticormus/libreuiux-claude-code/billing-automation"><img src="https://agentmods.dev/badge/skills/hermeticormus/libreuiux-claude-code/billing-automation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for billing-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/hermeticormus/libreuiux-claude-code/billing-automation"><img src="https://agentmods.dev/badge/skills/hermeticormus/libreuiux-claude-code/billing-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,766 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.00040 $0.03766
Opus 5.5 $0.00016 $0.01506
Sonnet 5.5 $0.00008 $0.00753
Haiku 4.5 $0.00004 $0.00377

Measured 26d ago against content hash d8cfd13532ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

billing-automation 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 26d 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.

plugins/payment-processing/skills/billing-automation/SKILL.md · 560 lines

How it starts

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

Billing Automation

Master automated billing systems including recurring billing, invoice generation, dunning management, proration, and tax calculation.

When to Use This Skill

  • Implementing SaaS subscription billing
  • Automating invoice generation and delivery
  • Managing failed payment recovery (dunning)
  • Calculating prorated charges for plan changes
  • Handling sales tax, VAT, and GST
  • Processing usage-based billing
  • Managing billing cycles and renewals

Core Concepts

1. Billing Cycles

Common Intervals:

  • Monthly (most common for SaaS)
  • Annual (discounted long-term)
  • Quarterly
  • Weekly
  • Custom (usage-based, per-seat)

2. Subscription States

trial → active → past_due → canceled
              → paused → resumed

3. Dunning Management

Automated process to recover failed payments through:

  • Retry schedules
  • Customer notifications
  • Grace periods
  • Account restrictions

4. Proration

Adjusting charges when:

  • Upgrading/downgrading mid-cycle
  • Adding/removing seats
  • Changing billing frequency

Quick Start

from billing import BillingEngine, Subscription

# Initialize billing engine
billing = BillingEngine()

# Create subscription
subscription = billing.create_subscription(
    customer_id="cus_123",
    plan_id="plan_pro_monthly",
    billing_cycle_anchor=datetime.now(),
    trial_days=14
)

# Process billing cycle
billing.process_billing_cycle(subscription.id)

Subscription Lifecycle Management

from datetime import datetime, timedelta
from enum import Enum

class SubscriptionStatus(Enum):
    TRIAL = "trial"
    ACTIVE = "active"
    PAST_DUE = "past_due"
    CANCELED = "canceled"
    PAUSED = "paused"

class Subscription:
    def __init__(self, customer_id, plan, billing_cycle_day=None):
        self.id = generate_id()
        self.customer_id = customer_id
        self.plan = plan
        self.status = SubscriptionStatus.TRIAL
        self.current_period_start = datetime.now()
        self.current_period_end = self.current_period_start + timedelta(days=plan.trial_days or 30)
        self.billing_cycle_day = billing_cycle_day or self.current_period_start.day
        self.trial_end = datetime.now() + timedelta(days=plan.trial_days) if plan.trial_days else None

    def start_trial(self, trial_days):
        """Start trial period."""
        self.status = SubscriptionStatus.TRIAL
        self.trial_end = datetime.now() + timedelta(days=trial_days)
        self.current_period_end = self.trial_end

    def activate(self):
        """Activate subscription after trial or immediately."""
        self.status = SubscriptionStatus.ACTIVE
        self.current_period_start = datetime.now()
        self.current_period_end = self.calculate_next_billing_date()

    def mark_past_due(self):
        """Mark subscription as past due after failed payment."""
        self.status = SubscriptionStatus.PAST_DUE
        # Trigger dunning workflow

    def cancel(self, at_period_end=True):
        """Cancel subscription."""
        if at_period_end:
            self.cancel_at_period_end = True
            # Will cancel when current period ends
        else:
            self.status = SubscriptionStatus.CANCELED
            self.canceled_at = datetime.now()

    def calculate_next_billing_date(self):
        """Calculate next billing date based on interval."""
        if self.plan.interval == 'month':
            return self.current_period_start + timedelta(days=30)
        elif self.plan.interval == 'year':
            return self.current_period_start + timedelta(days=365)
        elif self.plan.interval == 'week':
            return self.current_period_start + timedelta(days=7)

Read the full file on GitHub · 560 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. 26d ago First seen · 560 lines · 40 tokens per session scan A d8cfd13532ef

Subscribe to this mod's changes

billing-automation is a skill published in the GitHub repository HermeticOrmus/LibreUIUX-Claude-Code (115 stars, last pushed 11d ago), licensed MIT. It adds 40 tokens to every session and 3,766 once invoked, about $0.0002 per session on Opus 5.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-20.

Related

Other skills, from other repositories

stripe-link-cli

Agent payments via Stripe Link — cards, SPT, approvals.

NousResearch/hermes-agent · 17 tokens

stripe

Manage a merchant's Stripe customers, products, coupons, promotion codes, payments, invoices, and recurring subscriptions. Use for billing-plan changes, payment links, refunds of duplicate card charges, disputes and chargebacks, account balances, payouts, and reconciling processing fees through Stripe's official MCP…

asgeirtj/system_prompts_leaks · 62 tokens

ai-slop

Operational rubric that turns "don't make AI slop" into observable properties, severity levels, evidence requirements, and repair actions for interface design. Use as the reference rubric when building or reviewing marketing sites, product interfaces, dashboards, portfolios, or e-commerce pages, especially alongside…

waybarrios/opencode-power-pack · 61 tokens

amazon-returns-recovery

Suede-affiliated Amazon money-recovery audit for restocking fees, short or denied refunds, and Amazon-billed subscriptions. Use when the user mentions a restocking fee, a short or denied Amazon refund, or a forgotten Prime Video Channel, Audible, Kindle Unlimited, or Prime charge, or asks whether Amazon still owes or…

JasonColapietro/suede-creator-skills · 138 tokens

agent-payment-billing-specialist

Specialist subagent: Stripe integration, subscription billing, webhooks, PCI compliance, and tax handling specialist. Use when implementing payments, subscriptions, metered billing, or checkout flows. Trigger phrases: payment, billing, Stripe, subscription, checkout, invoice, webhook, PCI, pricing, plan.

travisjneuman/.claude · 67 tokens

software-payments

Designs production payment and billing systems. Use when implementing Stripe, Paddle, Adyen, subscriptions, tax, marketplaces, or mobile purchase flows.

vasilyu1983/AI-Agents-public · 33 tokens