credit-metering SKILL.md skillA

credit-metering from tushaarmehtaa/tushar-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add tushaarmehtaa/tushar-skills/credit-metering@git:20260807.fac9f85

Pins git:20260807.fac9f85 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
tushaarmehtaa/tushar-skills
Path
credit-metering/SKILL.md
Versions recorded
2
Latest version
git:20260807.fac9f85, committed Aug 7, 2026
First version recorded
Aug 7, 2026
Size
3,151 bytes
Repository stars
12
License
MIT

Implement or audit usage credits with atomic reservations, spending, grants, purchases, expiration, refunds, limits, UI state, and an immutable ledger. Use when an app meters consumable usage.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Credit metering

Build credits as a financial state machine. Preserve existing denominations, billing semantics, and provider integrations.

## Workflow

1. Inspect backend/runtime, database/ORM, auth and tenant keys, current balance/ledger fields, payment provider, usage paths, retries, queues, and frontend state.
2. Infer existing costs, grants, and packs from code. Ask only for unresolved commercial policy: denomination, per-action or measured cost, free/recurring grants, expiration/rollover, refund/clawback behavior, and overspend/debt policy. Never default to a new payment provider when one exists.
3. Read [database schemas](references/database-schemas.md), then implement only the matching database variant. Do not treat PostgreSQL, MySQL/PlanetScale, Prisma providers, and MongoDB as interchangeable.
4. Use an append-only ledger with a unique idempotency key/external event ID. Update cached balance and ledger in one database transaction, or derive balance from the ledger when scale permits. Enforce positive input amounts and the chosen non-negative/debt rule in the database.
5. Implement explicit operations:
   - `grant` for signup, subscription, promotion, or admin credit;
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add tushaarmehtaa/tushar-skills/credit-metering@sha256:26295bcbc73aaa02

The line at the top of this page pins the label git:20260807.fac9f85, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_hqo7akf45y7twesu.svg)](https://markdownregistry.com/a/art_hqo7akf45y7twesu)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 2 versions of this file, all committed on Aug 7, 2026.

versioncommittedcommitsizeaudit
git:20260807.fac9f85 latest2026-08-07 fac9f85 3,151 BA view · diff
git:20260807.975fe852026-08-07 975fe85 14,445 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (3151 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

tushaarmehtaa/tushar-skills · 12 stars · license MIT · pushed 2026-10-15 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_hqo7akf45y7twesu
GET https://markdownregistry.com/api/v1/resolve?ref=tushaarmehtaa/tushar-skills/credit-metering
GET https://markdownregistry.com/api/v1/blob/26295bcbc73aaa02d3cbb4a000ca7f5328844dfe7d40066f264dc961f9dc3ebb

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from tushaarmehtaa/tushar-skills

AGENTS.md AGENTS.md file
tushaarmehtaa/tushar-skills · AGENTS.md
git:20261009.30b4794 · audit A · 12 stars
agent-instructions SKILL.md skill
tushaarmehtaa/tushar-skills · agent-instructions/SKILL.md · Create or reconcile scoped AGENTS.md, CLAUDE.md, and Cursor rules from repository evidence. Use when coding-agent…
git:20260807.fac9f85 · audit A · 12 stars
ai-cost-audit SKILL.md skill
tushaarmehtaa/tushar-skills · ai-cost-audit/SKILL.md · Audit AI usage, billing, unit economics, routing, caching, batching, and optimization. Use when AI cost, margin…
git:20260807.fac9f85 · audit A · 12 stars
ai-product-development SKILL.md skill
tushaarmehtaa/tushar-skills · ai-product-development/SKILL.md · Design, implement, or audit production AI features with model selection, streaming UX, tool use, safety, evaluation…
git:20260807.fac9f85 · audit A · 12 stars
analytics SKILL.md skill
tushaarmehtaa/tushar-skills · analytics/SKILL.md · Plan, implement, or audit analytics, error monitoring, health checks, dashboards, and reporting. Use when designing…
git:20260807.fac9f85 · audit A · 12 stars
auth-implementation SKILL.md skill
tushaarmehtaa/tushar-skills · auth-implementation/SKILL.md · Implement authentication, authorization, tenant isolation, sessions, and protected routes. Use when adding sign-in…
git:20260807.fac9f85 · audit A · 12 stars
changelog SKILL.md skill
tushaarmehtaa/tushar-skills · changelog/SKILL.md · Turn a verified git range into audience-appropriate changelog copy and optional visual assets. Use when preparing…
git:20260807.fac9f85 · audit A · 12 stars
cold-outreach SKILL.md skill
tushaarmehtaa/tushar-skills · cold-outreach/SKILL.md · Research, write, audit, and improve cold messages, introductions, replies, and sequences. Use when contacting…
git:20260807.fac9f85 · audit A · 12 stars
decision-doc SKILL.md skill
tushaarmehtaa/tushar-skills · decision-doc/SKILL.md · Facilitate, research, write, or audit decision records with options, evidence, tradeoffs, ownership, and review…
git:20260807.fac9f85 · audit A · 12 stars
demo-video SKILL.md skill
tushaarmehtaa/tushar-skills · demo-video/SKILL.md · Plan, script, build, and verify Remotion product demos, walkthroughs, launch clips, and explainers. Use when a product…
git:20260807.fac9f85 · audit A · 12 stars
deploy-check SKILL.md skill
tushaarmehtaa/tushar-skills · deploy-check/SKILL.md · Run a production preflight across release scope, tests, builds, secrets, migrations, dependencies, configuration…
git:20261010.ee0eb07 · audit A · 12 stars
email-with-resend SKILL.md skill
tushaarmehtaa/tushar-skills · email-with-resend/SKILL.md · Implement or audit Resend email with templates, queues, preferences, audiences, campaigns, webhooks, and delivery…
git:20260807.fac9f85 · audit A · 12 stars

Every file in tushaarmehtaa/tushar-skills

Other files named credit-metering

credit-metering SKILL.md skill
tushaarmehtaa/tushar-skills · plugins-labs/skills/credit-metering/SKILL.md · Implement or audit usage credits with atomic reservations, spending, grants, purchases, expiration, refunds, limits, UI…
git:20261015.35cce77 · audit A · 12 stars

Browse by kind, by grade A, or by owner.