---
name: scaffolding-declarative-billing-models-and-feature-gates
description: "Scaffolds declarative billing schemas and client feature-gate checks from subscription plans, usage meters, and feature requirements. Use when an agent must draft billing configuration and client entitlement hooks for review."
license: CC-BY-4.0
compatibility: "Needs access to: GitHub, Terminal, Payments."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-15"
  source: "https://botbento.com/usecases/scaffolding-declarative-billing-models-and-feature-gates/"
  kind: skill
  hermes:
    tags: ["billing", "payments", "typescript", "saas"]
    category: coding
    requires_toolsets: ["terminal"]
---
# Scaffolding declarative billing models and feature gates

Convert product pricing tiers and meters into declarative billing schemas and client entitlements

## When to use

Generate declarative billing specifications and client-side entitlement checks based on your product pricing rules. The bot drafts tier definitions, usage meters, and feature grants into configuration files, verifying client entitlement hooks and payment flows across your application codebase without complex webhook choreography.

## Inputs

- `subscription_plans`: Requested subscription plans and pricing tier definitions.
- `usage_meters`: Usage meters that the billing schema should define and track.
- `feature_gate_requirements`: Feature gate and client entitlement requirements to implement.
- `project_repository`: Repository where billing schema and client hooks will be drafted.

## Steps

1. When you ask: Receive pricing tier spec (A person asks the bot to scaffold billing models and feature gates from a pricing tier spec.)
2. Draft schema and client hooks
3. Submit code changes for review

## Instructions

Analyze the requested subscription plans, usage meters, and feature gate requirements. Draft the declarative pricing schema and corresponding client-side balance checks for the project repository. Run local type checks and test integration scripts in the terminal. Before committing code, opening pull requests, or updating remote billing records, present the complete diff and configuration details and wait for user approval.

## Approvals

- Committing code changes to the repository requires user approval.
- Opening pull requests requires user approval.
- Updating remote billing records requires user approval.

## Output

Code changes with billing schema and client entitlement hooks submitted for review. (format: pull_request)

## Source

Summarized in our own words from [Show HN: We built an open source, zero webhooks payment processor](https://news.ycombinator.com/item?id=46048252) (Hacker News, checked 2026-10-15). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/scaffolding-declarative-billing-models-and-feature-gates/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
