{
  "markdown": "# BillingPlane\n\n**Guardrails-first Stripe billing for Claude Code.** Audit, discover, implement, and validate with zero runtime dependencies.\n\n## What Does BillingPlane Do?\n\nBillingPlane is a Claude Code plugin that ensures every Stripe billing integration follows battle-tested guardrails extracted from production billing systems. It catches revenue-losing bugs before they ship.\n\nUnlike billing middleware (Autumn, Lago, Schematic), BillingPlane generates code **you own**. No runtime dependency. No vendor lock-in. No ongoing fees.\n\n### What It Covers (4,000+ lines of billing intelligence)\n\n**4 Slash Commands:**\n\n- `/billingplane:audit` — Deep-scan your codebase for billing violations across 8 categories. Produces a severity-ranked report with exact file locations and fixes.\n- `/billingplane:discover` — Interactive requirements gathering (30 questions). Outputs BILLING_REQUIREMENTS.md.\n- `/billingplane:implement` — Generates production-ready billing code from requirements. 18 steps covering schema, webhooks, entitlements, usage, credits, trials, lifecycle.\n- `/billingplane:feature-gating-requirements` — 21 Q&A questions + 56 test cases for entitlement validation.\n\n**2 Auto-Activating Skills:**\n\n- `stripe-billing` — 15 guardrail rules auto-activate when Claude works with Stripe code. 7 reference files.\n- `billing-patterns` — Pricing model selection guide, build-vs-buy framework.\n\n**1 Webhook Validator Agent + 1 Pre-Write Safety Hook**\n\n### Key Patterns\n\n| Area | Coverage |\n|---|---|\n| Webhooks | 12 events, 6-layer middleware, idempotency, signature verification |\n| Lifecycle | 3 cancellation variants, reactivation, past_due, default fallback, trials, upgrades |\n| Feature gating | Boolean/metered/credit features, atomic check+track, entity-level, overage, preview |\n| Usage billing | 6 billing types, invoice.created handler, final invoice, balance reset |\n| Entitlements | Lazy reset, rollover, expiry, Decimal.js precision, default deny |\n| Concurrency | Subscription locks, cache invalidation, Redis Lua, SELECT FOR UPDATE |\n\n---\n\n## Installation\n\n### From GitHub\n```bash\n/plugin marketplace add kamesh231/billingplane-marketplace\n/plugin install billingplane@kamesh231\n```\n\n### Local Development\n```bash\ngit clone https://github.com/kamesh231/billingplane.git\nclaude --plugin-dir ./billingplane\n```\n\n### Team Setup\nAdd to `.claude/settings.json`:\n```json\n{\n  \"plugins\": {\n    \"marketplaces\": [\"kamesh231/billingplane-marketplace\"],\n    \"autoInstall\": [\"billingplane@kamesh231\"]\n  }\n}\n```\n\n---\n\n## Usage\n\n```bash\n/billingplane:audit src/          # Scan for violations\n/billingplane:discover            # Gather requirements\n/billingplane:implement           # Generate code\n/billingplane:feature-gating-requirements  # Validate entitlements\n```\n\nSkills auto-activate when Claude detects Stripe-related work.\n\n---\n\n## Publishing\n\n1. Push to GitHub\n2. Create a marketplace repo with `.claude-plugin/marketplace.json`\n3. Submit to community lists (ccplugins/awesome-claude-code-plugins)\n\n## The 15 Rules\n\n1. Never hardcode prices\n2. Secret key server-side only\n3. Frontend: publishable key + Price IDs only\n4. All state changes via webhooks\n5. Redirects never imply payment success\n6. Feature access never from UI state\n7. Webhook signature verification mandatory\n8. Idempotency per event ID\n9. subscription.updated MUST inspect previous_attributes\n10. Default DENY on ambiguity\n11. Never compute money client-side\n12. Always schedule default product on cancellation\n13. Webhook handler always returns 200\n14. Usage billing requires invoice.created handler\n15. Atomic entitlement deductions\n\n## License\n\nMIT\n",
  "bytes": 3635,
  "sha": "a48fceb7f38b0c2f82e39fda7dfea059bd855e86a4a395d9c2999a16584a0f9d",
  "repo_slug": "kamesh231/billingplane",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_kamesh231_billingplane_billingplane_b0f23bd9/readme"
}