Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/dodopayments/dodo-agent-plugin/better-auth-integrationnpx skills add dodopayments/dodo-agent-plugin --skill better-auth-integrationgit clone --depth 1 https://github.com/dodopayments/dodo-agent-pluginWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/dodopayments/dodo-agent-plugin/better-auth-integration)<a href="https://agentmods.dev/skills/dodopayments/dodo-agent-plugin/better-auth-integration"><img src="https://agentmods.dev/badge/skills/dodopayments/dodo-agent-plugin/better-auth-integration.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.01771 |
| Opus 5 | $0.00018 | $0.00886 |
| Sonnet 5 | $0.00007 | $0.00354 |
| Haiku 4.5 | $0.00004 | $0.00177 |
Grade A, and why
better-auth-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to better-auth-integration — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Better Auth Integration
Use @dodopayments/better-auth to synchronize Better Auth users with Dodo Payments and expose authenticated checkout, customer portal, subscription, payment, usage, and webhook endpoints.
When to use this skill
- Create a Dodo customer automatically when a Better Auth user signs up.
- Start checkout for a signed-in user without exposing a Dodo API key.
- Let users open their customer portal or list their subscriptions and payments.
- Submit metered usage for the signed-in customer.
- Receive signature-verified Dodo webhooks through Better Auth.
Install
npm install @dodopayments/better-auth dodopayments better-auth
The package exports the lowercase server functions dodopayments, checkout, portal, usage, and webhooks. Its client entry point exports dodopaymentsClient.
Server setup
Every endpoint is registered by a feature in use. Include every feature that the application calls; omitting one makes its route return 404.
import { betterAuth } from "better-auth";
import DodoPayments from "dodopayments";
import { checkout, dodopayments, portal, usage, webhooks } from "@dodopayments/better-auth";
const dodoPayments = new DodoPayments({
bearerToken: process.env.DODO_PAYMENTS_API_KEY,
environment: "test_mode",
});
export const auth = betterAuth({
database: {
// your database config
},
plugins: [
dodopayments({
client: dodoPayments,
createCustomerOnSignUp: true,
// `user` here is Better Auth's base user: id, name, email, emailVerified,
// image, createdAt, updatedAt. Anything else (phone number, company, plan)
// must first be declared via `user.additionalFields` in your Better Auth
// config, otherwise it does not exist on the type and will be undefined.
getCustomerParams: (user) => ({
metadata: { better_auth_user_id: user.id },
}),
use: [
checkout({
products: [
{ productId: "pdt_premium", slug: "premium-plan" },
],
successUrl: "https://app.example.com/billing/success",
authenticatedUsersOnly: true,
}),
portal(),
usage(),
webhooks({
webhookKey: process.env.DODO_PAYMENTS_WEBHOOK_KEY,
onPayload: async (payload) => {
console.log("Verified Dodo webhook:", payload.type);
},
}),
],
}),
],
});
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 215 lines · 37 tokens per session scan A 4e015fa4ed37
better-auth-integration is a skill published in the GitHub repository dodopayments/dodo-agent-plugin (6 stars, last pushed 5d ago), licensed MIT. It adds 37 tokens to every session and 1,771 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to better-auth-integration, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
opencode-ensemble
Use when coordinating multiple coding agents, delegating independent software work, managing OpenCode Ensemble teams, choosing teammate roles or models, reviewing teammate output, or deciding whether parallel execution is appropriate.
ahk-consultant
Get technical advice or review on an approach, idea, or change. References available skills for best practices. No tasks created, no harness tracking.
ce:review
Structured code review using tiered persona agents, confidence-gated findings, and a merge/dedup pipeline. Use when reviewing code changes before creating a PR.
ce:compound-refresh
Refresh stale or drifting learnings and pattern docs in docs/solutions/ by reviewing, updating, consolidating, replacing, or deleting them against the current codebase. Use after refactors, migrations, dependency upgrades, or when a retrieved learning feels outdated or wrong. Also use when reviewing docs/solutions/…
ce:compound
Document a recently solved problem to compound your team's knowledge.
ce:work
Execute work efficiently while maintaining quality and finishing features.