Skip to main content

deno

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).

来源信息

仓库
OpenHands/extensions
最近来源活动
2026年4月23日 20:19
检测到的 SKILL.md 语言
英语
星标
179
Forks
126

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
6 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
deno
description
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).
triggers
["deno","deno.json","deno.jsonc","deno.lock"]
# Deno Use Deno as the default runtime/tooling when the repo contains `deno.json`/`deno.jsonc`, uses `deno.lock`, or scripts/documentation reference `deno task`, `deno run`, `deno test`, etc. ## Quick decision rules - Prefer `deno task <name>` if the repo defines tasks. - Use `deno add` / `deno remove` to manage dependencies (writes to config). - Be explicit about permissions for `deno run` / `deno test`. ## Common operations ### Initialize a new project ```bash deno init ``` ### Add 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:chalk ``` ### Remove dependencies ```bash deno remove jsr:@std/path ``` ### Run 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.ts ``` ### Run tasks ```bash # list tasks deno task # run a task defined in deno.json/deno.jsonc deno task dev ``` ### Formatting, linting, testing ```bash deno fmt deno lint deno test # common permissioned test run deno test --allow-net --allow-read ``` ### Install / 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 8080 ``` ## Notes / pitfalls - Deno is secure-by-default: missing permissions cause runtime errors; add the smallest set of `--allow-*` flags needed. - Dependency specifiers: - `jsr:` for JSR registry packages - `npm:` for npm packages - URL imports are also supported (and cached) - Lockfile: `deno.lock` helps ensure reproducible dependency resolution.
在 GitHub 查看