- Home
- Skills
- Code Quality & Review
- Hallucinated API Detector: Catch Calls That Don't Exist
Works with the AI Agents you already use
Hallucinated API Detector: Catch Calls That Don't Exist
Turn AI-written Python into code that calls real functions: checks every import, attribute and keyword argument against the library you actually installed.
$15
About this skill
Your agent writes requests.get(url, retry=3), df.append(row) or OneHotEncoder(sparse=False). It looks right, it passes review, and it fails at runtime because that API does not exist in the version you have installed.
Measured: on 21,318 references in unmodified scikit-learn, FastAPI and HTTPie code, 0 false BLOCKs (and the one BLOCK it raised was a real broken import). On 14 typical version-drift hallucinations it flagged all 14.
API Reality Check ships a script that reads the installed package source (site-packages, .pyi stubs, node_modules .d.ts) without importing or running it, and checks your code against it:
- Every call in the changed files: imported names, module attributes, methods, keyword arguments, positional argument counts, missing required arguments.
- Follows
**kwargsthrough the functions they are forwarded to, sorequests.get(url, retry=3)is caught throughSession.request. - Tells you the real API:
accepts: ...with the valid keywords,did you mean: sparse_output, and--show requests.Session.getprints the installed signature with file and line. - Honest verdicts: BLOCK = proven absent; WARN = absent but the library is partly dynamic; unverifiable (compiled, not installed) is counted, never guessed.
- Diff-aware: by default it checks only what changed;
--diff mainfor a branch. Finds the project's.venvautomatically, or--python <env>. - JS/TS: named imports from npm packages checked against their type declarations.
| Benchmark (pinned commits) | References | False BLOCK | False WARN |
|---|---|---|---|
| scikit-learn examples @ 1.8.0 | 14,575 | 0 | 0 |
| FastAPI docs_src @ 0.136.1 | 3,308 | 0 (1 real) | 0 |
| HTTPie cli | 3,435 | 0 | 3 |
Seeded hallucinations (removed in pandas 2.0, NumPy 1.24, scikit-learn 1.2-1.6, SQLAlchemy 2.0, pydantic 2, Matplotlib 3.9, plus invented keywords for requests and httpx): 10 BLOCK, 4 WARN, 0 missed.
What it does not do: it cannot check values whose type it cannot infer (untyped dicts, generics), so some wrong calls are missed rather than guessed. Runtime-generated APIs (boto3 clients, metaclass ORMs) are mostly unverifiable. It checks that an API exists and the call shape is legal, not that the logic is right. JS/TS covers named imports only.
Works in Claude Code, Cursor, Codex CLI, Copilot and any SKILL.md agent.
Privacy: read-only, no network, no telemetry. It never imports or executes your code or your libraries.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Python is checked fully; JS/TS is limited to named imports. Dynamic APIs like boto3 or Django managers are mostly unverifiable. Compiled modules require .pyi stubs.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 22 days ago
- Software
Git
Permissions
Allowed Hosts