Agent skill

Billing Automation

by wshobson in wshobson/agents

Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.

MITAuto-check passedBackend & APIs

Install Billing Automation

skills CLI
$ npx skills add wshobson/agents --skill billing-automation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wshobson/agents billing-automation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/payment-processing/skills/billing-automation .claude/skills/billing-automation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
billing-automation
GitHub stars
40k
Used in
13 other repos
Token cost
~473 tokens
SKILL.md length
132 words
Files
2 (incl. references)
Skills in repo
142
Repo updated
First seen
Licence
MIT

At a glance

Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.

  • Works in 4 steps: Billing Cycles → Subscription States → Dunning Management → …
  • Implementing subscription billing for a SaaS product
  • SKILL.md covers When to Use This Skill, Core Concepts, Quick Start and Detailed patterns and worked…
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill lays out the building blocks of a recurring billing system: billing intervals from weekly to annual plus usage-based and per-seat options, a subscription lifecycle that moves through trial, active, past due, canceled, paused and resumed, and automated invoice generation and delivery.

Dunning is described as retry schedules, customer notifications, grace periods and account restrictions for failed payments. Proration covers mid-cycle upgrades and downgrades, seat changes and switching billing frequency, and tax handling covers sales tax, VAT and GST. A short Python quick start shows a billing engine with subscriptions, and `references/details.md` holds longer patterns and examples.

When your agent uses it

  • Implementing subscription billing for a SaaS product
  • Recovering failed payments with retries, notices and grace periods
  • Calculating prorated charges when a customer changes plans or seats
  • Automating invoice generation and delivery
  • Adding usage-based billing or sales tax, VAT and GST handling

Example prompts

  • “Design the subscription state machine for our SaaS, including trial, past due and paused states.”
  • “Implement a dunning flow with three payment retries and email notices before cancellation.”
  • “Calculate the prorated charge when a customer upgrades their plan halfway through the billing cycle.”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Billing Cycles
  2. Subscription States
  3. Dunning Management
  4. Proration

What it can do on your machine

Read from SKILL.md and the folder at commit 46891e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Billing Automation loads about 473 tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 132 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~473
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wshobson/agents at commit 46891e7, republished under its MIT licence (© wshobson). 132 words, ~473 tokens.

Download SKILL.mdSave it as .claude/skills/billing-automation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
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

python
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.

© wshobson, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in plugins/payment-processing/skills/billing-automation of wshobson/agents.

  • SKILL.md
  • references/details.md

Open the folder on GitHubat commit 46891e7

Used in 13 other repositories

We found 39 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 13 other GitHub owners. This page covers the copy in wshobson/agents, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Billing Automation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Billing Automation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Billing Automation this skillwshobson/agents40k13 repos~473Automated safety check: PassMIT
Stripe Patternsbybren-llc/safe-agentic-workflow423—~1.2kAutomated safety check: PassMIT
Nevermined PaymentsLeoYeAI/openclaw-master-skills2.2k—~4.5kAutomated safety check: NotesMIT
Billing SDKhashgraph-online/awesome-codex-plugins1.3k—~3.5kAutomated safety check: NotesApache-2.0
PDF ToolkitXiaomiMiMo/MiMo-Code14k—~1.7kAutomated safety check: PassApache-2.0
PDF Generation, Forms and Extractionpipeshub-ai/pipeshub-ai3.8k—~2.9kAutomated safety check: PassApache-2.0

