schema-shield

Validate JSON Schema objects without runtime code or remote references.

2|Updated Mar 23, 2023
One-click install
npx skills add https://github.com/Masquerade-Circus/schema-shield --skill schema-shield
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schema-shield
Source: https://github.com/Masquerade-Circus/schema-shield/tree/main
Command: npx skills add https://github.com/Masquerade-Circus/schema-shield --skill schema-shield

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SchemaShield provides a CSP-safe, zero-runtime-code validator for JSON Schema, designed to prevent prototype pollution and remote references, while ensuring predictable performance in strict environments.

Core Features & Use Cases

  • CSP-compliant, no eval or code generation, making it safe for strict environments and CSP policies.
  • Stack-safe, with a flat interpreter to prevent recursion-related stack overflows in deeply nested payloads.
  • Zero runtime dependencies and native support for runtime object validation (including class instances) with rich error reporting.
  • Edge/Serverless ready and suitable for Cloudflare Workers, Vercel Edge Functions, Deno, or Bun environments.
  • Immutable mode and configurable fail-fast behavior, plus extensibility via custom types, formats, and keywords.

Quick Start

Install SchemaShield, import it, and compile a schema with new SchemaShield().compile(schema) to validate data.

Frequently Asked Questions about schema-shield

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

FAQPage Schema
How do I validate JSON Schema safely in a CSP environment?

SchemaShield provides a CSP-safe, zero-runtime-code validator for JSON Schema, designed to prevent prototype pollution and remote references, while ensuring predictable performance in strict environments.

Can I use JSON Schema validation in Cloudflare Workers or Vercel Edge Functions?

Edge/Serverless ready and suitable for Cloudflare Workers, Vercel Edge Functions, Deno, or Bun environments.

How do I compile and validate data with a JSON Schema validator?

Install SchemaShield, import it, and compile a schema with new SchemaShield().compile(schema) to validate data.

Why does my JSON Schema validator cause stack overflows with deeply nested payloads?

Stack-safe, with a flat interpreter to prevent recursion-related stack overflows in deeply nested payloads.

How do I add custom types and formats to JSON Schema validation?

Immutable mode and configurable fail-fast behavior, plus extensibility via custom types, formats, and keywords.