production-code-audit – skill Bảo mật cho agent AI
Kiểm tra mã nguồn có phạm vi rõ ràng để tìm vấn đề bảo mật, tính đúng đắn và hiệu năng có bằng chứng; triển khai sửa lỗi có mục tiêu được ủy quyền và báo cáo kết quả xác thực cùng các khoảng trống sẵn sàng còn lại.
Cài skill production-code-audit bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/production-code-audit-1f843.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /production-code-audit – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/production-code-audit-1f843.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $production-code-audit – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/production-code-audit-1f843.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /production-code-audit – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/production-code-audit-1f843.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /production-code-audit – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Production Code Audit
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use This Skill
- Use when user says "make this production-ready"
- Use when user says "audit my codebase"
- Use when user says "make this professional/corporate-level"
- Use when user says "optimize everything"
- Use when user wants enterprise-grade quality
- Use when preparing for production deployment
- Use when code needs to meet corporate standards
Worked Example: Query Repair
For a request-controlled email used in a concatenated PostgreSQL query, trace the input and confirm the driver, then replace concatenation with its parameter-binding API:
// pg-compatible example; driver and database fixtures must be supplied.
const result = await db.query('SELECT id FROM users WHERE email = $1', [email]);Validate a normal match, no match and a synthetic quote-containing input. Record actual commands and results; do not assert the test passed from the snippet alone. If a credential was found, removing it from source does not revoke it: report rotation and history/artifact exposure to the authorized owner without copying the value.
Output Example (Illustrative Structure)
Scope: repository, base/head, files fully read, excluded/unavailable files.
Finding: path:line, trigger, observed behavior, impact and severity rationale.
Repair: minimal change and why it preserves the intended behavior.
Validation: command/environment/result, or explicitly not run with reason.
Remaining gaps: unsupported runtime, unreviewed deployment, external configuration.
Readiness: evidence available and specific unresolved criteria; no blanket certification.Any metrics must come from reproducible measurements with dataset, environment and baseline/head. Zero scanner findings does not mean zero vulnerabilities, and OWASP Top 10 is an awareness list rather than a “compliance” certificate. An audit request does not authorize deploying, provisioning telemetry/caches or contacting third parties.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- project-skill-audit – Kiểm tra một dự án và đề xuất các skill có giá trị cao nhất cần thêm mới hoặc cập nhật.
- protocol-reverse-engineering – Các kỹ thuật toàn diện để thu thập, phân tích và ghi lại tài liệu về giao thức mạng phục…
- pwn-chain – Đi từ reverse engineering đến exploit hoạt động được: quy trình pwn stack/heap/kernel…
- recon-scope-triage – Phân loại kết quả ASM/recon theo quyền sở hữu trước khi kiểm thử
- red-team-tools – Áp dụng các phương pháp và quy trình công cụ đã được chứng minh từ các nhà nghiên cứu…
- saas-security-posture – Kiểm tra và củng cố bảo mật cho bộ công cụ SaaS của bạn
- sast-configuration – Thiết lập, cấu hình công cụ SAST (Static Application Security Testing) và tạo quy tắc…
- sast-scanning – Thực hiện kiểm thử bảo mật ứng dụng tĩnh bằng các công cụ như Semgrep, CodeQL và…