Similar skills

  • Stripe Patterns

    bybren-llc/safe-agentic-workflow

    Stripe payment integration patterns for checkout flows, webhooks, and subscriptions.

    423 GitHub stars~1.2k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Nevermined Payments

    LeoYeAI/openclaw-master-skills

    Integrates Nevermined payment infrastructure into AI agents, MCP servers, Google A2A agents, and REST APIs.

    2.2k GitHub stars~4.5k tokensUpdated 2 mo ago
    Backend & APIsAuto-check: notes
  • Billing SDK

    hashgraph-online/awesome-codex-plugins

    BillingSDK, the open-source React and shadcn component library for Dodo Payments billing UI.

    1.3k GitHub stars~3.5k tokensUpdated today
    Frontend & DesignAuto-check: notes
  • PDF Toolkit

    XiaomiMiMo/MiMo-Code

    Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.

    14k GitHub stars~1.7k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Picks the right library for generating a new PDF, filling an existing PDF form, or extracting text and tables, defaulting to Node where possible.

    3.8k GitHub stars~2.9k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Kimi PDF

    thvroyal/kimi-skills

    Professional PDF solution. An agent skill from thvroyal/kimi-skills.

    238 GitHub stars~1.9k tokensUpdated 6 mo ago
    Documents & OfficeAuto-check passed

More from wshobson/agents

All 142 skills in this repo
  • Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes.

    40k GitHub starsUsed in 14 repos~1.7k tokens
    Auto-check passed
  • Profiles slow Python code with cProfile and memory profilers, then applies targeted fixes for CPU, memory, I/O and query bottlenecks.

    40k GitHub starsUsed in 13 repos~814 tokens
    Auto-check passed
  • Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.

    40k GitHub starsUsed in 12 repos~1.3k tokens
    Auto-check passed
  • Distributed Tracing

    wshobson/agents

    Implement distributed tracing with Jaeger and Tempo to track requests across microservices and identify performance bottlenecks.

    40k GitHub starsUsed in 12 repos~527 tokens
    Auto-check passed
  • Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.

    40k GitHub stars~1.3k tokensUpdated 5 days ago
    Auto-check passed
  • Sets up GitOps continuous delivery for Kubernetes with ArgoCD or Flux, covering installation, repository layout, sync policies, progressive delivery and secrets.

    40k GitHub starsUsed in 12 repos~1.5k tokens
    Auto-check passed

Works with

Categories

Questions about Billing Automation

What does Billing Automation do?

Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments. The skill lays out the building blocks of a recurring billing system: billing intervals from weekly to annual plus usage-based and per-seat options, a subscription lifecycle that moves through trial, active, past due, canceled, paused and resumed, and automated invoice generation and delivery.

When should I use Billing Automation?

Billing Automation fits situations like: implementing subscription billing for a SaaS product; recovering failed payments with retries, notices and grace periods; calculating prorated charges when a customer changes plans or seats; automating invoice generation and delivery.

How do I install Billing Automation in Claude Code?

Run `npx skills add wshobson/agents --skill billing-automation -a claude-code`. Or copy the skill folder (plugins/payment-processing/skills/billing-automation in wshobson/agents) into .claude/skills/billing-automation in your project. Claude Code loads it when a task matches its description.

How do I install Billing Automation in Codex?

Run `npx skills add wshobson/agents --skill billing-automation -a codex`. Or copy the skill folder (plugins/payment-processing/skills/billing-automation in wshobson/agents) into .agents/skills/billing-automation in your project. Codex loads it when a task matches its description.

Can I use Billing Automation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wshobson/agents --skill billing-automation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/billing-automation, .gemini/skills/billing-automation, .github/skills/billing-automation and .opencode/skills/billing-automation in your project.

What does Billing Automation need to run?

SKILL.md names no scripts, command-line tools or credentials: Billing Automation is instructions for the agent only.

Does Billing Automation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Billing Automation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Billing Automation use?

Billing Automation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Billing Automation use?

About 473 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.9k tokens, read only when the agent opens those files.

What are the alternatives to Billing Automation?

Skills that share tags, products or a category with Billing Automation: Stripe Patterns (bybren-llc/safe-agentic-workflow, 423 stars), Nevermined Payments (LeoYeAI/openclaw-master-skills, 2.2k stars), Billing SDK (hashgraph-online/awesome-codex-plugins, 1.3k stars) and PDF Toolkit (XiaomiMiMo/MiMo-Code, 14k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Billing Automation?

wshobson (a GitHub user) maintains it in wshobson/agents, which has 40,314 GitHub stars. The repository holds 142 skills in this directory. The repository was last updated on October 5, 2026.

Source: wshobson/agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.