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 agentmods add skills/darellchua2/opencode-config-template/authentication-authorization-skillnpx skills add darellchua2/opencode-config-template --skill authentication-authorization-skillgit clone --depth 1 https://github.com/darellchua2/opencode-config-templateWhat 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 | $0.00040 | $0.04877 |
| Opus 5 | $0.00020 | $0.02439 |
| Sonnet 5 | $0.00008 | $0.00975 |
| Haiku 4.5 | $0.00004 | $0.00488 |
Grade A, and why
authentication-authorization-skill 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 2d 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 — 617 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What I do
I help you implement secure authentication and authorization systems:
- OAuth2/OIDC: Authorization code, client credentials, PKCE flows
- JWT: Token creation, validation, rotation, and best practices
- Session Management: Secure session handling and storage
- RBAC/ABAC: Role-based and attribute-based access control
- Framework Integration: NextAuth/Auth.js, Passport.js, FastAPI security
- Password Security: Hashing, salting, and password policies
- CSRF Protection: Token-based and same-site cookie patterns
When to use me
Use this skill when:
- Implementing login/signup flows
- Setting up OAuth2 social login (Google, GitHub, etc.)
- Designing role-based access control
- Configuring JWT token management
- Integrating NextAuth/Auth.js or Passport.js
- Implementing API authentication middleware
- Setting up password hashing and verification
- Adding CSRF protection to forms
- Implementing multi-factor authentication
Related Skills
- security-audit-skill: Handles security auditing and vulnerability scanning. This skill handles auth implementation. CSRF here focuses on implementation patterns; security-audit focuses on detecting CSRF vulnerabilities.
- api-design-skill: API endpoint design. This skill handles authentication middleware for those endpoints.
- nextjs-standard-setup-skill: Project scaffolding that may include auth setup.
Step 1: OAuth2/OIDC Flows
Flow Selection
| Flow | Use Case | Client Type |
|---|---|---|
| Authorization Code + PKCE | SPAs, mobile apps | Public |
| Authorization Code | Server-side web apps | Confidential |
| Client Credentials | Service-to-service | Confidential |
| Device Code | CLI tools, IoT | Public |
Authorization Code + PKCE (Next.js)
import NextAuth from "next-auth"
import Google from "next-auth/providers/google"
export const { handlers, signIn, signOut, auth } = NextAuth({
providers: [
Google({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
}),
],
pages: {
signIn: "/login",
error: "/login",
},
callbacks: {
async jwt({ token, user }) {
if (user) {
token.id = user.id
token.role = user.role
}
return token
},
async session({ session, token }) {
session.user.id = token.id
session.user.role = token.role
return session
},
},
session: {
strategy: "jwt",
maxAge: 24 * 60 * 60,
},
})
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.
- 2d ago First seen · 617 lines · 40 tokens per session scan A 885bd401c00e
authentication-authorization-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 40 tokens to every session and 4,877 once invoked, about $0.0002 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
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…