Deno
DenoOfficialCreated by denolandDistributed by Deno
- Skill
- Tool integration
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Deno is a modern JavaScript and TypeScript runtime that integrates a package manager, formatter, linter, test runner, and bundler into a single binary. This skill provides guidance on leveraging Deno's capabilities, including dependency management via npm and JSR, permission-based security, project configuration, and built-in tooling. It emphasizes Deno's compatibility with existing Node.js ecosystems, such as package.json and node_modules, while highlighting its unique features like secure-by-default execution and native TypeScript support.
What it does
- Manages dependencies using npm and JSR registries.
- Provides commands for formatting, linting, testing, and benchmarking code.
- Configures project settings across package.json, tsconfig.json, and deno.json.
- Enforces security through granular permission flags for filesystem and network access.
- Supports workspace management for monorepo structures.
- Facilitates publishing to JSR and npm registries.
When to use it
- When starting a new TypeScript or JavaScript project.
- When integrating Deno into an existing Node.js project.
- When needing a secure runtime with built-in development tools.
- When managing dependencies from both npm and JSR.
- When configuring CI/CD pipelines for Deno-based applications.
Advantages
- Unified toolchain reduces the need for external configuration files.
- Native TypeScript support eliminates the need for manual compilation steps.
- Secure-by-default execution model prevents unauthorized system access.
- Seamless interoperability with existing npm packages and workflows.
- Built-in dependency auditing and supply-chain protection features.
Usage examples
- “How do I add express to my project using Deno?”
- Run 'deno add express' in your terminal to install the package from npm and update your configuration.
- “How can I run a script with network access allowed?”
- Use 'deno run --allow-net=api.example.com main.ts' to execute your script with restricted network permissions.
- “How do I ensure my project dependencies are installed correctly in CI?”
- Use the 'deno ci' command, which performs a clean, reproducible install from your lockfile.
- “How do I format my code using Deno?”
- Run 'deno fmt' to automatically format your files according to Deno's built-in standards.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/denoland/deno/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip deno.zip -d .agents/skills
Documentation by denoland
Deno
A JavaScript and TypeScript runtime with a package manager, formatter, linter, test runner, type checker, and bundler in one binary. Runs TypeScript directly.
Needs Deno 2.9+. Check with deno --version, update with deno upgrade.
Deno works the way npm and bun do
Deno is not a separate ecosystem to port code into:
deno installreads an existingpackage.jsonand writes a realnode_modules.deno add expressinstalls from npm. Unprefixed names default to npm.deno task buildrunsscripts.buildfrompackage.jsonortasks.buildfromdeno.json. If both define it,deno.jsonwins.Node built-ins work prefixed or not:
node:fsandfsboth resolve.deno main.jsruns a file.deno runis optional.Deno reads
tsconfig.json.
Don't tell users to rewrite imports, adopt JSR, or restructure as a precondition. The two real differences are permissions and npm lifecycle scripts not running by default.
Single-file scripts need no build step and no tsconfig.json. Applications and
framework projects keep their normal setup.
To convert an existing project, see the migrate-to-deno skill.
Dependency management
deno install # install everything declared
deno add express # from npm (unprefixed = npm)
deno add jsr:@std/path # from JSR
deno add -D vitest # dev dependency (package.json only)
deno remove express
deno outdated # list outdated deps
deno update # alias for `deno outdated --update`
deno update --latest # ignore existing semver ranges
deno list # declared deps + resolved versions (npm ls)
deno why express # why a package is in the tree
deno audit # vulnerability audit
deno ci # clean reproducible install for CI
dx cowsay hello # run a package binary without installing (npx)deno ci is the CI command, not deno install: it requires deno.lock,
deletes node_modules, installs strictly from the lockfile, and fails if the
lockfile is stale. --prod skips devDependencies.
dx is npx / bunx / pnpm dlx, and an alias for deno x. It runs with
the sandbox disabled, so treat it with the same care as npx.
Deno won't install a version published less than a day ago, limiting the window
for a compromised release. Override with --min-dep-age, which takes minutes
(120), an ISO-8601 duration (P7D), a cutoff date, or 0 to disable:
deno add --min-dep-age=0 npm:some-packageLifecycle scripts (postinstall) don't run by default — a common surprise when
a native addon looks broken after install. Approve once per project:
deno approve-scripts # interactive picker
deno install --allow-scripts=npm:better-sqlite3Where configuration goes
| File | Holds |
|---|---|
package.json | dependencies, scripts |
tsconfig.json | TypeScript compiler options |
deno.json | Deno config: fmt, lint, tasks, workspaces |
Put dependencies in package.json — every other tool reads it, and Deno
resolves it natively. Use deno.json for dependencies only when there is no
package.json: a standalone script, or a JSR package. Likewise prefer
tsconfig.json over compilerOptions in deno.json, so tsc and editors see
the same settings.
Commit deno.lock. Deno seeds it from an existing package-lock.json,
yarn.lock, bun.lock, or pnpm lockfile, preserving pins.
node_modules layout
Deno uses pnpm's isolated layout: real files in node_modules/.deno/, exposed
by symlinks, so a package can't import what it never declared. For a tool that
needs npm's flat hoisted tree:
{ "nodeModulesLinker": "hoisted" }nodeModulesDir applies only to projects without a package.json, so it is
rarely the right knob.
Permissions
Deno grants no filesystem, network, environment, or subprocess access unless asked.
deno run --allow-net=api.example.com --allow-read=./data main.ts
deno run -A main.ts # allow everything| Flag | Short | Grants |
|---|---|---|
--allow-read[=paths] | -R | filesystem read |
--allow-write[=paths] | -W | filesystem write |
--allow-net[=hosts] | -N | network |
--allow-env[=names] | -E | environment variables |
--allow-sys[=apis] | -S | OS information |
--allow-import[=hosts] | -I | imports from remote hosts |
--allow-run[=bins] | — | subprocesses |
--allow-ffi[=paths] | — | native libraries (unstable) |
--allow-all | -A | everything |
-S is --allow-sys, not --allow-run. Every flag takes an allowlist —
--allow-net=example.com:443 beats bare --allow-net. Matching --deny-*
flags always win.
On Requires net access to "...", add that specific permission. -A is fine
for trusted first-party code and during migration, but a poor default to commit
in a task.
Configuration
deno.json (or .jsonc) is auto-discovered from the current directory upward.
{
"tasks": {
"dev": "deno watch -A main.ts",
"start": "deno run -A main.ts"
},
"fmt": { "exclude": ["build/"] },
"lint": { "rules": { "exclude": ["no-explicit-any"] } },
"exclude": ["build/", "dist/"]
}Top-level exclude applies to every subcommand; per-tool exclude narrows it.
deno.json also accepts imports, an import map pointing bare specifiers at
real ones. That is how a project without package.json declares dependencies,
and how a JSR package declares its own alongside name, version, exports.
Workspaces
npm, Yarn, and Bun workspaces work out of the box — Deno reads package.json
"workspaces" directly. pnpm is the exception: pnpm-workspace.yaml is
migrated into deno.json on first run, which must then be re-run.
{ "workspace": ["./packages/core", "./packages/cli"] }Members are explicit or single-level globs ("packages/*"); ** and negation
are unsupported. Run a task across members with deno task --filter '*' build.
Packages: npm and JSR
Prefer npm — it is where the ecosystem is, and deno add express is the
normal case. Reach for JSR for the standard library (@std/*), or to publish
TypeScript that consumers get types for without a build step. Mixing is fine.
deno add jsr:@std/path npm:express
deno doc jsr:@std/path # read a package's API from the terminalDeno once used full URL imports (https://deno.land/x/...). They still run but
aren't recommended; to modernize, deno add the package and import the bare
specifier.
Built-in tooling
deno fmt # format (--check for CI)
deno lint # lint (--fix, --rules)
deno test # tests (--watch, --parallel, --coverage=dir)
deno check main.ts # type-check without running
deno bench # benchmarks
deno coverage # coverage report from --coverage output
deno compile main.ts # single-file executable (--target cross-compiles)
deno doc mod.ts # docs (--html for a site)
deno info main.ts # module graph and cache infoThese cover prettier, eslint, jest/vitest, tsc, and pkg/nexe with no config or dependencies — but they are not drop-in replacements. Parity is incomplete, so moving an established project is real work. There is no need to migrate: keep prettier, eslint, and vitest, and use Deno as runtime and package manager. Prefer the built-in tools for new projects.
Suppress with // deno-lint-ignore <rule>, // deno-lint-ignore-file,
// deno-fmt-ignore, // deno-fmt-ignore-file. In Markdown,
<!-- deno-fmt-ignore --> before a code block protects illustrative snippets
that aren't valid standalone code.
Running code
deno main.ts # deno run is optional
deno watch main.ts # reload on change (replaces nodemon)
deno task dev # task from package.json or deno.json
deno repl
deno eval "console.log(1)"deno watch hot-replaces modules, restarting if that fails; it aliases
deno run --watch-hmr.
An HTTP server needs no dependencies:
Deno.serve((_req) => new Response("Hello"));Starting a new project
Scaffold rather than hand-writing the files:
deno init my-project # script + test + deno.json
deno init --empty my-project # just main.ts and deno.json
deno init --lib my-lib # library laid out for JSR
deno create vite my-app # scaffold from a package initializerdeno create is npm create / yarn create and covers that ecosystem
(deno create astro, etc). Unprefixed names are npm; --jsr selects JSR.
Publishing
To npm the regular flow still works — npm publish, or deno pack to build
the tarball first. deno publish targets JSR only, from a deno.json with
name, version, and exports:
deno publish --dry-run
deno publishProvenance attestation is automatic on GitHub Actions. deno bump-version patch
bumps the version, across every member at a workspace root.
Guide: https://docs.deno.com/runtime/reference/cli/publish/
Reviewing Deno code
-Acommitted in a task where a scoped grant would work.deno.lockuncommitted, or CI runningdeno installinstead ofdeno ci.Inline
jsr:/npm:specifiers in a project with apackage.json— usedeno addso the version lives in one place. Fine in standalone scripts.A specifier with no version constraint.
Dependencies or compiler options in
deno.jsonwhenpackage.jsonortsconfig.jsonexists.Missing
deno fmt --check,deno lint,deno checkin CI.
Further reading
https://docs.deno.com — runtime documentation
https://docs.deno.com/api/ —
Deno.*API referencereferences/CLI.md— fuller subcommand and flag referencedeno <subcommand> --help— authoritative and version-accurate; check it before guessing at a flag.
Files
- ATTRIBUTION.mdAdded by AutoGineer848 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md10.7 KiB
- references/CLI.md10.5 KiB
references/CLI.md
Deno CLI reference
Verified against Deno 2.9. deno <subcommand> --help is authoritative — check
it before guessing at a flag. --help=full adds runtime and permission flags;
--help=unstable shows unstable ones.
Execution
| Command | Purpose |
|---|---|
deno run <file> | Run a module. deno <file> is equivalent. |
deno watch <file> | Reload on change; alias for deno run --watch-hmr |
deno run --watch <file> | Restart on file change, without hot replacement |
deno task <name> | Run a task from deno.json or a script from package.json |
deno repl | Interactive REPL |
deno eval "<code>" | Evaluate a string |
deno task with no argument lists tasks. Flags: --cwd, --filter (workspace
members), --if-present (exit 0 if missing), --eval (inline task),
-j/--jobs.
Dependency management
| Command | Purpose |
|---|---|
deno install | Install everything declared in the config file |
deno install <pkg> | Add and install one package |
deno install --entrypoint <files> | Install what those files import |
deno install -g <spec> | Install a global executable into $DENO_INSTALL_ROOT/bin |
deno add <pkg> | Add a dependency to the config file |
deno remove <pkg> | Remove a dependency |
deno ci | Clean, reproducible install from the lockfile |
deno outdated | Show outdated dependencies |
deno update | Alias for deno outdated --update |
deno list | List declared dependencies (like npm ls) |
deno why <pkg> | Explain why a package is in the tree |
deno audit | Audit installed dependencies for vulnerabilities |
deno approve-scripts | Approve npm lifecycle scripts |
deno link <path> | Link a local JSR or npm package for development |
deno unlink <path> | Undo deno link |
deno uninstall | Remove a dependency or global executable |
deno add / deno install
Unprefixed package names default to npm. deno add express installs
npm:express. Use a jsr: prefix or --jsr for JSR packages.
-D, --dev— add underdevDependencies(package.jsononly)--no-save— install without writing to the config file--lockfile-only— update only the lockfile--allow-scripts[=<pkg>]— permit npm lifecycle scripts--min-dep-age <age>— refuse packages published more recently than the given age, as a supply-chain attack mitigation. Defaults to one day, so installing a just-published version needs--min-dep-age=0. Accepts minutes (120), an ISO-8601 duration (P2D), or a cutoff date. Also spelled--minimum-dependency-age.
deno ci
Requires deno.lock, removes any existing node_modules, installs strictly
from the lockfile, and errors if it is out of date. CI should run this, not
deno install.
--prod— exclude devDependencies--skip-types— exclude@types/*packages (name-based heuristic; may skip packages that ship runtime code)
deno outdated / deno update
--update— apply updates rather than only listing them--latest— ignore existing semver ranges--lockfile-only— update within existing ranges without editing the config file (this is whatnpm updatedoes)--compatible— only semver-compatible updates--recursive— across all workspace members
Filters select by alias in the config file, not real package name, and take
wildcards and ! negation:
deno update --latest "@std/*" "!@std/fmt*"
deno outdated --update @std/fmt@^1.0.2deno list
--depth <n>— tree depth (0= direct dependencies only)--prod/--dev— restrict to one dependency set--recursive— include all workspace members
deno info walks the module graph from an entrypoint; deno list reports what
the project declares.
dx
dx <pkg> runs a package binary without installing it — npx / bunx /
pnpm dlx / yarn dlx. A separate binary shipped alongside Deno, aliasing
deno x, and absent from the top-level deno --help. Runs with the sandbox
disabled.
Toolchain
| Command | Replaces | Notes |
|---|---|---|
deno fmt | prettier | --check for CI, --unstable-component for Vue/Svelte/Astro |
deno lint | eslint | --fix, --rules to list, --json |
deno test | jest, vitest, mocha | --watch, --parallel, --coverage[=dir] |
deno check <file> | tsc --noEmit | --all includes remote and npm code |
deno bench | tinybench et al | discovers *_bench.ts / *.bench.ts |
deno coverage | nyc, c8 | reads --coverage output; --lcov, --html |
deno compile | pkg, nexe | --target cross-compiles |
deno doc | typedoc | --html for a site, --json for data |
deno info | — | module graph, cache locations |
deno clean | — | clear the module cache |
deno fmt handles JS, TS, JSON(C), Markdown, and Jupyter notebooks; HTML, CSS,
SCSS, LESS, YAML, Svelte, Vue, Astro, and Angular sit behind unstable options.
deno test discovers {*_,*.,}test.{js,mjs,ts,mts,jsx,tsx} and
**/__tests__/**. --coverage-threshold=<pct> fails below a coverage
percentage.
Suppress with // deno-lint-ignore <rule>, // deno-lint-ignore-file,
// deno-fmt-ignore, // deno-fmt-ignore-file.
deno check --doc also checks JSDoc code blocks; --doc-only checks only JSDoc
and Markdown blocks — a good way to keep documentation examples honest.
Project setup
| Command | Result |
|---|---|
deno init <dir> | Script, test, and deno.json |
deno init --empty <dir> | Just main.ts and deno.json |
deno init --lib <dir> | Library laid out for JSR publishing |
deno create <pkg> <dir> | Scaffold from a package initializer |
deno create is the npm create / yarn create equivalent and covers that
whole ecosystem: deno create vite, deno create astro, and so on. Unprefixed
names are treated as npm packages; --jsr selects JSR, and -y bypasses the
prompt and runs with full permissions.
Publishing
| Command | Purpose |
|---|---|
deno publish | Publish to JSR |
deno pack | Build an npm-compatible tarball |
deno bump-version <increment> | Bump the version in the config file |
deno publish requires name, version, exports in deno.json. Flags:
--dry-run, --allow-dirty, --allow-slow-types, --set-version, --token.
Provenance is on by default in GitHub Actions, publicly linking the package to
the build that produced it; --no-provenance disables it.
deno bump-version takes major, minor, patch, premajor, preminor,
prepatch, prerelease. At a workspace root it applies to every member and
rewrites jsr: references in the root import map. With no increment it derives
per-package bumps from conventional commits since the last tag and prepends a
release note to Releases.md.
deno pack flags: --dry-run, --output, --set-version, --ignore,
--no-source-maps, --allow-dirty.
Permissions
Applies to run, serve, test, bench, compile, and eval.
| Flag | Short | Grants |
|---|---|---|
--allow-read[=<path>...] | -R | filesystem read |
--allow-write[=<path>...] | -W | filesystem write |
--allow-net[=<host>...] | -N | network |
--allow-env[=<var>...] | -E | environment variables |
--allow-sys[=<api>...] | -S | OS information |
--allow-import[=<host>...] | -I | imports from remote hosts |
--allow-run[=<bin>...] | — | subprocesses |
--allow-ffi[=<path>...] | — | native libraries (unstable) |
--allow-all | -A | everything |
Every --allow-* has a matching --deny-*, and deny always wins.
--allow-net scopes take ports (example.com:443) and Unix sockets
(unix:/var/run/docker.sock). --allow-import defaults to a fixed allowlist —
jsr.io, esm.sh, cdn.jsdelivr.net, and a few others — not to nothing.
Environment variables
| Variable | Effect |
|---|---|
DENO_DIR | Cache directory |
DENO_INSTALL_ROOT | Where deno install -g writes (default $HOME/.deno) |
DENO_CONDITIONS | Extra export conditions for npm resolution |
DENO_JOBS | Worker count for --parallel |
DENO_CERT | Additional CA certificates |
deno --help lists the full set with descriptions.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- denoland
- Publisher
- Deno (Official)
- Distributed by
- Deno
- Source
- denoland/skills · skills/deno · commit d5f6ace
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by denoland or Deno.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download deno.zip