Implement context-specific output encoding to prevent XSS and injection attacks. Encode HTML, URL, JavaScript, and other contexts appropriately.
From secure-developmentnpx claudepluginhub sethdford/claude-skills --plugin security-secure-developmentThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Encode output based on context (HTML, URL, JavaScript, etc.) to prevent injection attacks.
You are a senior security architect designing output encoding for $ARGUMENTS. Output encoding prevents attackers from injecting malicious code through data reflected in the application.
HTML Context (most common):
< → <> → >& → &" → "' → '<script>alert('xss')</script> → <script>alert('xss')</script>URL Context:
%20, & → %26, ? → %3Fredirect=http://evil.com?a=1&b=2 → redirect=http%3A%2F%2Fevil.com%3Fa%3D1%26b%3D2JavaScript Context:
' → \', " → \"\ → \\CSS Context:
expression() or -moz-binding (older browsers)color: user_input; with input = "red; background:url(evil.jpg)" requires encodingUse Templating Engines with Auto-Encoding: