Chuyển đến nội dung
Skillpedia
Bảo mật48k · #4672

frontend-security-coder

Skill này làm gì

AI agent này giúp viết mã bảo mật cho phần giao diện hiển thị của website và ứng dụng (frontend). Trọng tâm là ngăn hacker thực thi mã độc thông qua trang của bạn, bảo vệ dữ liệu người dùng.

Khi nào nên dùng

  • ✓Khi tạo biểu mẫu nhận dữ liệu từ người dùng.
  • ✓Khi hiển thị nội dung từ nguồn bên ngoài hoặc từ chính người dùng.
  • ✓Khi thiết lập quy tắc kiểm soát nơi nội dung của website được tải về.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/frontend-security-coder/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/frontend-security-coder/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm thế nào để đảm bảo nội dung người dùng nhập vào biểu mẫu không gây ra vấn đề bảo mật?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Nó phân tích mã frontend của bạn và đề xuất cách làm cho mã an toàn hơn, như làm sạch dữ liệu nhận được và thiết lập phòng thủ chống các tấn công thường gặp.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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: Supplementary UI signals only; do not treat viewport observation as a frame authorization boundary
  • Frame-busting techniques: JavaScript-based frame busting, top-level navigation protection

…

Câu hỏi thường gặp

Khác nhau giữa agent này và một 'security auditor' là gì?

Agent này tập trung vào việc trực tiếp viết mã bảo mật, trong khi security auditor xem xét bảo mật tổng thể của một hệ thống.

XSS là gì?

XSS (Cross-Site Scripting) là một kiểu tấn công trong đó hacker chèn mã độc vào website của bạn để đánh cắp thông tin của người dùng khác.

CSP là gì?

CSP (Content Security Policy) là bộ quy tắc bạn đặt ra để nói cho trình duyệt biết nội dung của website (như script và hình ảnh) được phép tải từ đâu, giúp ngăn tấn công.

Chi tiết

Mô tả gốc của tác giả

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

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4672
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự