verify-auth

Verify backend controllers enforce server-side authentication and authorization patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/junnv93/equipment_management_system --skill verify-auth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: verify-auth
Source: https://github.com/junnv93/equipment_management_system/tree/main/.claude/skills/verify-auth
Command: npx skills add https://github.com/junnv93/equipment_management_system --skill verify-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Verifies that backend controllers comply with server-side authentication and authorization rules to prevent security gaps and insecure patterns.

Core Features & Use Cases

  • Enforces extraction of userId from req.user.userId (no body userId) and ensures DTOs do not define userId fields for state-changing operations.
  • Ensures protected endpoints use a Permission Guard such as @RequirePermissions and that modifications trigger an audit log with @AuditLog.
  • Flags and guides proper use of @Public on endpoints that do not require authentication, and documents related references for auditing checks.

Quick Start

Run verify-auth after adding or modifying controller endpoints to validate authentication and authorization patterns.

Frequently Asked Questions about verify-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce server-side authentication patterns in NestJS controllers?▼

To enforce server-side authentication patterns in NestJS controllers, verify that endpoints extract userId via req.user.userId, apply permission checks using guards like @RequirePermissions, and trigger @AuditLog for state-changing operations.

Why should userId not be included in the request body for backend authorization?▼

UserId should not be included in the request body for backend authorization because state-changing operations must extract it securely from req.user.userId on the server side, adhering to SSOT principles and preventing insecure client-side data manipulation.

What is the best way to verify backend permission guards and audit logs are applied correctly?▼

The best way to verify backend permission guards and audit logs is to validate that protected endpoints use a Permission Guard such as @RequirePermissions and that all modifications trigger an audit log with the @AuditLog decorator.

When do I need to use the @Public decorator for backend endpoints?▼

You need to use the @Public decorator for backend endpoints that do not require authentication, explicitly flagging them to bypass permission checks while documenting related references for auditing compliance.

Does verify-auth work with existing backend controllers to prevent security gaps?▼

Yes, verify-auth works with existing or newly updated backend controllers to identify and enforce server-side authentication and authorization rules, preventing security gaps and insecure patterns.