smart-prerequisites-check

A set of rules that checks the installed Node.js and FDK versions, then compares them with a project's manifest file before development work begins.

In plain words
What is it for?
Use it when working on projects that include a manifest file and depend on specific Node.js or FDK versions.
Why use it?
It helps catch incompatible tools or project settings before they cause errors during generation, migration, refactoring, or review.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/freshworks-developers/fw-dev-tools/smart-prerequisites-check
Clone the repo
git clone --depth 1 https://github.com/freshworks-developers/fw-dev-tools
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,691 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.02691
Opus 5 $0.00010 $0.01345
Sonnet 5 $0.00004 $0.00538
Haiku 4.5 $0.00002 $0.00269

Measured 3d ago against content hash 321920266970, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

smart-prerequisites-check scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf node_modules coverage .fdk
skills/fw-app-dev/rules/smart-prerequisites-check.mdc · 320 lines

How it starts

The opening of the file, as written. The whole thing — 320 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Smart Prerequisites Check — Migration-Aware

CRITICAL: Run this check BEFORE generating apps, fixing errors, migrating, refactoring, or reviewing.

Check Order

  1. Check current toolchain (Node + FDK versions)
  2. Check manifest.json (platform-version + engines) if present
  3. Apply smart routing logic based on the combination

Step 1: Check Toolchain

node --version 2>&1
fdk version 2>&1

Parse output:

  • NODE_MAJOR = extract major version (24, 18, etc.)
  • FDK_MAJOR = extract major version (10, 9, etc.)
  • NODE_FOUND = true if node --version succeeds
  • FDK_FOUND = true if fdk version succeeds

Step 2: Check Manifest (if present)

If working directory or user-specified directory contains manifest.json:

# Read manifest.json
cat manifest.json | grep -E '"platform-version"|"engines"' -A 2

Parse:

  • MANIFEST_PLATFORM = value of platform-version field ("2.3", "3.0", etc.)
  • MANIFEST_FDK = value of engines.fdk field
  • MANIFEST_NODE = value of engines.node field

Step 3: Smart Routing Logic

AUTOMATIC ROUTING - NO USER PROMPT: The skill automatically detects the state and takes the appropriate action. Three main scenarios:

Scenario Installed Toolchain Manifest State Automatic Action
A FDK 9.x or not found Platform 2.x Upgrade toolchain → Migrate → Validate
B FDK 10.x + Node 24.x Platform 2.x Migrate → Validate
C FDK 10.x + Node 24.x Platform 3.0 (engines match) Validate directly
D FDK 10.x + Node 24.x Platform 3.0 (engines mismatch) Update engines → Clean deps → Validate
E FDK 9.x or not found Platform 3.0 Upgrade toolchain → Validate

Detailed scenario logic:

Scenario A: Latest FDK NOT installed + Platform 2.x manifest

Conditions:

  • FDK_MAJOR != 10 (either 9 or not found)
  • MANIFEST_PLATFORM in ["2.3", "2.2", "2.1", missing, or < "3.0"]
  • MANIFEST_FDK starts with "9." or MANIFEST_NODE starts with "18."

Read the full file on GitHub · 320 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 320 lines · 19 tokens per session scan C 321920266970

Subscribe to this mod's changes

smart-prerequisites-check is a cursor rule published in the GitHub repository freshworks-developers/fw-dev-tools (5 stars, last pushed 8d ago), licensed MIT. It adds 19 tokens to every session and 2,691 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.