cloudinary_npm AGENTS.md

Contributor instructions for the Cloudinary Node.js package, a library for working with Cloudinary's media service. They describe the repository's structure, commands, coding style, and test rules.

In plain words
What is it for?
Use them when contributing to the package to install dependencies, run linting and unit or type tests, and handle integration tests that require a real or temporary Cloudinary environment.
Why use it?
They help coding agents make changes that fit the project and avoid accidental network calls or paid Cloudinary operations during tests.

Instructions file for CodexOpenCode

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 instructions/cloudinary/cloudinary_npm/agents-md
Clone the repo
git clone --depth 1 https://github.com/cloudinary/cloudinary_npm

Made for: Codex, OpenCode.

Per session 766 This file is loaded in full into every session.
When invoked 766 The same file — it is already loaded in full.
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.00766 $0.00766
Opus 5 $0.00383 $0.00383
Sonnet 5 $0.00153 $0.00153
Haiku 4.5 $0.00077 $0.00077

Measured yesterday against content hash 45bbb182c857, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudinary_npm AGENTS.md 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 yesterday.

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.

AGENTS.md · 78 lines

How it starts

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

Contributor guide for coding agents

This file is for agents contributing to this repository. If you are using the installed cloudinary package in another project, read the bundled docs in node_modules/cloudinary/docs/ instead.

Commands

npm install              # install dependencies
npm test                 # lint + unit tests + type declaration tests
npm run test:unit        # mocha unit tests only (mocked, no network)
npm run lint             # eslint
npm run dtslint          # TypeScript declaration tests
npm run test-with-temp-cloud  # full integration tests against a temporary cloud (CI)

Unit tests require a CLOUDINARY_URL in the environment or a .env file; any syntactically valid value works for mocked tests: CLOUDINARY_URL=cloudinary://key:secret@test-cloud.

Testing

  • test/unit/ is mocked and must never perform network calls.
  • test/integration/ requires a real or temporary Cloudinary environment; do not run it by default and do not add tests there that consume paid add-ons without a skip guard.
  • Nondeterministic AI output (captions, tags, moderation verdicts) must be asserted by request shape, state transition, and response schema — never by exact output values.

Project structure

  • cloudinary.js — package entry point; exposes the legacy v1 API and require('cloudinary').v2.
  • lib/ — implementation. lib/v2/ wraps the v1 modules with promise support.
  • lib/analysis/ — Analyze API (analyze_uri).
  • types/index.d.ts — TypeScript declarations, tested by npm run dtslint.
  • examples/ — small, runnable task examples shipped in the npm package.
  • docs/ — version-matched Markdown docs shipped in the npm package.
  • samples/ — legacy full applications; not part of the tested example set.
  • test/unit/, integration/, shared helpers in spechelper.js and testUtils/.
  • tools/scripts/ — shell entry points used by the npm scripts.

Code style

  • CommonJS modules, ES6+ syntax, two-space indent; eslint config is authoritative.
  • Public API methods accept an options object and an optional Node-style callback and return a Promise, following the existing pattern:

Read the full file on GitHub · 78 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. yesterday First seen · 78 lines · 766 tokens per session scan A 45bbb182c857

Subscribe to this mod's changes

cloudinary_npm AGENTS.md is an instructions file published in the GitHub repository cloudinary/cloudinary_npm (666 stars, last pushed 5d ago), licensed MIT. It adds 766 tokens to every session, about $0.0038 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.