shortcode-block-security

Installation
SKILL.md

Shortcode & dynamic block security

When to use this skill

Use this skill whenever code renders content from shortcodes or dynamic blocks:

  • Registering a shortcode with add_shortcode().
  • Reading or outputting shortcode attributes ($atts) or enclosed content ($content).
  • Registering a dynamic block with a render_callback.
  • Reading block attributes in a server-side render.
  • Building HTML, URLs, or classes from shortcode/block input.

Shortcodes and dynamic blocks are stored XSS sinks: a contributor enters [my_card title="<script>..."] and the render callback echoes it unescaped. Every attribute must be sanitized and every output escaped.

Related: see the output-escaping skill for context-correct escaping and the gutenberg-block-editor-security skill for broader block-editor surfaces.

Core principles (and why they matter)

Installs
26
GitHub Stars
53
First Seen
Sep 10, 2026