lib-generating-agent-manual

Guidelines for checking a project's external libraries, their purposes, version limits, and compatibility with the required Node.js version. They use .nvmrc first and package.json when selecting the Node.js version.

In plain words
What is it for?
Use them when analyzing package.json, selecting compatible library features, implementing changes, reviewing dependency updates, and documenting breaking or version-specific behavior.
Why use it?
They help prevent code from using APIs or language features that the project's installed versions do not support.

Cursor rule for Cursor

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/rosendolu/cursor-rules-deploy/lib-generating-agent-manual
Clone the repo
git clone --depth 1 https://github.com/rosendolu/cursor-rules-deploy

Made for: Cursor.

Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 619 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00006 $0.00619
Opus 5 $0.00003 $0.00309
Sonnet 5 $0.00001 $0.00124
Haiku 4.5 $0.00001 $0.00062

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

Security

Grade A, and why

lib-generating-agent-manual scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/core-rules/lib-generating-agent-manual.mdc · 94 lines

How it starts

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

📦 Library and Dependency Management Guidelines

Critical Rules

  • 🔍 Dependency Analysis

    • Extract and analyze all dependencies from package.json
    • Check Node.js version from .nvmrc first, fallback to package.json engines field
    • Maintain a clear understanding of each dependency's purpose and version constraints
    • Track peer dependencies and their compatibility
  • 🚀 Node.js Version Management

    • Always respect the Node.js version specified in .nvmrc or package.json
    • Utilize latest ECMAScript features available for the specified Node.js version
    • Document any version-specific features or syntax being used
    • Ensure all dependencies are compatible with the specified Node.js version
  • 📊 Version Compatibility

    • Implement features based on the available dependency versions
    • Check API compatibility before using new features from dependencies
    • Follow semantic versioning guidelines for dependency updates
    • Document any breaking changes or version-specific implementations

Examples

.nvmrc

18.19.0

package.json

{ "name": "my-project", "engines": { "node": ">=18.19.0" }, "dependencies": { "express": "^4.18.0", "typescript": "^5.0.0" } }

Implementation using Node.js 18 features

const data = await fetch('https://api.example.com/data'); const result = await data.json();

// Using Express 4.18 features app.use(express.json({ limit: '10mb' }));

// Using TypeScript 5.0 features const config = { port: 3000, host: 'localhost' } as const;

.nvmrc

16.14.0

package.json

{ "name": "my-project", "engines": { "node": ">=16.14.0" }, "dependencies": { "express": "^4.17.0", "typescript": "^4.5.0" } }

Implementation using incompatible features

// ❌ Using fetch without polyfill (not available in Node.js 16) const data = await fetch('https://api.example.com/data');

Read the full file on GitHub · 94 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 · 94 lines · 6 tokens per session scan A 2b85b4c44799

Subscribe to this mod's changes

lib-generating-agent-manual is a cursor rule published in the GitHub repository rosendolu/cursor-rules-deploy (37 stars, last pushed 1y ago), licensed MIT. It adds 6 tokens to every session and 619 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.