원클릭으로
auth-middleware
Generates authentication and authorization middleware for Express/Fastify/Hono
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generates authentication and authorization middleware for Express/Fastify/Hono
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Analyzes the current session's token usage, pinpoints where tokens were wasted, and produces concrete optimization actions
Generates API documentation from route definitions (Express, Fastify, Hono, etc.)
Adds caching to expensive operations - Redis, in-memory, HTTP cache headers
Staged değişiklikleri analiz edip Conventional Commits formatında commit mesajı oluşturur
Reports cyclomatic complexity hotspots and refactoring suggestions
Finds unused functions, variables, exports, and dependencies across the codebase
| name | auth-middleware |
| description | Generates authentication and authorization middleware for Express/Fastify/Hono |
Strategy: $1 (jwt | session | api-key | oauth)
cat package.json | grep -E '"express"|"fastify"|"hono"|"jsonwebtoken"|"jose"|"passport"'
grep -rn "middleware\|authenticate\|authorize" src/ --include="*.ts" -l | head -5
Read existing auth code if present.
Generate the middleware for the requested strategy:
JWT example:
export async function authenticate(req: Request, res: Response, next: NextFunction) {
const token = req.headers.authorization?.split(' ')[1]
if (!token) return res.status(401).json({ error: 'Unauthorized' })
try {
const payload = await verifyJWT(token)
req.user = payload
next()
} catch {
return res.status(401).json({ error: 'Invalid token' })
}
}
export function authorize(...roles: Role[]) {
return (req: Request, res: Response, next: NextFunction) => {
if (!roles.includes(req.user?.role)) return res.status(403).json({ error: 'Forbidden' })
next()
}
}
Include:
Generate tests for all auth scenarios.