본문으로 건너뛰기
Skillpedia
일반 코딩29k · #9611

strict-api

하는 일

이 스킬은 AI가 사용하는 모든 함수, 가져오기, 메서드가 실행 중인 버전에 실제로 있는지 확인하게 합니다. 첫 시도에 동작하는 코드를 원하는 개발자에게 맞습니다.

사용하는 경우

  • ✓AI가 함수나 API를 지어내지 않기를 원한다고 말할 때.
  • ✓코드가 아직 확인되지 않은 라이브러리 버전에 의존할 때.
  • ✓비슷한 이름의 프레임워크가 있어서 서로 섞이지 않게 하고 싶을 때.

스킬 링크

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/strict-api/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“이 Express 코드를 작성해 주세요. 사용하는 모든 메서드가 우리 버전에 실제로 있는지 확인해 주세요.”

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

작동 방식

코드를 쓰기 전에, 코드가 사용할 각 API를 나열하고 설치된 버전에 존재하는지 확인합니다. 확인할 수 없는 것은 사용하지 않습니다.

기술 내용 (원본 SKILL.md)

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

Strict API Verification

Inventing a function that doesn't exist is the opposite of efficiency. You wrote a line that looks minimal. You shipped a bug that takes an hour to debug. The true minimal path is: use only what is provably there.

Overview

This skill is a reality-check layer applied before any code is written. It is not about being slow — it is about being correct the first time. Use it alongside minimalist when the user wants both less code and verified code.

The Only Rule

Before you write any function call, import, or method access, you must be able to answer:

"Does this exist in the version the user is running?"

If the answer is "probably" or "I think so" — stop. You don't know. Say so.

What This Blocks

Made-up methods:

  • fs.readFileLines() does not exist in Node.js.
  • path.combine() is .NET, not Node.js.
  • csv.read_csv() is pandas, not Python's csv module.

Writing these is not minimal code — it is confident garbage.

Framework confusion. Every framework has a twin that sounds like it:

  • render_template (Flask) vs render() (Django)
  • useForm() (react-hook-form) vs nothing built into React
  • app.listen() (Express) vs server.listen() (raw Node.js http)

Deprecated APIs. Writing a deprecated method is writing code that will break on the next upgrade.

Workflow

  1. Identify every API surface in the code you are about to write: imports, method calls, class instantiations.
  2. Verify each one against the user's stated version. If no version is stated, ask once.
  3. Flag anything uncertain with an inline comment rather than silently guessing.
  4. Prefer verbose-but-correct over terse-but-wrong.

When you are not sure if a method exists, annotate it inline:

// verify fs.openAsBlob exists in your Node.js version (>= 20.0)
const blob = await fs.openAsBlob(path);

One comment costs nothing. A silent wrong call costs an hour of the user's time.

If the uncertainty is too high to write correct code without guessing, say:

"I'd need to check whether X exists in version Y before using it. What version are you on?"

Anti-Patterns

Anti-Pattern What to do instead
Writing a method call you vaguely remember Stop and verify the exact signature
Silently using a deprecated API Use the current API and note the deprecation
Assuming API parity across frameworks Explicitly name the framework and version
Guessing import paths Check the package's actual export structure
Using an API from a different language's stdlib Verify it exists in this language
Writing "it should work" without checking Ask what version the user is on

Cross-References

  • Related: engineering/minimalist — use together: minimalist reduces code volume; strict-api ensures what is written is correct.
  • Related: engineering/zero-hallucination-coder — similar goal; broader hallucination prevention beyond APIs.
  • Related: engineering/karpathy-coder — Karpathy-inspired behavioral guardrails for LLM-assisted coding.
자주 묻는 질문

이 방식은 코드 작성을 느리게 만드나요?

확인 단계가 추가되지만, 나중에 고치는 데 더 오래 걸릴 버그를 줄이는 것이 목적입니다.

어떤 실수를 막나요?

지어낸 메서드, 혼동된 프레임워크 이름, 더 이상 쓰지 않는 호출을 막습니다.

코드를 적게 쓰는 스킬과 함께 쓸 수 있나요?

네. 더 적은 코드를 요구하는 스킬과 함께 사용할 수 있습니다.

상세 정보

작성자의 원본 설명

Use when the user says 'no hallucinations', 'verify APIs' or 'don't invent functions', or code depends on a library version you have not checked. Requires proof that every method, import and variable exists in the installed version before using it.

repo: alirezarezvani/claude-skills

인기도

GitHub 스타
29k
순위
#9611
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