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 | $0.00055 | $0.00420 |
| Sonnet 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 10d 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.
- 10d 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 2mo ago), licensed MIT. It adds 110 tokens to every session and 840 once invoked, about $0.0006 per session on Opus 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.
Other skills, from other repositories
add-server-logic
Creates, edits, and manages Power Pages Server Logic files — server-side JavaScript that runs securely on the Power Pages runtime. Orchestrates the full lifecycle: gathering requirements, fetching documentation, implementing code, configuring site settings, and deploying. Use when the user wants to add server-side…
integrate-webapi
Integrates Power Pages Web API into a site's frontend code with proper permissions and deployment. Orchestrates the full integration lifecycle: code integration, table permissions setup, and deployment for Dataverse CRUD operations. Use when the user wants to add Web API calls, connect to Dataverse, or add data…
add-cloud-flow
Integrates Power Automate cloud flows into a Power Pages site. Lists available flows, suggests relevant ones based on intent, identifies scenarios and web roles, creates metadata files, and generates client-side code to call flows. Handles both new flow registration and adding already-registered flows to additional…
integrate-backend
Analyzes the user's business problem and recommends the right backend integration approach — Web API, AI Web API (generative summaries / grounded search), Server Logic, Cloud Flows, or a combination — for a Power Pages site, then routes to the appropriate specialized skill. Use when the user wants to add backend…
migrate-webapi-selectall
Reviews and migrates deprecated wildcard () values in Power Pages Web API fields site settings to least-privilege explicit Dataverse columns. Use whenever a user mentions Web API wildcard or select-all remediation, fields settings containing , data-exposure review, wildcard deprecation readiness, or Web API failures…
add-sharepoint
Adds SharePoint Online connector to a Power Apps code app. Use when reading lists, managing documents, or integrating with SharePoint sites. Can also create new SharePoint lists.