PO

    Platform Oauth Linked Billing Workflow

    by Sheeyassh

    1

    Let customers link their own AI platform billing accounts via passwordless PAR/PKCE OAuth and ES256 JWTs so user-triggered runs charge their org directly.

    $4

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    PO

    Platform Oauth Linked Billing Workflow

    Example session with this skill installed

    Add customer linked-billing OAuth to our Django + Next.js SaaS (backend/pyproject.toml, backend/apps/accounts/models.py). Users should click "Connect AI Org" to pay for their own AI runs, with encrypted rotating refresh tokens, cost preview, and max_tokens enforcement.

    • Read your context and instructions
    • Compiled the platform oauth linked

    Inspected backend/pyproject.toml and backend/apps/accounts/models.py, generated an ES256 issuer keypair via scripts/genkey.mjs, and added LinkedBillingConnection (Fernet-encrypted refresh_token with select_for_update rotation locking) in backend/apps/accounts/models.py. Implemented PAR/PKCE initiate, callback, and ES256 client-assertion refresh endpoints in backend/apps/billing/oauth.py, plus max_tokens and pre-run cost-estimate enforcement in backend/apps/billing/runner.py. Verified JWKS/assertion signing with node scripts/verify.mjs and ran pytest backend/apps/billing/tests/ (9 tests passing).

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Let customers link their own AI platform billing accounts via passwordless PAR/PKCE OAuth and ES256 JWTs so user-triggered runs charge their org directly. This skill guides AI coding agents through implementing AI platform OAuth with customer-linked billing, enabling end users to connect their own Console organization so user-initiated AI calls bill directly to them. It enforces passwordless ES256 JWT client assertions, PAR/PKCE flows, encrypted rotating refresh tokens, and strict cost/secret boundaries across your chosen backend stack.

    What it does

    • Linked-Billing Security & Flow Audit Review existing user models, OAuth callbacks, and AI proxy routes to verify ES256 assertion signing, encrypted rotating refresh-token persistence, secret isolation, and cost-guard enforcement.
    • Token Rotation & Production Hardening Fix token-rotation race conditions, enforce max_tokens and UI cost previews, or prepare Testing-mode apps for production by stripping localhost redirects and verifying DNS TXT rules.
    • Greenfield Platform OAuth Implementation Plan and implement end-to-end PAR/PKCE OAuth, ES256 key generation (genkey.mjs), encrypted per-user credential storage, and verified Console integration from scratch.
    • Deterministic Deliverables Every run produces a stack-tailored integration plan, ES256 key-generation and verification scripts, PAR/PKCE OAuth backend endpoints with encrypted atomic token rotation, cost-capped user-run handlers, and a Console go-live checklist.

    How it works

    1. Pre-Flight & Scope Audit verifies workspace boundaries, inputs, and required tools (filesystem-read, filesystem-write, git, node) before modifying any files.
    2. Core Workflow Execution runs Linked-Billing Security & Flow Audit, Token Rotation & Production Hardening using modular, non-destructive steps.
    3. Quality Gate Enforcement applies skill-specific checks including Atomic Commit Hygiene & Safe History Verification, OAuth2 PKCE & Token Lifecycle Hardening.
    4. Verification & Reporting validates every deliverable against the 7-point checklist and emits an evidence-backed summary.

    Frameworks & tools

    Supports aws, bash, cloudflare, django, gcp, git. Uses agent tools: filesystem-read, filesystem-write, git, node, python3, shell-exec. Prerequisites: AI platform Console access, Node.js for key & verify scripts, HTTPS redirect URI. Compatible with Claude Code, Cursor, Windsurf, Antigravity, Codex CLI, and MCP-enabled agents.

    Why this beats prompting it yourself

    Building linked-billing OAuth by hand often fails on subtle protocol rules—inventing non-existent client secrets, dropping rotated refresh tokens under concurrency, or leaking operator credentials into client logs. The skill inspects your repo's manifests (package.json, pyproject.toml, go.mod, etc.) first to tailor crypto, database locking, and routing to your stack, backed by genkey.mjs and verify.mjs checks. Instead of ad-hoc prompting, Platform Oauth Linked Billing Workflow enforces Atomic Commit Hygiene & Safe History Verification, OAuth2 PKCE & Token Lifecycle Hardening, Architecture Modularity & Automated Regression Gate alongside a deterministic 7-point verification checklist.

    Use cases

    • Building a "Connect your AI org" BYO-billing button in SaaS developer tools so AI usage bills directly to each customer's Console organization.
    • Migrating risky user-pasted API key inputs to secure, revocable PAR/PKCE OAuth connections with rotating refresh tokens.
    • Hardening concurrent refresh-token handling and adding mandatory pre-run cost previews and max_tokens caps before shipping.
    • Preparing a Testing-mode linked-billing app for public review by auditing secret leakage, removing localhost redirect URIs, and verifying DNS TXT setup.

    Known limitations

    Apps start in Testing mode limited to allowlisted test users (capped at USD 50/month each); lifting limits requires DNS TXT domain verification and platform review. Console registration steps (adding inline JWKs, test users, and archiving test issuers) require manual actions by the developer in the platform web Console. Unattended cron or background batch jobs are intentionally excluded from linked-billing flows without separate explicit customer-approved authorization mechanisms.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    Software
    AI platform Console accessNode.js for key & verify scriptsHTTPS redirect URINode.js

    Permissions

    No special permissions declared or detected

    Listed2 days ago

    What's inside

    Creator

    Sheeyassh

    Sheeyassh

    33 skills on Agensi

    Frequently Asked Questions

    Standard OAuth guides assume static client secrets and non-rotating tokens. This skill implements the exact passwordless ES256 client-assertion + PAR/PKCE + rotating refresh-token architecture required for AI platform linked billing.

    It supports Node.js/TypeScript, Python (Django/FastAPI), Go, and Ruby/PHP backends across AWS, GCP, and Cloudflare runtimes, pairing bundled `genkey.mjs` and `verify.mjs` helpers with your stack's crypto and ORM libraries.

    You get an inspected implementation plan, ES256 keypair generation, PAR/PKCE authorize and callback routes, encrypted rotating token storage, cost-capped inference wrappers, and a go-live Console verification checklist.

    You need access to the AI platform Console to register the issuer and test users; you can run it both for greenfield "Connect your AI org" features and to audit existing token-rotation or redirect-URI security gaps.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.