billing-automation
wshobson/agents
Build automated billing systems for recurring payments, invoicing, subscriptions, and dunning management.
What is billing-automation?
Automate SaaS subscription billing including recurring charges, invoice generation, failed payment recovery, and tax handling. Use this skill when implementing subscription models, automating invoicing workflows, or managing complex billing cycles and payment retries.
- Manage subscription lifecycle states (trial, active, past_due, canceled, paused)
- Generate and deliver invoices automatically on billing cycles
- Implement dunning management with retry schedules and customer notifications
- Calculate prorated charges for mid-cycle plan changes and seat adjustments
- Handle sales tax, VAT, and GST calculations
- Process usage-based and custom billing intervals
How to install billing-automation
npx skills add https://github.com/wshobson/agents --skill billing-automationHow to use billing-automation
- 1.Initialize the BillingEngine with your payment processor configuration
- 2.Create subscriptions with customer ID, plan ID, billing cycle anchor, and trial period settings
- 3.Call process_billing_cycle() to generate invoices and charge customers on schedule
- 4.Monitor subscription state transitions and implement dunning workflows for failed payments
- 5.Calculate prorations when customers change plans or seat counts mid-cycle
- 6.Refer to references/details.md for advanced patterns and worked examples
Use cases
- Implementing SaaS subscription billing with monthly or annual plans
- Automating invoice generation and delivery to customers
- Recovering failed payments through dunning workflows with retry logic
- Adjusting charges when customers upgrade, downgrade, or change seat counts mid-cycle
- Processing usage-based billing and custom billing frequencies
- SaaS product developers
- Billing and finance engineers
- Subscription platform builders
- Payment operations teams
- Backend developers implementing recurring revenue models
billing-automation FAQ
The skill manages trial, active, past_due, canceled, and paused states. Subscriptions flow from trial to active, can transition to past_due on failed payment, and can be canceled or paused as needed.
Dunning automates failed payment recovery through configurable retry schedules, customer notifications, grace periods, and account restrictions to encourage payment.
Yes, the skill calculates prorated charges when customers upgrade, downgrade, add/remove seats, or change billing frequency mid-cycle.
Common intervals include monthly, annual, quarterly, and weekly. Custom intervals for usage-based and per-seat billing are also supported.
Yes, the skill includes support for sales tax, VAT, and GST calculations for different regions.
Full instructions (SKILL.md)
Source of truth, from wshobson/agents.
name: billing-automation description: Build automated billing systems for recurring payments, invoicing, subscription lifecycle, and dunning management. Use when implementing subscription billing, automating invoicing, or managing recurring payment systems.
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)
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Related skills
More from wshobson/agents and the wider catalog.

binary-analysis-patterns
Master disassembly, decompilation, control flow analysis, and code pattern recognition for binary analysis.

block-no-verify-hook
Prevent AI agents from bypassing git pre-commit hooks with --no-verify flags.

brand-landingpage
Brand-first landing page designer with guided interviews and Stitch-powered iteration.

changelog-automation
Automate changelog generation from commits and releases using Keep a Changelog and Conventional Commits.

checkpoint-promotion
Gate fine-tuned checkpoints against drift budgets, paired comparison, and forgetting before shipping.

code-review-excellence
Master constructive code review practices to catch bugs, share knowledge, and improve team collaboration.