Agent skill

Ee Billing

by gridaco in gridaco/grida

Surface workflow for billing in Grida — Stripe (subscriptions) + Metronome (AI credit ledger).

Apache-2.0Auto-check: notesBackend & APIs

Install Ee Billing

skills CLI
$ npx skills add gridaco/grida --skill ee-billing -a claude-code

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

GitHub CLI
$ gh skill install gridaco/grida ee-billing --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/gridaco/grida.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ee-billing .claude/skills/ee-billing && 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
ee-billing
GitHub stars
2.7k
Token cost
~1.3k tokens
SKILL.md length
526 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
Apache-2.0

At a glance

Surface workflow for billing in Grida — Stripe (subscriptions) + Metronome (AI credit ledger).

  • Works in 6 steps: Read docs/contributing/billing → Tag every billing file with GRIDA-EE:… → Webhook receivers also carry… → …
  • Touching editor/lib/billing/
  • SKILL.md covers Stable surface (the contract), Substrates, The seam: how OSS reads… and BYOK carve-out — GRIDA-SEC-003, plus 2 more sections
  • Calls pnpm and supabase; needs BYOK_OPENROUTER_API_KEY and BYOK_AI_GATEWAY_API_KEY

What it does

Ee Billing is an agent skill from gridaco/grida. Surface workflow for billing in Grida — Stripe (subscriptions) + Metronome (AI credit ledger). The stable contracts: gridabilling. is not REST-exposed (views/RPCs only), fnbillingapply are the single mutation points, webhook receivers are GRIDA-SEC-001, BYOK is the GRIDA-SEC-003 carve-out. Use when touching editor/lib/billing/, editor/scripts/billing/, the gridabilling schema, the webhook receivers, or the entitlement gate. Companion to ee.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Webhooks. It works with Stripe. The licence is Apache-2.0.

When your agent uses it

  • Touching editor/lib/billing/
  • Editor/scripts/billing/
  • The gridabilling schema
  • The webhook receivers

Example prompts

  • “/ee-billing”

