better-auth

better-auth is a skill for Kiro from ihatesea69/kiro-kit. It costs 35 tokens per session (429 once invoked), scanned A, original, MIT.

A coding guide for adding login, permissions, and account security to applications. It covers OAuth, which lets users sign in through services such as Google or GitHub, as well as tokens, sessions, roles, multi-factor authentication, and passkeys.

In plain words
What is it for?
Use it to build OAuth sign-in, JWT or session-based login, role-based access control, multi-factor authentication, session management, and passkey/WebAuthn support.
Why use it?
It helps avoid common mistakes when deciding how users sign in, how long access lasts, and what each user may do. It also addresses protecting sessions and handling token refresh and account changes.

Skill for Kiro

Written for Kiro: installed under .kiro/.

Good fit Use it to build OAuth sign-in, JWT or session-based login, role-based access control, multi-factor authentication, session management, and passkey/WebAuthn support.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ihatesea69/kiro-kit/better-auth
Install

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.

Any agent
npx skills add ihatesea69/kiro-kit --skill better-auth
Clone the repo
git clone --depth 1 https://github.com/ihatesea69/kiro-kit

Made for: Kiro.

Wrote 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.

agentmods badge for better-auth

README.md
[![agentmods](https://agentmods.dev/badge/skills/ihatesea69/kiro-kit/better-auth/github.svg)](https://agentmods.dev/skills/ihatesea69/kiro-kit/better-auth)
Your own site
<a href="https://agentmods.dev/skills/ihatesea69/kiro-kit/better-auth"><img src="https://agentmods.dev/badge/skills/ihatesea69/kiro-kit/better-auth/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for better-auth

Your own site · 80×15
<a href="https://agentmods.dev/skills/ihatesea69/kiro-kit/better-auth"><img src="https://agentmods.dev/badge/skills/ihatesea69/kiro-kit/better-auth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 429 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00429
Opus 5.5 $0.00014 $0.00172
Sonnet 5.5 $0.00007 $0.00086
Haiku 4.5 $0.00003 $0.00043

Measured 1mo ago against content hash 7d38cc1b324a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

better-auth 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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/better_auth_init.py, scripts/tests/test_better_auth_init.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.kiro/skills/better-auth/SKILL.md · 63 lines

What it actually says

Better Auth

Activate this skill when implementing authentication or authorization systems.

When to Use

  • Adding authentication to an application
  • Implementing OAuth flows (Google, GitHub, Discord)
  • Setting up JWT or session-based auth
  • Implementing role-based access control (RBAC)
  • Adding multi-factor authentication (TOTP, SMS)
  • Managing user sessions and token refresh
  • Implementing passkeys/WebAuthn

Authentication Patterns

JWT (Stateless)

  • Short-lived access tokens (15-60 minutes)
  • Long-lived refresh tokens (7-30 days, stored securely)
  • Rotate refresh tokens on use (detect token theft)
  • Include minimal claims (user ID, roles)
  • Validate signature, expiry, and issuer on every request

Session-Based (Stateful)

  • Store sessions server-side (Redis for distributed)
  • Use httpOnly, secure, sameSite cookies
  • Implement session rotation on privilege escalation
  • Set absolute and idle timeouts
  • Invalidate all sessions on password change

OAuth 2.1

  • Use PKCE for all flows (including server-side)
  • Validate state parameter to prevent CSRF
  • Store tokens encrypted at rest
  • Implement token refresh before expiry
  • Handle provider-specific scopes and claims

Authorization Patterns

  • RBAC: roles with permission sets
  • ABAC: attribute-based policies for complex rules
  • Resource-based: check ownership before access
  • Always check authorization server-side (never trust client)

Security Rules

  • Hash passwords with bcrypt (cost 12+) or argon2id
  • Use constant-time comparison for tokens
  • Implement account lockout after failed attempts
  • Log all auth events for audit trail
  • Never store plain-text passwords or tokens
  • Validate redirect URIs strictly (no open redirects)
Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 1mo ago First seen · 63 lines · 35 tokens per session scan A 7d38cc1b324a

Subscribe to this mod's changes

better-auth is a skill published in the GitHub repository ihatesea69/kiro-kit (19 stars, last pushed 2mo ago), licensed MIT. It adds 35 tokens to every session and 429 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

voiden

Create and edit Voiden .void files for API testing. Covers the .void file format and all enabled extension block types.

VoidenHQ/voiden · 28 tokens

scaffold-project

Scaffold a new app, API, backend, fullstack project, mobile app, polyglot service, monorepo, or starter with Better Fullstack. Use when the user wants to create, start, bootstrap, initialize, or generate a project from a stack description. Prefer the bundled Better Fullstack MCP server: guidance, schema…

Marve10s/Better-Fullstack · 80 tokens

csharp-dotnet

Use when writing, reviewing, testing, or shipping C# / .NET code — ASP.NET Core APIs (minimal APIs vs controllers), EF Core data access, async correctness, solution layout in .cs/.csproj/.sln. NOT a Java/Spring backend (that is spring-boot), NOT a Node/TypeScript backend (that is nestjs), NOT framework-neutral REST…

ericrisco/rsc-harness · 89 tokens

opencli-explorer

Use when creating a new OpenCLI adapter from scratch, adding support for a new website or platform, exploring a site's API endpoints via browser DevTools, or when a user asks to automatically generate a CLI for a website. Covers automated generation, API discovery workflow, authentication strategy selection, TS…

zxfccmm4/Obsidian-OpenCode-Knowledge · 68 tokens

oly-apps

Use when publishing rich HTML output or a web app through the oly daemon, including static files, SPA routing, and proxied local services.

slaveOftime/open-relay · 32 tokens

b2c-custom-job-steps

Create custom job steps for B2C Commerce batch processing. Use this skill whenever the user needs to write a batch job, data export script, scheduled cleanup task, or any server-side processing that runs on a schedule. Also use when they ask about steptypes.json, chunk-oriented vs task-oriented job steps…

SalesforceCommerceCloud/b2c-developer-tooling · 148 tokens