cloudflare-security-hardening

Configure WAF rules, rate limiting, IP lists, and secure headers for Cloudflare Workers APIs.

2|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/AgentiveCity/SkillFactory --skill cloudflare-security-hardening
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-security-hardening
Source: https://github.com/AgentiveCity/SkillFactory/tree/main/.claude/skills/cloudflare-security-hardening
Command: npx skills add https://github.com/AgentiveCity/SkillFactory --skill cloudflare-security-hardening

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Securing Cloudflare Workers/Pages APIs (e.g., Hono + TypeScript) against common threats requires careful configuration of WAF, rate limiting, IP restrictions, and secure headers. This can be complex and time-consuming to manage manually. This Skill automates and guides these critical security measures, ensuring a robust, production-ready security posture.

Core Features & Use Cases

  • Edge & App-Level Protections: Configure WAF-style protections, rate limiting, and IP allow/deny lists at both Cloudflare edge and application layers.
  • Secure Secrets & Headers: Ensure safe handling of secrets via Cloudflare Worker secrets and implement secure response headers.
  • CORS & Cookie Security: Design robust CORS policies and secure cookie settings for browser clients, preventing common vulnerabilities.

Quick Start

Harden security on my Hono API running on Cloudflare Workers, adding rate limiting and IP allowlists to sensitive routes.

Frequently Asked Questions about cloudflare-security-hardening

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

FAQPage Schema
How do I add rate limiting to my Cloudflare Workers API?

Rate limiting on Cloudflare Workers can be implemented using KV, D1, or Durable Objects to track request counts per IP or user. This Skill configures edge and application-layer rate limiting for Hono APIs, blocking excess requests before they reach your backend.

Can I use WAF rules and IP allowlists with Cloudflare Workers?

Yes. This Skill applies WAF-style protections and IP allow/deny lists at both the Cloudflare edge and application layers. Edge rules execute first; application rules provide granular control over specific routes and endpoints.

What's the best way to secure API secrets in Cloudflare Workers?

Store secrets using Cloudflare Worker secrets, never hardcoded in your code. This Skill ensures secrets are injected at runtime and never exposed in logs, source, or responses, meeting production security standards.

How do I set up CORS and secure cookies for my Hono API on Cloudflare?

CORS and cookie security require careful header configuration to prevent cross-origin attacks. This Skill configures robust CORS policies and secure cookie settings (SameSite, HttpOnly, Secure flags) for browser-based clients.

Do I need separate configuration for edge and application-layer security?

A default-deny security posture benefits from layered protection. This Skill covers both edge protections (WAF, bot detection) and application-layer controls (rate limiting, IP restrictions, secure headers) for defense in depth.