security

Apply input validation, CSRF protection, and security headers to SaaS applications.

Updated Jan 26, 2026
One-click install
npx skills add https://github.com/theofernandezz/ai-library --skill security-theofernandezz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security
Source: https://github.com/theofernandezz/ai-library/tree/main/.opencode/skills/security
Command: npx skills add https://github.com/theofernandezz/ai-library --skill security-theofernandezz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Security vulnerabilities in SaaS applications expose users and data to risk. This Skill provides a structured set of patterns to enforce input validation, protect against XSS/CSRF, secure authentication, and enforce safe headers so teams can ship safer software.

Core Features & Use Cases

  • Input validation with centralized schemas to ensure data conforms before use.
  • Security headers and middleware to enforce policy, prevent clickjacking, and reduce response leakage.
  • CSRF protection for API routes and server actions to prevent cross-site requests.
  • Secure authentication and authorization patterns across backend and frontend boundaries, with role checks and server-side guards.
  • Rate limiting and secure cookie handling to mitigate abuse and protect session data.
  • Use cases include safeguarding admin dashboards, protecting user-submitted data, and hardening API endpoints.

Quick Start

Configure and apply the security patterns in your app by integrating the middleware and validation utilities shown in the examples to harden user input handling and protect sensitive routes.

Frequently Asked Questions about security

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

FAQPage Schema
How do I implement input validation and CSRF protection for SaaS API routes?

Secure authentication and authorization patterns are enforced through server-side guards and role checks across backend and frontend boundaries. These patterns verify user identity and permissions before granting access to sensitive routes or admin dashboards.

What's the best way to secure cookies and enforce rate limiting in a web application?

Secure cookie handling and rate limiting are enforced through server utilities and middleware to mitigate abuse and protect session data. This approach safeguards user sessions from hijacking and prevents brute-force attacks on authentication endpoints.

How do I prevent XSS and clickjacking vulnerabilities using security headers?

XSS and clickjacking vulnerabilities are prevented by applying hardened response headers via middleware to enforce security policies. These headers restrict frame embedding and control resource loading, reducing the risk of script injection and response leakage.

Does this security Skill apply to both client-facing and admin-facing components?

Yes, this security Skill applies to both client-facing and admin-facing components across backend services, API routes, and server actions. It covers forms, auth flows, and data exchange uniformly to protect all user-submitted data and sensitive interfaces.

Why do I need centralized schemas for input validation in my SaaS application?

Centralized schemas for input validation are needed to ensure data conforms to strict rules before processing in API routes or server actions. This prevents malformed or malicious payloads from reaching your application logic and database.