authn-sessions-and-tokens

authn-sessions-and-tokens is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 68 tokens per session (2,591 once invoked), scanned A, original, Apache-2.0.

Security guidance for checking passwords, login sessions, cookies, tokens, OAuth sign-ins, API keys, and other ways a server identifies a caller.

In plain words
What is it for?
Use it when changing authentication, password resets, session handling, JWT or OAuth verification, webhook signatures, or caller-identifying headers.
Why use it?
It helps prevent code from trusting attacker-controlled values or verifying a token with the wrong rules or key.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when changing authentication, password resets, session handling, JWT or OAuth verification, webhook signatures, or caller-identifying headers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/authn-sessions-and-tokens
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 makifbaysal/tasktrooper --skill authn-sessions-and-tokens
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

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 authn-sessions-and-tokens

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/authn-sessions-and-tokens/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/authn-sessions-and-tokens)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/authn-sessions-and-tokens"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/authn-sessions-and-tokens/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 authn-sessions-and-tokens

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/authn-sessions-and-tokens"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/authn-sessions-and-tokens.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,591 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.00068 $0.02591
Opus 5.5 $0.00027 $0.01036
Sonnet 5.5 $0.00014 $0.00518
Haiku 4.5 $0.00007 $0.00259

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

Security

Grade A, and why

authn-sessions-and-tokens 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.

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.

catalog/agents/security-agent/skills/authn-sessions-and-tokens/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Authentication, Sessions and Tokens

Overview

Authentication bugs are rarely missing code; they are code that verifies the wrong thing, verifies with the wrong key, or trusts a value the attacker sends. Read every check as "what exactly is compared to what, and who chose each side?"

Core principle: the server decides the algorithm, the key, the audience and the identity — never the token, the header or the client.

1. Password Storage (CWE-916)

  • ✅ argon2id, bcrypt (cost ≥ 10; note its 72-byte input limit), scrypt, or PBKDF2 with a high iteration count — through the framework's password hasher when there is one.
  • ❌ MD5, SHA-1, SHA-256/512 (single or few rounds, salted or not), or reversible encryption of passwords.
# ❌
user.password = hashlib.sha256(pw.encode()).hexdigest()
# ✅
user.password = argon2.PasswordHasher().hash(pw)   # or Django's make_password

2. JWT Verification (CWE-347)

// ❌ decode() does not verify; the header's alg is trusted
const claims = jwt.decode(token);
// ❌ no algorithm pinned: an RS256 public key can be used as an HS256 secret
const claims = jwt.verify(token, publicKey);
// ✅
const claims = jwt.verify(token, publicKey, { algorithms: ["RS256"], audience: "api", issuer: ISS });
# ❌
jwt.decode(token, options={"verify_signature": False})
# ✅
jwt.decode(token, key, algorithms=["RS256"], audience="api", issuer=ISS)

Also: alg: none accepted; exp/aud/iss not checked; the key chosen by a kid header used in a file path or SQL query; keys fetched from a token-supplied jku/x5u URL (SSRF and forged keys); a token accepted for a different audience than this service.

3. Sessions and Cookies

  • Fixation (CWE-384): the session id is not rotated at login or privilege change.
  • Logout and invalidation: a server-side session or refresh token that survives logout (only the cookie is cleared) — MEDIUM; sessions, refresh tokens and API tokens that survive a password change, an account disable or a role removal — HIGH when the old credential still writes.
  • Cookie scope: a session cookie with Domain=.example.com is sent to every subdomain — including one that serves user content or a third-party app; a sibling cookie with the same name and a broader path can shadow it.
  • Cookie flags: HttpOnly, Secure, SameSite missing is hardening — report only with a concrete chain (a session cookie readable by script on a page with a real XSS sink in this diff).
  • Token in localStorage: not a finding by itself; it raises the impact of an XSS.
  • Step skipping: an endpoint reachable after the password step but before MFA completes treats the half-authenticated session as full.

Read the full file on GitHub · 149 lines

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 Changed · +37 lines · +23 tokens per session 9412f498c878
  2. 1mo ago First seen · 112 lines · 45 tokens per session scan A 63c579841455

Subscribe to this mod's changes

authn-sessions-and-tokens is a skill published in the GitHub repository makifbaysal/tasktrooper (123 stars, last pushed today), licensed Apache-2.0. It adds 68 tokens to every session and 2,591 once invoked, about $0.0003 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-10-09.

Related

authn-sessions-and-tokens compared with skills from other repositories

authn-sessions-and-tokens next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
authn-sessions-and-tokensmakifbaysal/tasktrooperSkill123todayApache-2.0A68Claude Code, Codex
paperclip-create-agentpaperclipai/paperclipSkill118kyesterdayMITA44Claude Code, Codex
ramppaperclipai/paperclipSkill118kyesterdayMITA35Claude Code, Codex
paperclip-task-bridgepaperclipai/paperclipSkill118kyesterdayMITA27Claude Code, Codex
github-pr-workflowpaperclipai/paperclipSkill118kyesterdayMITA39Claude Code, Codex
agent-v3-memory-specialistruvnet/rufloSkill83ktodayMITA25Claude Code
agent-github-modesruvnet/rufloSkill83ktodayMITA21Claude Code