web-platform-conventions

Enforce standardized web platform conventions for CSP headers and Next.js 16+ proxy.ts usage.

1|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/eric-sabe/engsys --skill web-platform-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-platform-conventions
Source: https://github.com/eric-sabe/engsys/tree/main/stacks/platform/web/skills/web-platform-conventions
Command: npx skills add https://github.com/eric-sabe/engsys --skill web-platform-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates security vulnerabilities and build errors caused by inconsistent web frontend configurations, including misconfigured Content-Security-Policy headers and deprecated Next.js middleware usage.

Core Features & Use Cases

  • Strict CSP Enforcement: Provides clear, security-first rules for CSP directives to prevent unauthorized network access, XSS attacks, and data exfiltration risks.
  • Next.js 16+ Edge Code Guidance: Eliminates build errors by mandating proxy.ts over deprecated middleware.ts for auth, redirects, and header logic.
  • Use Case: When integrating a third-party analytics tool into a Next.js web frontend, this Skill guides you to add the SDK's origin to the CSP connect-src directive correctly and implement any required auth redirects in proxy.ts instead of legacy middleware.

Quick Start

Use the web-platform-conventions skill to update the CSP script-src directive when adding a new third-party customer support chat SDK to the web frontend.

Frequently Asked Questions about web-platform-conventions

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

FAQPage Schema
How do I fix Next.js 16+ middleware build errors for auth and redirects?

Fix Next.js 16+ middleware build errors by migrating auth, redirects, and header logic from the deprecated middleware.ts to the mandated proxy.ts file for edge request handling.

How do I configure Content-Security-Policy headers when adding a third-party SDK to a web frontend?

Configure Content-Security-Policy headers for third-party SDKs by adding the SDK's network origin to the strict CSP connect-src or script-src directives to prevent XSS and data exfiltration risks.

What is the best way to enforce strict network origin gating in a Next.js application?

Enforce strict network origin gating in Next.js by applying security-first Content-Security-Policy rules that restrict unauthorized network access across all web frontend code and edge logic.

Why do I need to use proxy.ts instead of middleware.ts for edge code in Next.js 16?

Use proxy.ts instead of middleware.ts in Next.js 16+ because middleware is deprecated for edge code, and proxy.ts ensures consistent adherence for auth and redirect logic without build errors.

Does this approach support structured logging adherence across web platform code?

Yes, this approach supports structured logging adherence by standardizing web platform conventions across edge request handling, proxy.ts usage, and frontend security configurations.

Can I use proxy.ts for handling edge requests and header updates in a web frontend?

Yes, use proxy.ts for handling edge requests and header updates in a web frontend to eliminate deprecated middleware usage and maintain consistent Next.js 16+ build stability.