deno
Original:🇺🇸 English
Translated
If the project uses deno, use this skill. Use this skill to initialize and work with Deno projects, add/remove dependencies (JSR and npm), run tasks and scripts with appropriate permissions, and use built-in tooling (fmt/lint/test).
2installs
Sourceopenhands/skills
Added on
NPX Install
npx skill4agent add openhands/skills denoTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Deno
Use Deno as the default runtime/tooling when the repo contains /, uses , or scripts/documentation reference , , , etc.
deno.jsondeno.jsoncdeno.lockdeno taskdeno rundeno testQuick decision rules
- Prefer if the repo defines tasks.
deno task <name> - Use /
deno addto manage dependencies (writes to config).deno remove - Be explicit about permissions for /
deno run.deno test
Common operations
Initialize a new project
bash
deno initAdd dependencies (JSR and npm)
bash
# JSR (recommended for Deno-first packages)
deno add jsr:@std/path
# npm packages are supported too
deno add npm:react
# multiple at once
deno add jsr:@std/assert npm:chalkRemove dependencies
bash
deno remove jsr:@std/pathRun a script
bash
# Minimal permissions: only what the program needs
# Examples:
# --allow-net=api.example.com
# --allow-read=./data
# --allow-env=FOO,BAR
deno run --allow-net --allow-read main.tsRun tasks
bash
# list tasks
deno task
# run a task defined in deno.json/deno.jsonc
deno task devFormatting, linting, testing
bash
deno fmt
deno lint
deno test
# common permissioned test run
deno test --allow-net --allow-readInstall / run CLIs
bash
# Run a JSR or npm package's CLI without installing globally
deno x jsr:@std/http/file-server -p 8080
# Install globally (requires choosing permissions at install time)
# Prefer the smallest set of permissions; avoid blanket flags unless necessary.
deno install -g -N -R jsr:@std/http/file-server -- -p 8080Notes / pitfalls
- Deno is secure-by-default: missing permissions cause runtime errors; add the smallest set of flags needed.
--allow-* - Dependency specifiers:
- for JSR registry packages
jsr: - for npm packages
npm: - URL imports are also supported (and cached)
- Lockfile: helps ensure reproducible dependency resolution.
deno.lock