security-prompts-controls

Generate secure web endpoints with built-in CSRF protection, rate limiting, input validation, XSS sanitization, and error handling templates.

15|1|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/harperaa/secure-claude-skills --skill security-prompts-controls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-prompts-controls
Source: https://github.com/harperaa/secure-claude-skills/tree/main/security-prompts/built-in-controls
Command: npx skills add https://github.com/harperaa/secure-claude-skills --skill security-prompts-controls

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the complexity of implementing secure web endpoints by providing pre-configured templates that leverage existing security utilities.

Core Features & Use Cases

  • Contact Forms: Implement secure public forms with CSRF protection, rate limiting, and XSS sanitization.
  • Authenticated Updates: Create endpoints where users can safely modify their own data with authentication and authorization.
  • Public APIs: Build read-only endpoints with query validation and rate limiting.
  • Use Case: Imagine you need a contact form for your website. Use this Skill to get a complete implementation with all security controls in 15-30 minutes.

Quick Start

Use the security-prompts-controls skill to implement a secure contact form with CSRF protection and rate limiting.

Frequently Asked Questions about security-prompts-controls

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

FAQPage Schema
How do I add CSRF protection and rate limiting to a contact form?

CSRF protection and rate limiting prevent unauthorized form submissions and abuse. This Skill provides pre-configured templates with withCsrf and withRateLimit controls that apply these defenses automatically to your form endpoint, blocking forged requests and excessive traffic without custom implementation.

What's the best way to validate user input and prevent XSS attacks on web forms?

Input validation and XSS sanitization stop malicious data from reaching your database and users' browsers. This Skill includes safeTextSchema and emailSchema validators plus XSS sanitization built into middleware, so form submissions are cleaned and validated before processing.

How do I secure an authenticated API endpoint where users update their own data?

Secure authenticated endpoints require authentication verification, input validation, and proper error handling. This Skill provides middleware composition patterns and validateRequest schemas to implement safe profile updates with authorization checks and controlled error responses.

Can I build a public read-only API endpoint with rate limiting and query validation?

Yes. Public read endpoints need query validation and rate limiting to prevent abuse. This Skill includes validateRequest and withRateLimit templates for building read-only endpoints that safely accept and validate incoming queries while protecting against overload.

How long does it take to implement a secure web endpoint from scratch?

With this Skill's pre-configured templates, secure endpoints for contact forms, authenticated updates, and public APIs take 15–30 minutes. The templates handle CSRF, rate limiting, input validation, and error handling, eliminating the need to build security controls manually.

What should I do if a form submission or API request fails—how do I handle errors securely?

Secure error handling avoids leaking sensitive information while helping with debugging. This Skill includes error-handling patterns that provide useful feedback to legitimate users without exposing system details, database errors, or stack traces to attackers.