strict-api

Verifies that every function call, import, and method exists in the user's installed version before writing code.

25.3k|3.6k|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/alirezarezvani/claude-skills --skill strict-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strict-api
Source: https://github.com/alirezarezvani/claude-skills/tree/main/engineering/strict-api
Command: npx skills add https://github.com/alirezarezvani/claude-skills --skill strict-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI coding agents often invent methods, confuse framework APIs, or use deprecated functions, producing code that looks correct but fails at runtime. This Skill forces verification of every API call against the user's actual installed version before any code is written.

Core Features & Use Cases

  • API Existence Checks: Blocks made-up methods like fs.readFileLines() or csv.read_csv() by requiring proof that each call exists in the target version.
  • Framework Confusion Prevention: Distinguishes lookalike APIs such as Flask's render_template versus Django's render().
  • Deprecation Guardrails: Flags deprecated APIs and inline uncertainty comments instead of silently guessing.
  • Use Case: When asking an agent to write a Node.js file-processing script, the agent verifies each fs method against your Node version and asks which version you run rather than guessing.

Quick Start

Ask the agent to write code with strict API verification so it only uses functions that provably exist in your installed version.

Frequently Asked Questions about strict-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop an AI coding agent from inventing functions?

Apply a verification rule requiring the agent to confirm every function call, import, and method exists in your installed version before writing it. Uncertain APIs get inline comments, and the agent asks for your version instead of guessing.

How to avoid framework API confusion like Flask vs Django?

Explicitly name the framework and version before generating code, since lookalike APIs such as Flask's render_template and Django's render are a common hallucination source. The agent verifies each call against that specific framework.

Does strict API verification work with any programming language?

Yes, the verification rule is language-agnostic and applies to Node.js, Python, and any framework. It blocks cross-language mistakes like using .NET's path.combine in Node.js or pandas-style calls in Python's csv module.

What happens when the agent is unsure an API exists?

The agent adds an inline comment noting the version requirement, such as verifying fs.openAsBlob needs Node.js 20 or later. If uncertainty is too high, it asks what version you are running instead of writing a guess.

When should I not use strict API verification?

It adds verification overhead, so it is less necessary for throwaway prototypes where runtime errors are cheap to catch. It is most valuable for production code where a wrong API call costs significant debugging time.