standard-security-auth
Security & Authentication Specialist - Expert in JWT, cookie-based auth, MFA, and generic security patterns
Skill by salavender
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/salavender-standard-security-auth
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/standard-security-auth
What's inside
- Skill name
standard-security-auth- Description
- Security & Authentication Specialist - Expert in JWT, cookie-based auth, MFA, and generic security patterns
- License
- MIT
- Instructions
- 118 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Security & Authentication Specialist
## Overview
An expert agent specializing in the project's authentication system, security patterns, and API integration. This agent understands JWT, cookie-based, and multi-factor authentication flows, as well as proxy architectures for secure backend communication.
## When To Use
- **Authentication Implementation**: When implementing or modifying auth flows
- **Security Review**: When reviewing code for security vulnerabilities
- **API Integration**: When connecting new features to the auth system
- **MFA/Role-based Logic**: When working with multi-factor authentication or role-based access
- **Audit Compliance**: When ensuring code follows audit logging requirements
## Instrumentation
```bash
# Log usage when using this skill
./scripts/log-skill.sh "standard-security-auth" "manual" "$$"
```
## What do you want to do?
1. **Implement Authentication Flow** → See "Auth Flow Patterns" below
2. **Review Security Vulnerabilities** → See "Security Checklist" below
3. **Connect API to Auth System** → See "API Integration" below
4. **MFA/Role-based Access** → See "Role Management" below
5. **Audit & Compliance** → See "Audit Patterns" below
---
## Auth Flow Patterns
### Cookie-Based Authentication
- Use the standard API client for calls that require authentication
- Never manually attach Authorization headers in cookie mode
- The middleware automatically handles JWT validation and refresh
- Session state is maintained in a centralized `AuthContext`
### JWT Token Management
- Tokens are stored in HttpOnly cookies for security
- Middleware handles proactive refresh before expiration
- Multi-Factor Authentication (MFA) sessions require secondary verification
- Role-based access is enforced at both middleware and component levels
---
## Security Checklist
### Critical Security Checks
- [ ] All API calls use the canonical API client
- [ ] No hardcoded API URLs or fallbacks (use environment variables)
- [ ] Middleware route protection is properly configured
- [ ] Role-based access control is enforced at both frontend and backend
- [ ] No sensitive data is stored in unencrypted local storage
- [ ] Content Security Policy (CSP) headers are properly applied
---
## API Integration
### Proxy Architecture
The application uses a Backend for Frontend (BFF) proxy pattern:
```typescript
// Correct way to make authenticated API calls
import { fetchWithAuth } from '@/lib/apiClient';
const response = await fetchWithAuth('/api/resource/data');
```
---
## Role Management
### Role Definitions
- `admin`: Full administrative access, typically requires MFA
- `user`: Standard access to personal/assigned resources
### Route Protection
Routes are typically configured in `middleware.ts`:
- Public routes: Login, callback, and landing pages
- Protected routes: Administrative and user dashboard routes
---
## Audit Patterns
### Security Event Logging
All security-relevant events must be logged:
- Token refresh events
- Login/logout success and failure
- Role access violations
- Critical data modifications
---
## Common Pitfalls & Solutions
### Pitfall: Guest State Handling
- ❌ **WRONG**: Auth status endpoint returns 401 for unauthenticated users (causes browser noise)
- ✅ **CORRECT**: Auth status endpoint returns 200 with `{ authenticated: false }`
### Pitfall: Duplicate API Calls
- ❌ **WRONG**: Session initialization called multiple times outside of controlled effects
- ✅ **CORRECT**: Use controlled effects with proper guards to prevent duplicate calls
---
## Troubleshooting
### Debugging Authentication Issues
1. Check browser cookies for valid auth tokens
2. Verify the token is a properly formatted JWT
3. Check middleware logs for route protection decisions
4. Confirm user role matches expected access levelFrom salavender/antigravity-compound-engineering-plugin, MIT.
More from salavender/antigravity-compound-engineering-plugin
- 0.497score
git-workflow
salavender
Standardized patterns for Git branching, worktrees, and lifecycle management.
SkillDFreshness: D★ 48Claude Code +9 - 0.497score
react-hooks
salavender
Resolves React hook violations (rules of hooks, useEffect dependencies, hook ordering).
SkillDFreshness: D★ 48Claude Code +9 - 0.492score
mobile
salavender
Expertise in mobile responsiveness, specifically table patterns and standard UI component styling.
SkillDFreshness: D★ 48Claude Code +9 - 0.337score
tracker-routing
salavender
No description from the publisher yet.
SkillBFreshness: B★ 48Claude Code +9
Signals
- Stars
- 48
- Forks
- 7
- Open issues
- 1
- Last commit (this folder)
- Dec 27, 2025 (10 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- thinkhaven.co
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.275score
standard-security-auth
hollandkevint
Security & Authentication Specialist - Expert in JWT, cookie-based auth, MFA, and generic security patterns
SkillDFreshness: D★ 5Claude Code +9 - 0.256score
standard-security-auth
minhcopilot
Security & Authentication Specialist - Expert in JWT, cookie-based auth, MFA, and generic security patterns
SkillDFreshness: D★ 1Claude Code +9 - 0.242score
standard-security-auth
rweebs
Security & Authentication Specialist - Expert in JWT, cookie-based auth, MFA, and generic security patterns
SkillDFreshness: DClaude Code +9
More from salavender
- 0.497score
git-workflow
salavender
Standardized patterns for Git branching, worktrees, and lifecycle management.
SkillDFreshness: D★ 48Claude Code +9 - 0.497score
react-hooks
salavender
Resolves React hook violations (rules of hooks, useEffect dependencies, hook ordering).
SkillDFreshness: D★ 48Claude Code +9 - 0.492score
mobile
salavender
Expertise in mobile responsiveness, specifically table patterns and standard UI component styling.
SkillDFreshness: D★ 48Claude Code +9
Cite this page
standard-security-auth skill. Agent Mart. https://agentmart.dev/skills/salavender-standard-security-auth (last updated 2026-10-24)