installskill

Skills / better-auth/skills

better-auth-security-best-practices

Hardens a Better Auth setup with rate limiting, CSRF protection, secure cookies and audit logging.

Pinned commit
20c9e88a5c00Committed 2026-09-01
Files
110 KB
License
None declared
Snapshot taken
2026-11-28
Description from the skill
Configure rate limiting, manage auth secrets, set up CSRF protection, define trusted origins, secure sessions and cookies, encrypt OAuth tokens, track IP addresses, and implement audit logging for Better Auth. Use when users need to secure their auth setup, prevent brute force attacks, or harden a Better Auth deployment.

This is the text your agent reads to decide when to use the skill.

Install

Choose your agent. Pinned commands install exactly the commit this page describes.

Skill directory .claude/skills/Claude Code · Official docs

Does not read the shared .agents/skills directory. A skill must land in .claude/skills, or arrive inside a plugin.

GitHub CLIpinned

$ gh skill install better-auth/skills security --agent claude-code --pin 20c9e88a5c007461a703f1c213572b073196113e

gh picks the directory for the agent, names the folder after the source directory (security), and writes source metadata into the SKILL.md frontmatter, so the content hash below will not match. Check the github-tree-sha it records instead: it should read 7cd035c1dd03aafc236ea43492d31ca3306b7ab6.

skills CLIpinned

$ npx skills add better-auth/skills@20c9e88a5c007461a703f1c213572b073196113e --skill better-auth-security-best-practices -a claude-code --copy

Downloads and runs the skills package from npm. --copy writes real files instead of symlinks. The CLI sends anonymous telemetry unless DISABLE_TELEMETRY=1 is set, and that setting also turns off its audit lookups.

Plain gitpinned

$ tmp=$(mktemp -d)
$ git clone --quiet https://github.com/better-auth/skills.git "$tmp"
$ git -C "$tmp" checkout --quiet 20c9e88a5c007461a703f1c213572b073196113e
$ mkdir -p .claude/skills
$ cp -R "$tmp/security" .claude/skills/better-auth-security-best-practices

No extra tooling. Files land byte for byte as published in .claude/skills/better-auth-security-best-practices, so the content hash below can be checked directly.

Check what landed

Run this after installing. It prints one SHA-256 for the whole directory. If your installer reported a different directory, cd there instead.

$ cd .claude/skills/better-auth-security-best-practices && find . -type f -print0 | LC_ALL=C sort -z | xargs -0 shasum -a 256 | shasum -a 256

Expectedabc4a92b4c8793058e49ed670f5607f063a99d75af08a7752fe0ad9e056de7c9

It matches only when the files are byte for byte as published. A difference means something changed: by the installer, by you, or upstream.

What is inside

Pattern matches in the files, each linked to its line. A match is a place to read, not a verdict, and no match is not proof of absence.

SKILL.md · 1

Runs commandsNo match

Code that spawns other processes, or shell code blocks in the instructions.

Network accessNo match

Calls that fetch from or send to a remote host.

Installs packagesNo match

Commands that pull and run third-party packages at use time.

Reads env or credentials4

References to environment variables, tokens, keys or credential files.

0 in scripts · 4 in docs and other text files

Privileged or destructiveNo match

sudo, recursive deletes, permission changes and similar commands.

Dynamic or encoded codeNo match

eval, exec, base64 decoding and remote-script piping, which hide what runs.

Outside hosts mentioned

Hostnames of every URL in the text files.

  • api.example.com×2
  • app.example.com×2
  • *.example.com×1
  • *.preview.example.com×1
  • admin.example.com×1
  • app.example.com,https×1

Entries worth a second look

No symlinks, submodules, hidden files, archives, compiled files or unscanned files.

File manifest

Every file in the skill directory at the pinned commit.

Content hash
abc4a92b4c8793058e49ed670f5607f063a99d75af08a7752fe0ad9e056de7c9
Git tree SHA
7cd035c1dd03aafc236ea43492d31ca3306b7ab6
PathKindSizeSHA-256
SKILL.mdSKILL.md10 KB042f01c76b63b436…

Spec and portability

Checked against the Agent Skills specification.

Frontmatter
Parses as YAML
Name matches directory
Nobetter-auth-security-best-practices ≠ security. Installed as better-auth-security-best-practices.
Name uses lowercase letters, digits and hyphens
Yes
Description length
322limit 1,024 characters
SKILL.md body
429 linesthe spec suggests under 500 lines
Fields outside the spec
None
License field
None declared
License file
None declared
Repository license
None declared

Change history

No changes recorded since the first snapshot on 2026-11-28.

Follow changes to this skill in a feed reader: Atom feed · all skills

Get an email when this skill changes

Email alerts are not built yet. Leave your address and we will write to you once, when they are. The feed above works today.

We store your address, the name of this skill and the date. It is used for nothing else.