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 tmj-90/gaffer --skill auth-session-and-oauthgit clone --depth 1 https://github.com/tmj-90/gafferWrote 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/tmj-90/gaffer/auth-session-and-oauth)<a href="https://agentmods.dev/skills/tmj-90/gaffer/auth-session-and-oauth"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/auth-session-and-oauth/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/tmj-90/gaffer/auth-session-and-oauth"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/auth-session-and-oauth.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.00101 | $0.02017 |
| Opus 5.5 | $0.00040 | $0.00807 |
| Sonnet 5.5 | $0.00020 | $0.00403 |
| Haiku 4.5 | $0.00010 | $0.00202 |
Grade A, and why
auth-session-and-oauth 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 16d 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 — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Implement authentication correctly
A small mistake in authentication is a full account takeover. Use the repo's mature
library, follow the protocol as specified, and make every credential expire, rotate and
revoke (ASVS 5.0 V6/V7/V9/V10; NIST SP 800-63B-4; RFC 9700; OWASP cheat sheets). What
a logged-in user may do is the security-authz skill.
Procedure
- Use the repo's auth stack. Find the library and session store in use
(Auth.js, Passport, Spring Security, Devise, ASP.NET Identity, an OIDC client) and
call
search_lore. Never write your own hashing, token format or OAuth flow. If the repo has no library and the ticket needs one, raiserequest_decisionwith a recommendation andmark_ticket_blockednaming the dependency. Never install it yourself: the safety hook blocks installs. - Passwords (only if the ticket touches them):
- Hash with Argon2id (at least m=19 MiB, t=2, p=1). Otherwise use scrypt (N=2^17, r=8, p=1), or bcrypt with cost ≥10, which ignores input past 72 bytes: reject longer input rather than silently truncating. Use PBKDF2-HMAC-SHA256 at 600,000 iterations or more only where FIPS requires it.
- Rehash on login when the parameters are outdated.
- Policy: minimum 15 characters with password as the only factor (8 if MFA is enforced), allow at least 64, no composition rules, no periodic expiry, accept paste and Unicode, and check against a breached or common-password list. Verify the password exactly as typed (ASVS 6.2).
- Throttle failures per account and per IP through the
rate-limitingskill, failing closed.
- No enumeration. Login, registration and reset return the same body, status and roughly the same timing whether or not the account exists. When no user is found, verify against a dummy hash (ASVS 6.3.8).
- Sessions and cookies (ASVS V7):
- Opaque server-side id, ≥128 bits from a CSPRNG, in a
__Host-cookie withSecure; HttpOnly; SameSite=Lax(orStrict) andPath=/. - Regenerate the id on login, re-authentication and privilege change (fixation).
- Server-enforced idle and absolute timeouts. Logout deletes the session server-side; disabling an account kills all its sessions.
- Changing email, phone or MFA requires re-authentication. Cookie-session writes need CSRF protection (SameSite plus a token or Origin check).
- Opaque server-side id, ≥128 bits from a CSPRNG, in a
- JWTs, if the repo uses them (ASVS V9):
- Allow-listed algorithm only: never
none, never taken from the header, no HS/RS mixing. Keys only from configured issuers; ignorejku,x5u,jwk. - Check
exp,nbf,iss,audand the token type (an ID token is not an access token). Short-lived; revocation needs ajtidenylist or a server session. - No personal data in the payload. For browser SPAs prefer a backend-for-frontend so tokens never reach JavaScript storage (ASVS 10.1.1).
- Allow-listed algorithm only: never
- OAuth / OIDC client (RFC 9700):
- Authorization-code flow with PKCE
S256for every client type; never implicit or the password grant. Exact-match registered redirect URIs. - Bind
stateandnonceto the user-agent session and verify them on callback. With more than one provider, validate theissresponse parameter (RFC 9207). - Validate the ID token's signature,
iss,aud == client_id,exp,nonce. - Identify the user by
(iss, sub), never by email. Auto-linking an existing account by email is a takeover path: raiserequest_decision. - Minimal scopes, no tokens in URLs, post-login
returnTorelative or allow-listed.
- Authorization-code flow with PKCE
- Refresh tokens: rotate on every use and give them an absolute expiry. Reuse of a rotated token revokes the whole token family. Define and test what happens when two tabs refresh at the same moment: one wins, or both succeed inside a short grace window. A lost race must not log the user out silently, and must not let a stolen token keep working.
- Password reset, email verification and magic links:
- ≥128-bit CSPRNG tokens stored hashed (SHA-256 is enough), short-lived (codes ≤10 minutes).
- Single use, enforced atomically:
UPDATE … SET used_at = now() WHERE token_hash = ? AND used_at IS NULL AND expires_at > now()and check that exactly one row changed. - Build the link from the configured canonical origin, never the
Hostheader;Referrer-Policy: no-referreron the reset page. A reset ends other sessions.
- API keys: generate from a CSPRNG with an identifying prefix, show once, store a hash, scope to a capability, allow revocation, record last use, and attribute every write to the key.
- Log security events (the
structured-logging-and-tracingskill) with OWASP vocabulary names (authn_login_fail,authn_token_reuse,session_logout, …). Never log a password, token, cookie or reset link. - Test every negative through the real endpoint. Cover:
- wrong password, unknown user (same response), expired session, logout then reuse of the old cookie;
- a session id that does not change on login (must fail the test);
- a JWT with
alg: none, a JWT signed with the wrong key, a wrongaud, an expired token; - a replayed or missing
state, a mismatchednonce, a non-registeredredirect_uri; - a reused reset token, two concurrent redemptions of one reset token (exactly one succeeds), and concurrent refresh-token use;
- a disabled account's live session.
Record the command and summary as
test_outputthrough therecord-evidenceskill, then stop.
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.
- 16d ago Changed · +57 lines d36c3f9c8fce
- 19d ago First seen · 73 lines · 101 tokens per session scan A 58c1d5db6d73
auth-session-and-oauth is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 101 tokens to every session and 2,017 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-09-28.
Other skills, from other repositories
bulwark-brainstorm
Role-based brainstorming with dual modes: --scoped (sequential Task tool, 5 roles) and --exploratory (Agent Teams peer debate, 4 roles). Use for feasibility assessment and idea validation.
plan-creation
Create structured implementation plans via a 4-role scrum team (Product Owner, Architect, Eng/Delivery Lead, QA/Critic) with optional Agent Teams peer debate mode.
anthropic-validator
Validates Claude Code assets (skills, hooks, agents, commands, MCP servers, plugins) against official Anthropic standards. Fetches latest docs dynamically and produces structured validation reports.
create-subagent
Generates single-purpose Claude Code sub-agents for use via the Task tool. Use when creating dedicated sub-agents, scaffolding agent definitions, or generating agents with diagnostics and permissions setup.
test-audit
Audit test suites for T1-T4 violations using AST analysis, mock detection, and multi-stage synthesis. Invoke when user asks to audit tests, check test quality, find mock violations, review test effectiveness, or inspect test suites for over-mocking. Triggers automatic rewrites when quality gates fail.
code-review
Comprehensive code review with distinct aspect based sections. Use when reviewing code, checking for security issues, finding type safety problems, auditing code quality, or when user asks to review code, PRs or changes. Three-phase workflow runs static tools, LLM judgment, and writes diagnostic log.