本文へスキップ
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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/alirezarezvani/claude-skills/blob/main/engineering/strict-api/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に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

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル