baliboy20/rome_framework/generate-authentication-middleware

Claude Code and agent skill by baliboy20/rome_framework

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install baliboy20/rome_framework/generate-authentication-middleware

SKILL.md

The same SKILL.md was published earlier as baliboy20/rome_framework/generate-authentication-middleware.

Generate Authentication Middleware

ID: generate-authentication-middleware Category: Backend & API Phase: P5 (Generation) Robot: Reena

Purpose

Generate authentication and authorization middleware from security requirements

Inputs

  • security-requirements.md (auth strategy, roles, permissions)
  • api-design.md (protected endpoints)
  • tech-stack.md (auth framework: JWT, OAuth, Passport, etc.)

Outputs

  • Authentication middleware (token validation)
  • Authorization middleware (role/permission checks)
  • Session management
  • Security utilities

Process

  1. Read security requirements for auth strategy
  2. Generate JWT/session validation middleware
  3. Create role-based access control (RBAC) middleware
  4. Generate permission checking utilities
  5. Implement secure session management
  6. Add CSRF protection if needed

Example Output

typescript
// SOURCE/middleware/authenticate.ts
import { Request, Response, NextFunction } from 'express';
import jwt from 'jsonwebtoken';
export interface AuthRequest extends Request {
user?: {
id: string;
email: string;
role: string;
};
}
export function authenticate(req: AuthRequest, res: Response, next: NextFunction) {
const token = req.headers.authorization?.replace('Bearer ', '');
if (!token) {
return res.status(401).json({ error: 'Authentication required' });
}
try {
const decoded = jwt.verify(token, process.env.JWT_SECRET!);
req.user = decoded as AuthRequest['user'];
next();
} catch (error) {
return res.status(401).json({ error: 'Invalid token' });
}
}
export function authorize(...allowedRoles: string[]) {
return (req: AuthRequest, res: Response, next: NextFunction) => {
if (!req.user) {
return res.status(401).json({ error: 'Authentication required' });
}
if (!allowedRoles.includes(req.user.role)) {
return res.status(403).json({ error: 'Insufficient permissions' });
}
next();
};
}

AORDL Traceability

  • Security Requirements → Middleware implementation
  • Role definitions → Authorization rules
  • Protected endpoints → Middleware application
  • AORDL Errors → Auth error responses

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/baliboy20/rome_framework/generate-authentication-middleware/badge)](https://verified-skill.com/skills/baliboy20/rome_framework/generate-authentication-middleware)

Something wrong with this skill or its page? Tell us.