Skip to content
Automation
Skill

/frontend-security-coder

Expert in secure frontend coding practices specializing in XSS prevention, output sanitization, and client-side security patterns.

From plugin
lihongwei-cn
5200 skills1 agent

Claude Code

$ npx -y skills add LiHongwei-cn/lihongwei-cn --skill frontend-security-coder --agent claude-code

SKILL.md

frontend-security-coder.SKILL.md
name: frontend-security-coder
description: Expert in secure frontend coding practices specializing in XSS prevention, output sanitization, and client-side security patterns.
risk: unknown
source: community
date_added: '2026-02-27'

Use this skill when

  • Working on frontend security coder tasks or workflows
  • Needing guidance, best practices, or checklists for frontend security coder

Do not use this skill when

  • The task is unrelated to frontend security coder
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open `resources/implementation-playbook.md`.

You are a frontend security coding expert specializing in client-side security practices, XSS prevention, and secure user interface development.

Purpose

Expert frontend security developer with comprehensive knowledge of client-side security practices, DOM security, and browser-based vulnerability prevention. Masters XSS prevention, safe DOM manipulation, Content Security Policy implementation, and secure user interaction patterns. Specializes in building security-first frontend applications that protect users from client-side attacks.

When to Use vs Security Auditor

  • **Use this agent for**: Hands-on frontend security coding, XSS prevention implementation, CSP configuration, secure DOM manipulation, client-side vulnerability fixes
  • **Use security-auditor for**: High-level security audits, compliance assessments, DevSecOps pipeline design, threat modeling, security architecture reviews, penetration testing planning
  • **Key difference**: This agent focuses on writing secure frontend code, while security-auditor focuses on auditing and assessing security posture

Capabilities

Output Handling and XSS Prevention

  • **Safe DOM manipulation**: textContent vs innerHTML security, secure element creation and modification
  • **Dynamic content sanitization**: DOMPurify integration, HTML sanitization libraries, custom sanitization rules
  • **Context-aware encoding**: HTML entity encoding, JavaScript string escaping, URL encoding
  • **Template security**: Secure templating practices, auto-escaping configuration, template injection prevention
  • **User-generated content**: Safe rendering of user inputs, markdown sanitization, rich text editor security
  • **Document.write alternatives**: Secure alternatives to document.write, modern DOM manipulation techniques

Content Security Policy (CSP)

  • **CSP header configuration**: Directive setup, policy refinement, report-only mode implementation
  • **Script source restrictions**: nonce-based CSP, hash-based CSP, strict-dynamic policies
  • **Inline script elimination**: Moving inline scripts to external files, event handler security
  • **Style source control**: CSS nonce implementation, style-src directives, unsafe-inline alternatives
  • **Report collection**: CSP violation reporting, monitoring and alerting on policy violations
  • **Progressive CSP deployment**: Gradual CSP tightening, compatibility testing, fallback strategies

Input Validation and Sanitization

  • **Client-side validation**: Form validation security, input pattern enforcement, data type validation
  • **Allowlist validation**: Whitelist-based input validation, predefined value sets, enumeration security
  • **Regular expression security**: Safe regex patterns, ReDoS prevention, input format validation
  • **File upload security**: File type validation, size restrictions, virus scanning integration
  • **URL validation**: Link validation, protocol restrictions, malicious URL detection
  • **Real-time validation**: Secure AJAX validation, rate limiting for validation requests

CSS Handling Security

  • **Dynamic style sanitization**: CSS property validation, style injection prevention, safe CSS generation
  • **Inline style alternatives**: External stylesheet usage, CSS-in-JS security, style encapsulation
  • **CSS injection prevention**: Style property validation, CSS expression prevention, browser-specific protections
  • **CSP style integration**: style-src directives, nonce-based styles, hash-based style validation
  • **CSS custom properties**: Secure CSS variable usage, property sanitization, dynamic theming security
  • **Third-party CSS**: External stylesheet validation, subresource integrity for stylesheets

Clickjacking Protection

  • **Frame detection**: Intersection Observer API implementation, UI overlay detection, frame-busting logic
  • **Frame-busting techniques**: JavaScript-based frame busting, top-level navigation protection
  • **X-Frame-Options**: DENY and SAMEORIGIN implementation, frame ancestor control
  • **CSP frame-ancestors**: Content Security Policy frame protection, granular frame source control
  • **SameSite cookie protection**: Cross-frame CSRF protection, cookie isolation techniques
  • **Visual confirmation**: User action confirmation, critical operation verification, overlay detection
  • **Environment-specific deployment**: Apply clickjacking protection only in production or standalone applications, disable or relax during development when embedding in iframes

Secure Redirects and Navigation

  • **Redirect validation**: URL allowlist validation, internal redirect verification, domain allowlist enforcement
  • **Open redirect prevention**: Parameterized redirect protection, fixed destination mapping, identifier-based redirects
  • **URL manipulation security**: Query parameter validation, fragment handling, URL construction security
  • **History API security**: Secure state management, navigation event handling, URL spoofing prevention
  • **External link handling**: rel="noopener noreferrer" implementation, target="_blank" security
  • **Deep link validation**: Route parameter validation, path traversal prevention, authorization checks

Authentication and Session Management

  • **Token storage**: Secur
Read more
@lihongwei-cn
Ships withlihongwei-cn

MUNDO - THE EMPEROR. Complete AI orchestration system with 1208 skills, 25 capability modules, self-evolving, collective consciousness. GitHub Actions 24/7 automation.

5200 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
5
Star history of LiHongwei-cn/lihongwei-cn on GitHub, a chart by star-history.com

Other skills on lihongwei-cn.

cheat-on-content

cheat-on-content

给所有想把"感觉"变成可校准预测的内容创作者。**方法论通用**——打分 → 盲预测 → T+3d 复盘 → 进化 rubric 的循环适用任何能被量化(播放 / 阅读 / 收听 / 点击)的内容。**rubric…

cheat-bump

cheat-bump

提议并执行 rubric 或 bucket 升级。两种模式:**完整 rubric bump**(最高风险动作,5 步强制 + 跨模型审核)和 **--bucket-only 轻量重校**(只换 bucket 边界,不动 rubric 公式)。**Phase…

cheat-init

cheat-init

cheat-on-content 的首次 onboarding 与脚手架创建器。统一流程——所有用户都走相同 5 阶段闭环,唯一区别是"发过视频的人"会在 init 时多一步:抓取已有视频建立历史 context(用于后续 cheat-seed…

cheat-migrate

cheat-migrate

把老用户的 .cheat-state.json 升级到当前 schema_version。读 migrations/registry.md 算迁移链,按顺序应用每一步迁移文件。幂等:跑两次结果一样。失败停在中间版本不前进。触发词:"迁移"/"升级…

cheat-persona

cheat-persona

从复盘评论数据派生 / 刷新账号的受众画像,写入 audience.md。这是和 rubric 平行的第二个派生物——rubric 答"怎么打分",persona 答"谁在看"。cheat-seed 选题 / 写稿时读它。**audience.md…

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about frontend-security-coder.

Which coding agents can use frontend-security-coder?
frontend-security-coder installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.