Requirements

  • A credential in BYOK_OPENROUTER_API_KEY
  • A credential in BYOK_AI_GATEWAY_API_KEY

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Read docs/contributing/billing
  2. Tag every billing file with GRIDA-EE: billing per the
  3. Webhook receivers also carry GRIDA-SEC-001 — the
  4. Don't mutate grida_billing.* outside fn_billing_apply_* or the
  5. Run the E2E suite before opening the PR (refuses to start unless
  6. For schema changes, the database skill

What it can do on your machine

Read from SKILL.md and the folder at commit 165496f. 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

    Shell commands in SKILL.md call:

    • pnpm
    • supabase

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

  • Network

    Links to these hosts (documentation or services it may open):

    • grida.co

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • BYOK_OPENROUTER_API_KEY
    • BYOK_AI_GATEWAY_API_KEY

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

Context cost

Ee Billing loads about 1.3k tokens when it runs. Until then it costs about 120 tokens; SKILL.md has 526 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~1.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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:82
    `editor/.env.local`, the AI-SDK text path routes through the

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 gridaco/grida at commit 165496f, republished under its Apache-2.0 licence (© gridaco). 526 words, ~1,307 tokens.

Download SKILL.mdSave it as .claude/skills/ee-billing/SKILL.md (or your agent's skills folder).
name
ee-billing
description
Surface workflow for billing in Grida — Stripe (subscriptions) + Metronome (AI credit ledger). The stable contracts: `grida_billing.*` is not REST-exposed (views/RPCs only), `fn_billing_apply_*` are the single mutation points, webhook receivers are `GRIDA-SEC-001`, BYOK is the `GRIDA-SEC-003` carve-out. Use when touching `editor/lib/billing/`, `editor/scripts/billing/`, the `grida_billing` schema, the webhook receivers, or the entitlement gate. Companion to `ee`.

ee-billing

This is the surface skill for billing — the workflow once the ee anchor has placed billing on the EE side and the contributor setup is done. Setup itself is documented; cite it, don't restate it:

Stable surface (the contract)

These shapes are locked. A change that breaks any of them must be intentional and called out in the PR description.

  • grida_billing.* schema — not REST-exposed. Public reads go through v_billing_* views; writes only through fn_billing_* RPCs. Don't add a new direct-access surface; add a view or an RPC. Schema discipline lives in database / supabase/AGENTS.md.
  • public.fn_billing_apply_stripe_event — the only place Stripe-driven subscription state mutates. Mutating from a new direction (UI form, ad-hoc RPC, hand-written migration) corrupts the projector model.
  • public.fn_billing_apply_metronome_event — same role for Metronome credit / alert / payment_gate events.
  • Webhook receivers — /webhooks/stripe and /webhooks/metronome are the only billing ingress; both are signature-verified per GRIDA-SEC-001.
  • editor/lib/billing/metronome.ts — the service module surface: provisionOrg, addStripeChargedCommit, setAutoReload, getEntitlement, ingestUsageEvent. New billing actions go through this module, not adjacent to it.

Substrates

Two external clouds; both use per-contributor sandbox accounts. Credentials are never shared. Live keys are refused at boot.

  • Stripe — subscriptions + payment processing. Provision via pnpm tsx editor/scripts/billing/cli.ts setup:stripe. Idempotent; re-run after every supabase db reset (writes price IDs into the catalog).
  • Metronome — AI credit ledger. Provision via pnpm tsx editor/scripts/billing/cli.ts setup:metronome. Same idempotency / re-run rule.

editor/scripts/billing/cli.ts is the single entry point for every billing script; run without arguments for the full subcommand list. See editor/scripts/billing/README.md.

The seam: how OSS reads entitlement

OSS code that needs to gate on a paid plan, AI credit balance, or org entitlement does not import billing internals. The seam is getEntitlement (from editor/lib/billing/metronome.ts) and its typed wrappers. New gates go through this function so fail-closed and BYOK behavior stay centralized.

Show full SKILL.md (214 more words)Show less

BYOK carve-out — GRIDA-SEC-003

If BYOK_OPENROUTER_API_KEY or BYOK_AI_GATEWAY_API_KEY is set in editor/.env.local, the AI-SDK text path routes through the contributor's provider and bypasses billing.

  • Auth is never bypassed. A resolvable org is still required.
  • Text/chat only. Image and audio still go through Replicate and still bill, even under BYOK.
  • Never set BYOK_* on a hosted or preview deploy. It disables billing and the org-id sanity gate for every org. See SECURITY.md (GRIDA-SEC-003).

Working on billing

  1. Read docs/contributing/billing for setup before the first change. Don't skip cloudflared if you need Metronome — webhook delivery requires public HTTPS.
  2. Tag every billing file with GRIDA-EE: billing per the ee skill.
  3. Webhook receivers also carry GRIDA-SEC-001 — the security review runs first.
  4. Don't mutate grida_billing.* outside fn_billing_apply_* or the migration that creates it.
  5. Run the E2E suite before opening the PR (refuses to start unless every channel is demonstrably test-mode): pnpm --filter editor vitest run lib/billing/__tests__/e2e.
  6. For schema changes, the database skill governs — grida_billing is a regular grida_* schema under that discipline.

Known issues

docs/wg/platform/billing/known-issues is the living register (KI-BILL-NNN). Add to it when you mitigate or accept an issue; don't quietly bake the mitigation into a PR without registering it.

See also: ee (the EE anchor), security (GRIDA-SEC-001, GRIDA-SEC-003), database (schema discipline for grida_billing).

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

Files

Just SKILL.md in .agents/skills/ee-billing of gridaco/grida.

Open the folder on GitHubat commit 165496f

Compare with similar skills

Ee Billing 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.

Ee Billing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ee Billing this skillgridaco/grida2.7k—~1.3kAutomated safety check: NotesApache-2.0
Stripe Appsfossasia/eventyay1.7k1 repos~3.6kAutomated safety check: PassApache-2.0
Stripe Best Practiceskanchengw/cnllm1753 repos~925Automated safety check: PassApache-2.0
Cashier Stripe Developmentluadotsh/lua3421 repos~1.2kAutomated safety check: PassMIT
Stripe Best Practicesfossasia/eventyay1.7k1 repos~1.7kAutomated safety check: PassApache-2.0
Stripe Integrationwshobson/agents40k9 repos~1kAutomated safety check: PassMIT

Similar skills

  • Stripe Apps

    fossasia/eventyay

    A skill your agent uses when building, modifying, or reviewing a Stripe App — or when the user describes something that implies one (e.g.

    1.7k GitHub starsUsed in 1 repo~3.6k tokens
    Backend & APIsAuto-check passed
  • Stripe Best Practices

    kanchengw/cnllm

    Guides Stripe integration decisions — API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties), billing/subscriptions, Treasury financial…

    175 GitHub starsUsed in 3 repos~925 tokens
    Backend & APIsAuto-check passed
  • Handles Laravel Cashier Stripe integration including subscriptions, webhooks, Stripe Checkout, invoices, charges, refunds, trials, coupons, metered billing, and payment failure handling.

    342 GitHub starsUsed in 1 repo~1.2k tokens
    Backend & APIsAuto-check passed
  • Stripe Best Practices

    fossasia/eventyay

    Guides Stripe integration decisions across development and test environment planning (separate sandboxes vs the shared test mode sandbox), API selection (Checkout Sessions vs PaymentIntents)…

    1.7k GitHub starsUsed in 1 repo~1.7k tokens
    Backend & APIsAuto-check passed
  • Stripe Integration

    wshobson/agents

    Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks.

    40k GitHub starsUsed in 9 repos~1k tokens
    Backend & APIsAuto-check passed
  • Convex HTTP Actions

    waynesutton/builder-skills

    Adds HTTP endpoints in convex/http.ts: webhook receivers with signature checks, REST style routes, CORS, auth headers, streaming responses, and file uploads over HTTP.

    404 GitHub stars~2.6k tokensUpdated 9 days ago
    Backend & APIsAuto-check passed

More from gridaco/grida

All 29 skills in this repo
  • Desktop

    gridaco/grida

    Grida Desktop Electron shell and release-impact work: BrowserWindow, preload, window.grida, menus, protocol/deep links, file associations, Forge, path-scoped bridge security, Electron-only UI bugs…

    2.7k GitHub stars~3.2k tokensUpdated yesterday
    Auto-check: notes
  • Io Figma

    gridaco/grida

    Guides work on the Figma I/O package (@grida/io-figma, packages/grida-canvas-io-figma/).

    2.7k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check: notes
  • Opt Library

    gridaco/grida

    Set up, download, verify, and seed the optional Grida Library developer corpus into local Supabase.

    2.7k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Vision

    gridaco/grida

    Query images with a local Ollama vision model without loading the image into the main agent context.

    2.7k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • AI Models

    gridaco/grida

    Research, compare, and update shared AI model JSON for TypeScript, web, and Rust consumers.

    2.7k GitHub stars~5.7k tokensUpdated yesterday
    Auto-check passed
  • Agent System

    gridaco/grida

    Grida AI agent system work: @grida/daemon (DaemonServer, loopback HTTP perimeter, files/workspaces, secrets store, daemon discovery) and @grida/agent (the agent tenant: sessions, providers/BYOK…

    2.7k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Ee Billing

What does Ee Billing do?

Surface workflow for billing in Grida — Stripe (subscriptions) + Metronome (AI credit ledger). Ee Billing is an agent skill from gridaco/grida. Surface workflow for billing in Grida — Stripe (subscriptions) + Metronome (AI credit ledger).

When should I use Ee Billing?

Ee Billing fits situations like: touching editor/lib/billing/; editor/scripts/billing/; the gridabilling schema; the webhook receivers.

How do I install Ee Billing in Claude Code?

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

How do I install Ee Billing in Codex?

Run `npx skills add gridaco/grida --skill ee-billing -a codex`. Or copy the skill folder (.agents/skills/ee-billing in gridaco/grida) into .agents/skills/ee-billing in your project. Codex loads it when a task matches its description.

Can I use Ee Billing 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 gridaco/grida --skill ee-billing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ee-billing, .gemini/skills/ee-billing, .github/skills/ee-billing and .opencode/skills/ee-billing in your project.

What does Ee Billing need to run?

Going by SKILL.md and its folder, Ee Billing needs the command-line tools its instructions call (pnpm and supabase) and credentials named BYOK_OPENROUTER_API_KEY and BYOK_AI_GATEWAY_API_KEY. Our summary lists: A credential in BYOK_OPENROUTER_API_KEY; A credential in BYOK_AI_GATEWAY_API_KEY.

Does Ee Billing access the network?

SKILL.md names 1 domain. As links in the text: grida.co. This is read from the text; nothing was executed.

Is Ee Billing safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Ee Billing use?

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

How many tokens does Ee Billing use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ee Billing?

Skills that share tags, products or a category with Ee Billing: Stripe Apps (fossasia/eventyay, 1.7k stars), Stripe Best Practices (kanchengw/cnllm, 175 stars), Cashier Stripe Development (luadotsh/lua, 342 stars) and Stripe Best Practices (fossasia/eventyay, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ee Billing?

gridaco (a GitHub organization) maintains it in gridaco/grida, which has 2,657 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 6, 2026.

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