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 2mo 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 2mo 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. 2mo 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 1mo 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

billing-automation compared with skills from other repositories

billing-automation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
billing-automationHermeticOrmus/LibreUIUX-Claude-CodeSkill1151mo agoMITA40Claude Code
stripe-link-cliNousResearch/hermes-agentSkill267ktodayMITA17Claude Code, Codex
stripeasgeirtj/system_prompts_leaksSkill74kyesterdayCC0-1.0A62Claude Code, Codex
ai-slopwaybarrios/opencode-power-packSkill5627d agoMITA61Claude Code
agent-payment-billing-specialisttravisjneuman/.claudeSkill115yesterdayMITA67Claude Code
agent-monetization-experttravisjneuman/.claudeSkill115yesterdayMITA24Claude Code
software-paymentsvasilyu1983/AI-Agents-publicSkill1011mo agoMITA33Claude Code, Codex