infinity
Skill này làm gì
Công cụ này đảm bảo dữ liệu đến từ bên ngoài chương trình của bạn được kiểm tra trước khi sử dụng. Nó tạo ra một lớp bảo mật để ngăn ngừa lỗi và sự cố.
Khi nào nên dùng
- ✓Khi nhận thông tin từ người dùng.
- ✓Khi dùng dữ liệu từ các nguồn bên ngoài khác (API, file).
- ✓Khi cấu hình chương trình của bạn bằng các biến.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/infinity/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra tất cả dữ liệu đầu vào từ bên ngoài trước khi sử dụng.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Trước hết, công cụ xác định dữ liệu bên ngoài đi vào chương trình ở đâu. Sau đó, nó phân loại dữ liệu này là đáng tin cậy hoặc không đáng tin cậy. Cuối cùng, nó áp dụng các kiểm tra để đảm bảo dữ liệu không đáng tin cậy là đúng trước khi được sử dụng.
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.
infinity — Input Boundary & Validation Protocol
Core Philosophy
Nothing untrusted ever reaches the core — it is stopped before contact. No external data touches the codebase raw. Every boundary where data enters the system must have a filter.
The #1 source of silent bugs, crashes, and vulnerabilities is external data that arrives in an unexpected shape and gets used directly without checking. This skill enforces a filter layer at every entry point, every time.
When to Use This Skill
- Use when you need to handle an API response
- Use when reading user input or adding a form handler
- Use when working with environment variables or CLI arguments
- Use when parsing webhooks or reading from the filesystem
- Use when any code calls
.body,.params,.query,.env,fs.read, or a third-party SDK response
The Four Phases
PHASE 1 — Boundary Detection
Before writing or modifying any code that involves external data, the AI must identify and list every entry point in scope:
- HTTP request bodies, headers, query params
- User form inputs and UI-submitted data
- Environment variables and config files
- Third-party API responses
- Webhook payloads
- File reads from disk
- CLI arguments
- Database query results from external sources
- WebSocket messages
The AI must not write any data-handling logic until every entry point in scope is listed.
PHASE 2 — Classify Each Input
For every entry point identified, the AI classifies it into one of three trust levels:
| Level | Definition | Examples |
|---|---|---|
TRUSTED |
Internal constants, hardcoded values, your own compile-time config | Enum values, hardcoded defaults, internal constants |
SEMI-TRUSTED |
Your own internal services, internal APIs, controlled infrastructure | Internal microservice responses, your own database reads |
UNTRUSTED |
Anything from users, the internet, third parties, or the filesystem | User input, external API responses, uploaded files, env vars, CLI args |
Rule:
TRUSTEDinputs may be used directly.SEMI-TRUSTEDandUNTRUSTEDinputs must pass through a filter layer before any use.
The AI outputs this classification before writing any handling code:
INFINITY — BOUNDARY MAP
─────────────────────────────────────────
Entry Point | Trust Level | Filter Required
─────────────────────────────────────────
req.body.email | UNTRUSTED | ✓ format + sanitize
process.env.API_KEY | UNTRUSTED | ✓ presence + non-empty
internalService.getData()| SEMI-TRUSTED | ✓ schema validate
PAGINATION_LIMIT = 20 | TRUSTED | ✗ none needed
─────────────────────────────────────────
PHASE 3 — Mandatory Filter Layer
Every UNTRUSTED and SEMI-TRUSTED input must pass through validation before it reaches any business logic, storage, or rendering. The AI must apply the right filter type for the right context:
Type Checking
- Verify the input is the expected type before using it
- Never assume a string is a string, a number is a number, or an array is an array
Schema Validation
- For objects and API responses, validate shape before accessing nested fields
- If a required field is missing, reject — do not use a fallback that hides the problem
Sanitization
- Strip or escape content before rendering to UI (prevent XSS)
- Normalize strings before storage (trim whitespace, consistent casing where appropriate)
Presence & Format Checks
- Env vars: must exist and be non-empty before use
- IDs and tokens: must match expected format before use
Rejection Rule
- On invalid input: reject explicitly and return a clear error
- Never silently use bad data with a fallback
- Never let bad data pass through to fix itself "downstream"
// WRONG — using raw input directly
const user = await db.find(req.params.id);
// RIGHT — validate before use
const id = req.params.id;
if (!id || typeof id !== 'string' || !isValidUUID(id)) {
return res.status(400).json({ error: 'Invalid ID format' });
}
const user = await db.find(id);
PHASE 4 — Self-Check Before Done
Before the AI declares any data-handling code complete, it traces each entry point and confirms:
INFINITY — VERIFICATION
─────────────────────────────────────────
Entry Point | Filter Exists | Filter Type
─────────────────────────────────────────
req.body.email | ✓ YES | format + sanitize
…
Câu hỏi thường gặp
Tại sao cần kiểm tra dữ liệu?
Dữ liệu không mong đợi có thể gây lỗi, làm chương trình bị treo hoặc thậm chí tạo ra lỗ hổng bảo mật.
“Dữ liệu không đáng tin cậy” là gì?
Đó là dữ liệu đến từ bên ngoài sự kiểm soát trực tiếp của bạn, như thông tin người dùng nhập, phản hồi từ các API khác hoặc cấu hình hệ thống.
Điều gì xảy ra nếu dữ liệu không qua được kiểm tra?
Chương trình nên báo lỗi rõ ràng, thay vì cố dùng dữ liệu sai và gây ra vấn đề.
Chi tiết
Mô tả gốc của tác giả
Enforces a strict input boundary protocol (detect, classify, filter, verify) to ensure untrusted data never reaches business logic raw.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #4949
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.