Official agent skill

Migrate to Deno

by denoland in denoland/skills

Moves a Node.js, npm, Yarn, pnpm or Bun project to Deno in reversible steps, starting with Deno as the package manager and changing no code unless needed.

OfficialMITAuto-check: warningsDevelopment

Install Migrate to Deno

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add denoland/skills --skill migrate-to-deno -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install denoland/skills migrate-to-deno --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/denoland/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/migrate-to-deno .claude/skills/migrate-to-deno && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
migrate-to-deno
GitHub stars
100
Token cost
~2.2k tokens
SKILL.md length
841 words
Files
6 (incl. references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Moves a Node.js, npm, Yarn, pnpm or Bun project to Deno in reversible steps, starting with Deno as the package manager and changing no code unless needed.

  • Trying Deno as a drop-in package manager in an existing Node project
  • SKILL.md covers Most Node projects already run…, Migrate in rungs, Command equivalents and The four things that actually…, plus 3 more sections
  • Calls deno, yarn and bun
  • Running an npm project's scripts and entry point with Deno

What it does

The skill's starting point is that most Node projects already run under Deno: it reads package.json, resolves the same npm packages, writes node_modules, runs the same scripts and supports node: built-ins, so usually only the binary changes. It warns against beginning with rewrites to jsr: imports, Deno-specific dependencies or a new directory layout. It requires Deno 2.9 or later.

The work proceeds in rungs, each reversible and useful alone. Rung one runs deno install, which creates deno.lock seeded from an existing npm, Yarn, Bun or pnpm lockfile, and can be undone by deleting the lock and node_modules and running npm install. Rung two runs the program with deno run and deno task, using the all-permissions flag. Rung three narrows permissions to what the program actually requests. Rung four, adopting the built-in formatter, linter, test runner and compiler, is optional and usually not worth it for an existing project. Per-package-manager reference files and a Node API note back it up.

When your agent uses it

  • Trying Deno as a drop-in package manager in an existing Node project
  • Running an npm project's scripts and entry point with Deno
  • Tightening Deno permissions before deploying a migrated app
  • Mapping prettier, eslint or jest commands to Deno equivalents

Example prompts

  • “Move this npm project to Deno step by step, starting with deno install.”
  • “Run our Yarn-based app with Deno and work out the narrowest permission flags.”

Requirements

  • Deno 2.9 or later
  • An existing JavaScript or TypeScript project with a package.json

What it can do on your machine

Read from SKILL.md and the folder at commit d5f6ace. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • deno
    • yarn
    • bun
    • npm
    • pnpm
    • npx
    • bunx
    • node
    • tsc

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.deno.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Migrate to Deno loads about 2.2k tokens when it runs, and up to ~6k if it reads all its reference files. Until then it costs about 102 tokens; SKILL.md has 841 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:151
    - **Registry and resolver tuning** in `.npmrc` / `.yarnrc.yml`.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from denoland/skills at commit d5f6ace, republished under its MIT licence (© denoland). 841 words, ~2,181 tokens.

Download SKILL.mdSave it as .claude/skills/migrate-to-deno/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
migrate-to-deno
description
Use when moving a Node.js, npm, Yarn, pnpm, or Bun project to Deno, or when adopting Deno incrementally in an existing JavaScript or TypeScript codebase. Covers using Deno as a drop-in package manager, running existing package.json scripts, CommonJS versus ESM, node_modules layout, lockfile migration, permissions, whether to adopt the built-in toolchain, and per-tool command equivalents.
license
MIT
metadata.author
denoland
metadata.version
1.0

Migrating to Deno

Requires Deno 2.9 or later. For general Deno usage once migrated, see the deno skill.

Most Node projects already run under Deno

Deno reads an existing package.json, resolves the same npm packages, writes a real node_modules, runs the same scripts, and supports node: built-ins. TypeScript runs with no build step.

There is usually no code to change — only which binary you invoke. Don't start by rewriting imports to jsr:, swapping dependencies for Deno-specific ones, or restructuring directories. Proposing that is the most common way this goes wrong.

Migrate in rungs

Each rung is independently useful and reversible. Stop wherever suits the project; plenty of teams stop at rung 1.

Rung 1 — Deno as the package manager only
bash
deno install

Reads package.json, resolves the same dependencies, writes node_modules, and creates deno.lock — seeded from any existing package-lock.json, yarn.lock, bun.lock, or pnpm lockfile, so pins and integrity hashes carry over instead of drifting.

The app still runs under node; teammates are unaffected. Commit deno.lock once verified. To back out: delete deno.lock and node_modules, then npm install.

Rung 2 — Run it with Deno
bash
deno run -A main.js      # or: deno -A main.js
deno task build          # runs scripts.build from package.json

Use -A here. The goal is confirming the program works, not designing a permission policy — changing both at once makes failures ambiguous.

Rung 3 — Tighten permissions

Replace -A with the narrowest set that works: run it, read what it asks for, grant exactly that.

bash
deno run --allow-net=api.example.com --allow-read=./config --allow-env=PORT main.js

This buys something Node cannot offer, and is worth doing before deploying.

Rung 4 — Optionally, adopt the built-in toolchain

deno fmt for prettier, deno lint for eslint, deno test for jest or vitest, deno check for tsc, deno watch for nodemon, deno compile for pkg.

Optional, and usually not worth it for an existing project. These are not drop-in replacements; parity is incomplete, so this is a real migration, not a config change. A project happy with prettier, eslint, and vitest should keep them and use Deno as runtime and package manager only. Prefer the built-in tools for new projects. If you do move an existing one, go a tool at a time.

Command equivalents

TasknpmYarnpnpmBunDeno
Install allnpm installyarn installpnpm installbun installdeno install
Addnpm i <p>yarn add <p>pnpm add <p>bun add <p>deno add <p>
Add devnpm i -D <p>yarn add -D <p>pnpm add -D <p>bun add -d <p>deno add -D <p>
Removenpm uninstall <p>yarn remove <p>pnpm remove <p>bun remove <p>deno remove <p>
CI installnpm ciyarn install --immutable†pnpm i --frozen-lockfilebun install --frozen-lockfiledeno ci
Run scriptnpm run <s>yarn <s>pnpm <s>bun run <s>deno task <s>
Run binarynpx <p>yarn dlx <p>pnpm dlx <p>bunx <p>dx <p>
Outdatednpm outdatedyarn outdated‡pnpm outdatedbun outdateddeno outdated
Auditnpm audityarn npm audit†pnpm auditbun auditdeno audit
Whynpm ls <p>yarn why <p>pnpm why <p>bun why <p>deno why <p>
Run a filenode f.jsbun f.tsdeno f.ts
Run TSts-node f.tsbun f.tsdeno f.ts
Watchnodemon f.jsbun --watch f.tsdeno watch f.ts
Formatprettierprettierdeno fmt
Linteslintdeno lint
Testjest, vitestbun testdeno test
Coveragenyc, c8deno coverage
Type-checktsc --noEmittscdeno check
Bundle binarypkg, nexebun build --compiledeno compile

† Yarn Berry (v2+) spelling. Yarn Classic (v1) uses yarn install --frozen-lockfile and yarn audit.

‡ Yarn Classic only — Berry removed yarn outdated.

dx is a separate binary installed alongside Deno, and an alias for deno x. It does not appear in the top-level deno --help output. Like npx, it runs the package with the sandbox disabled.

Show full SKILL.md (230 more words)Show less

The four things that actually break

Requires net access to "..." (or read, env, run)

Deno grants nothing by default. Add that specific permission, or -A while still establishing the program works at all.

ReferenceError: require is not defined

A file containing CommonJS is being parsed as ESM. .cjs is always CommonJS, .mjs always ESM; .js and .ts follow "type" in the nearest package.json. For a CommonJS project, set "type": "commonjs".

A dependency is broken, or postinstall never ran

Lifecycle scripts don't run by default. Native addons notice immediately. Approvals are recorded in the config file, so this is one-time:

bash
deno approve-scripts                              # interactive picker
deno install --allow-scripts=npm:better-sqlite3   # or name them directly
A tool cannot find files inside node_modules

Deno's layout is pnpm-style: real files in node_modules/.deno/, exposed via symlinks. Tools assuming npm's flat hoisted tree need:

json
{ "nodeModulesLinker": "hoisted" }

What has no Deno equivalent

Say so rather than improvising a workaround that won't hold:

  • Yarn Plug'n'Play. Deno creates a real node_modules; .pnp.cjs is unused and .yarnrc.yml resolver settings don't transfer.
  • yarn patch / pnpm patched dependencies. Vendor or fork.
  • overrides / resolutions. Pin via an import map entry instead.
  • Registry and resolver tuning in .npmrc / .yarnrc.yml.
  • Bun build features — macros, HTMLRewriter, HTML entrypoints.

Per-tool details

  • references/FROM_NPM.md — lockfile seeding, node_modules layout, overrides
  • references/FROM_YARN.md — Plug'n'Play, Berry vs Classic, workspaces
  • references/FROM_PNPM.md — pnpm-workspace.yaml, catalog:, patches
  • references/FROM_BUN.md — Bun API translation, bunfig.toml
  • references/NODE_APIS.md — node: built-ins, DENO_COMPAT, CJS/ESM

Further reading

© denoland, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/migrate-to-deno of denoland/skills.

  • SKILL.md
  • references/FROM_BUN.md
  • references/FROM_NPM.md
  • references/FROM_PNPM.md
  • references/FROM_YARN.md
  • references/NODE_APIS.md

Open the folder on GitHubat commit d5f6ace

Compare with similar skills

Migrate to Deno next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Migrate to Deno compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Migrate to Deno this skilldenoland/skills100—~2.2kAutomated safety check: WarnMIT
Swpm Manage Commands Argsdeinsoftware/swpm125—~1.5kAutomated safety check: PassMIT
npm Supply Chain Securitybodadotsh/npm-security-best-practices858—~1kAutomated safety check: WarnMIT
Linea Dependency MaintenanceConsensys-Incorporated/linea-attestation-registry1771 repos~3.7kAutomated safety check: WarnMIT
TS SDK Authormindfold-ai/Trellis15k—~6.1kAutomated safety check: PassMIT
Monorepo Tooling and Dependenciespierrecomputer/pierre6.3k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Swpm Manage Commands Args

    deinsoftware/swpm

    Manage cmds and args props in SWPM package manager configs (src/packages/managers/.ts), including adding, modifying or removing command and argument mappings across npm, yarn, pnpm, bun, deno.

    125 GitHub stars~1.5k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • npm Supply Chain Security

    bodadotsh/npm-security-best-practices

    Applies safer package manager defaults and dependency vetting to JavaScript and TypeScript projects to reduce supply-chain attack risk.

    858 GitHub stars~1k tokensUpdated 10 days ago
    SecurityAuto-check: warnings
  • Linea Dependency Maintenance

    Consensys-Incorporated/linea-attestation-registry

    Safely plan and execute dependency maintenance for JavaScript/TypeScript (npm, pnpm) and GitHub Actions, including npm lockfiles, pnpm workspaces, catalogs, overrides, SHA-pinned action versions…

    177 GitHub starsUsed in 1 repo~3.7k tokens
    DevelopmentAuto-check: warnings
  • TS SDK Author

    mindfold-ai/Trellis

    Design, build, verify, and publish production-grade TypeScript SDKs as npm packages inside a pnpm monorepo.

    15k GitHub stars~6.1k tokensUpdated 11 days ago
    DevelopmentAuto-check passed
  • Sets one monorepo's rules for toolchain pins, pnpm package operations, the shared dependency catalog and moon tasks, so the agent adds versions and scripts the right way.

    6.3k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Fix Security PR

    unional/typescript-blackbook

    Fix a PR that is failing due to security or vulnerability issues — npm/pnpm/yarn/bun audit failures, CVE alerts, Dependabot merge conflicts, Snyk failures, or GitHub security advisory blocks.

    133 GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check: warnings

More from denoland/skills

  • Official

    Guides writing, running and configuring Deno 2.9+ projects: installing npm and JSR dependencies, permissions, config file precedence and the built-in fmt, lint, test and compile toolchain.

    100 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Official

    Chooses between running regular npm frontend frameworks under Deno and building with Fresh, Deno's island-architecture framework, with Fresh 2.x guidance.

    100 GitHub stars~783 tokensUpdated 2 mo ago
    Auto-check passed
  • Deno Deploy

    denoland/skills

    Official

    Guides deploying Deno apps with the deno deploy CLI, including pre-flight checks, environment variables, Deno KV, custom domains and the --tunnel flag for local development.

    100 GitHub stars~5.5k tokensUpdated 2 mo ago
    Auto-check: notes
  • Deno Sandbox SDK

    denoland/skills

    Official

    Runs untrusted or AI-generated code in isolated Deno Sandbox microVMs using the @deno/sandbox SDK, with lifecycle, process and streaming guidance.

    100 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Migrate to Deno

What does Migrate to Deno do?

Moves a Node.js, npm, Yarn, pnpm or Bun project to Deno in reversible steps, starting with Deno as the package manager and changing no code unless needed. json, resolves the same npm packages, writes node_modules, runs the same scripts and supports node: built-ins, so usually only the binary changes. It warns against beginning with rewrites to jsr: imports, Deno-specific dependencies or a new directory layout.

When should I use Migrate to Deno?

Migrate to Deno fits situations like: trying Deno as a drop-in package manager in an existing Node project; running an npm project's scripts and entry point with Deno; tightening Deno permissions before deploying a migrated app; mapping prettier, eslint or jest commands to Deno equivalents.

How do I install Migrate to Deno in Claude Code?

Run `npx skills add denoland/skills --skill migrate-to-deno -a claude-code`. Or copy the skill folder (skills/migrate-to-deno in denoland/skills) into .claude/skills/migrate-to-deno in your project. Claude Code loads it when a task matches its description.

How do I install Migrate to Deno in Codex?

Run `npx skills add denoland/skills --skill migrate-to-deno -a codex`. Or copy the skill folder (skills/migrate-to-deno in denoland/skills) into .agents/skills/migrate-to-deno in your project. Codex loads it when a task matches its description.

Can I use Migrate to Deno in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add denoland/skills --skill migrate-to-deno -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrate-to-deno, .gemini/skills/migrate-to-deno, .github/skills/migrate-to-deno and .opencode/skills/migrate-to-deno in your project.

What does Migrate to Deno need to run?

Going by SKILL.md and its folder, Migrate to Deno needs the command-line tools its instructions call (deno, yarn, bun, npm, pnpm and npx). Our summary lists: Deno 2.9 or later; An existing JavaScript or TypeScript project with a package.json.

Does Migrate to Deno access the network?

SKILL.md names 1 domain. As links in the text: docs.deno.com. This is read from the text; nothing was executed.

Is Migrate to Deno safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Migrate to Deno use?

Migrate to Deno is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Migrate to Deno use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.8k tokens, read only when the agent opens those files.

What are the alternatives to Migrate to Deno?

Skills that share tags, products or a category with Migrate to Deno: Swpm Manage Commands Args (deinsoftware/swpm, 125 stars), npm Supply Chain Security (bodadotsh/npm-security-best-practices, 858 stars), Linea Dependency Maintenance (Consensys-Incorporated/linea-attestation-registry, 177 stars) and TS SDK Author (mindfold-ai/Trellis, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Migrate to Deno?

denoland (a GitHub organization, an official publisher) maintains it in denoland/skills, which has 100 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 29, 2026.

Source: denoland/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.