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 sawrus/agent-guides --skill auth-patternsgit clone --depth 1 https://github.com/sawrus/agent-guidesWrote 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/sawrus/agent-guides/auth-patterns)<a href="https://agentmods.dev/skills/sawrus/agent-guides/auth-patterns"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/auth-patterns/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/sawrus/agent-guides/auth-patterns"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/auth-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 17 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
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.00000 | $0.00298 |
| Opus 5 | $0.00000 | $0.00149 |
| Sonnet 5 | $0.00000 | $0.00060 |
| Haiku 4.5 | $0.00000 | $0.00030 |
Grade A, and why
auth-patterns 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 6d 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.
What it actually says
Skill: Authentication & Authorization Patterns
When to load
When implementing login, token management, OAuth integration, RBAC, or reviewing auth code.
JWT Best Practices
def create_access_token(user_id: str) -> str:
return jwt.encode(
payload={
"sub": user_id,
"iat": datetime.utcnow(),
"exp": datetime.utcnow() + timedelta(minutes=15), # Short expiry
"jti": str(uuid.uuid4()), # Unique ID for revocation
"type": "access", # Prevent refresh token as access token
},
key=settings.JWT_PRIVATE_KEY,
algorithm="RS256", # Asymmetric. Never HS256 in distributed systems.
)
Anti-patterns: No exp claim; storing JWT in localStorage; using alg: none; sensitive data in payload.
RBAC Pattern
PERMISSIONS = {
"invoices:read": ["viewer", "editor", "admin"],
"invoices:create": ["editor", "admin"],
"invoices:delete": ["admin"],
}
def require_permission(permission: str):
def dependency(current_user: User = Depends(get_current_user)):
allowed_roles = PERMISSIONS.get(permission, [])
if current_user.role not in allowed_roles:
raise HTTPException(status_code=403)
return current_user
return dependency
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.
- 6d ago First seen · 43 lines · 0 tokens per session scan A d582f7153df0
auth-patterns is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 298 tokens. 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-03.
Other skills, from other repositories
api-and-interface-design
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.
api-onboarding
Reduce time-to-first-API-call (TTFAC) by optimizing every step of the developer onboarding journey. This skill covers authentication simplification, sandbox environments, interactive documentation, and identifying and eliminating common failure points.
api-security-best-practices
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities.
apify-actor-development
Important: Before you begin, fill in the generatedBy property in the meta section of .actor/actor.json. Replace it with the tool and model you're currently using, such as "Claude Code with Claude Sonnet 4.5". This helps Apify monitor and improve AGENTS.md for specific AI tools and models.
aws-serverless-eda
AWS serverless and event-driven architecture expert based on Well-Architected Framework. Use when building serverless APIs, Lambda functions, REST APIs, microservices, or async workflows.
agentmail
Email infrastructure for AI agents. Create accounts, send/receive emails, manage webhooks, and check karma balance via the AgentMail API.