본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)48k · #4949

infinity

하는 일

이 도구는 프로그램 외부에서 들어오는 데이터가 사용되기 전에 검사되도록 합니다. 오류와 문제를 막는 보안 계층을 만듭니다.

사용하는 경우

  • ✓사용자에게서 정보를 받을 때.
  • ✓API나 파일 같은 외부 데이터를 사용할 때.
  • ✓변수로 프로그램을 설정하는 경우.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/infinity/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“사용하기 전에 모든 외부 데이터 입력을 검증해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

먼저 외부 데이터가 프로그램에 들어오는 지점을 찾습니다. 그다음 이 데이터를 신뢰할 수 있는 것과 신뢰할 수 없는 것으로 분류합니다. 마지막으로 신뢰할 수 없는 데이터가 사용되기 전에 올바른지 확인하는 검사를 적용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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: TRUSTED inputs may be used directly. SEMI-TRUSTED and UNTRUSTED inputs 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

…
자주 묻는 질문

데이터를 확인하는 것이 왜 중요한가요?

예상치 못한 데이터는 오류를 일으키거나 프로그램을 멈추게 하고, 심지어 보안 취약점을 만들 수도 있습니다.

'신뢰할 수 없는 데이터'란 무엇인가요?

사용자가 입력한 정보, 다른 API의 응답, 시스템 설정처럼 여러분이 직접 통제할 수 없는 곳에서 오는 데이터입니다.

데이터 검증에 실패하면 어떻게 되나요?

프로그램은 잘못된 데이터를 사용해 문제를 일으키는 대신, 오류를 명확하게 보고해야 합니다.

상세 정보

작성자의 원본 설명

Enforces a strict input boundary protocol (detect, classify, filter, verify) to ensure untrusted data never reaches business logic raw.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4949
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