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 skills add davidteren/hotwire-codex-skills --skill rails-token-authgit clone --depth 1 https://github.com/davidteren/hotwire-codex-skillsWrote 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/davidteren/hotwire-codex-skills/rails-token-auth)<a href="https://agentmods.dev/skills/davidteren/hotwire-codex-skills/rails-token-auth"><img src="https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/rails-token-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.
<a href="https://agentmods.dev/skills/davidteren/hotwire-codex-skills/rails-token-auth"><img src="https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/rails-token-auth.svg" alt="Reviewed on agentmods" width="80" 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.00110 | $0.00840 |
| Opus 5.5 | $0.00044 | $0.00336 |
| Sonnet 5.5 | $0.00022 | $0.00168 |
| Haiku 4.5 | $0.00011 | $0.00084 |
Grade A, and why
rails-token-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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rails token-backed session auth
A revocable, DB-backed session model (AppSession) that authenticates web and
native clients with one mechanism — plus Current attributes and secure-by-default
controller concerns. Built without a gem (plain has_secure_password +
authenticate_by). Full design + rationale: references/token-auth-guide.md.
When to use
- Adding login/logout to a Rails app and you want it done securely from the start.
- Web + Hotwire Native (and Action Cable) need to share one auth.
- You need revocable sessions (real logout, kick a device) — not stateless JWTs.
- Auditing existing auth for the expensive mistakes.
The shape
| File | Role |
|---|---|
AppSession (app/models/app_session.rb) |
one row per login; token stored as a digest (has_secure_password :token) |
User::Authentication (app/models/user/authentication.rb) |
has_secure_password; authenticate_by login; mint/verify sessions |
Current (app/models/current.rb) |
request-scoped user / app_session / organization |
Authenticate (app/controllers/concerns/authenticate.rb) |
secure-by-default before_action; skip_authentication / allow_unauthenticated; log_in/log_out |
SessionsController |
create_app_session → log_in; destroy → log_out |
Copy the templates from templates/ (they're generic, ready to adapt). Add the
migration (app_sessions: user ref + token_digest), the routes
(login/logout), and include User::Authentication + include Authenticate in
ApplicationController.
The non-negotiables (why this design)
authenticate_by, notfind_by(email:)&.authenticate— timing-safe, no account enumeration.- Token hashed at rest (
has_secure_password :token) — plaintext token lives only in the encrypted cookie. A DB leak yields no usable sessions. cookies.encryptedfor the session payload — confidential + tamper-proof.- Secure-by-default: global
before_action :authenticate; public actions opt out explicitly. A forgotten controller stays locked. - Real logout destroys the
AppSessionrow — server-side revocation.
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.
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.
- 3mo ago First seen · 64 lines · 110 tokens per session scan A 072456ea0752
rails-token-auth is a skill published in the GitHub repository davidteren/hotwire-codex-skills (3 stars, last pushed 5mo ago), licensed MIT. It adds 110 tokens to every session and 840 once invoked, about $0.0004 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-31.
rails-token-auth compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rails-token-authdavidteren/hotwire-codex-skills | Skill | 3 | 5mo ago | MIT | A | 110 | Claude Code |
| add-server-logicmicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 83 | Claude Code |
| integrate-webapimicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 105 | Claude Code |
| add-cloud-flowmicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 91 | Claude Code |
| integrate-backendmicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 86 | Claude Code |
| migrate-webapi-selectallmicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 141 | Claude Code |
| generate-codeful-mcp-toolmicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 71 | Claude Code |