deno

deno is a cursor rule for Cursor from nedcodes-ok/cursorrules-collection. It costs 496 tokens per session, scanned A, original, MIT.

A set of project rules for Deno, a JavaScript and TypeScript runtime with built-in security permissions and configuration.

In plain words
What is it for?
Use it to build Deno applications and services with scoped permissions, deno.json configuration, standard-library imports, ESM modules, and Deno Deploy compatibility.
Why use it?
It reduces accidental access to files, networks, and environment variables while keeping imports, tasks, formatting, and linting consistent.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions 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/nedcodes-ok/cursorrules-collection/deno
Clone the repo
git clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collection

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deno

README.md
[![agentmods](https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/deno.svg)](https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/deno)
Your own site
<a href="https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/deno"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/deno.svg" alt="Measured on agentmods" height="20"></a>
Per session 496 This file is loaded in full into every session.
When invoked 496 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.1 $0.00496 $0.00496
Opus 5 $0.00248 $0.00248
Sonnet 5 $0.00099 $0.00099
Haiku 4.5 $0.00050 $0.00050

Measured 2d ago against content hash b0439433a00f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

deno 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 2d 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.

rules-mdc/tools/deno.mdc · 46 lines

What it actually says

Deno Cursor Rules

You are an expert Deno developer. Follow these rules:

Permissions

  • Always run with explicit permissions: --allow-read, --allow-net, --allow-env, etc.
  • Never use --allow-all in production or shared scripts
  • Scope permissions narrowly: --allow-read=./data --allow-net=api.example.com
  • Document required permissions in a comment at the top of entry files

Configuration

  • Use deno.json for project config: compilerOptions, imports, tasks, fmt, lint
  • Use import maps in deno.json for bare specifiers — no node_modules needed
  • Set "nodeModulesDir": true only when npm compat requires it
  • Define tasks in deno.json instead of Makefiles or shell scripts

Standard Library

  • Import from jsr:@std/ — e.g., @std/path, @std/fs, @std/http, @std/assert
  • Pin versions in import map: "@std/path": "jsr:@std/path@^1.0.0"
  • Use Deno.readTextFile/Deno.writeTextFile over manual stream handling for simple I/O
  • Use @std/http/server for HTTP — Deno.serve() for simple cases

Module System

  • Use ESM exclusively — no require(), no CommonJS
  • Import npm packages with npm: specifier — import express from "npm:express@4"
  • Import from JSR with jsr: specifier for Deno-native packages
  • Use deps.ts or import maps for centralized dependency management

Testing

  • Use Deno.test() or import from @std/testing for BDD style
  • Name tests descriptively — Deno.test("parseConfig handles missing fields", ...)
  • Use @std/assert: assertEquals, assertThrows, assertRejects
  • Run with deno test --allow-read --allow-net (pass only needed permissions)

Error Handling & APIs

  • Check permissions with Deno.permissions.query() before operations that might fail
  • Use Web APIs first: fetch, Request, Response, URL, crypto.subtle
  • Prefer Deno.Command over Deno.run (deprecated) for subprocess execution
  • Use AbortController/AbortSignal for cancellation patterns
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. 2d ago First seen · 46 lines · 496 tokens per session scan A b0439433a00f

Subscribe to this mod's changes

deno is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (37 stars, last pushed 6mo ago), licensed MIT. It adds 496 tokens to every session, about $0.0025 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-09-03.