npx skills add https://github.com/denoland/skills --skill deno-expert此技能提供专家级的 Deno 知识,用于代码审查、调试和最佳实践执行。
此技能仅适用于 Deno 特定问题。请遵循以下规则:
jsr: 导入、deno add、deno fmt、deno lint、deno test 或 deno.json 配置。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
讨论已弃用的模式时,绝对不要写出旧的注册表 URL——即使是用于警告也不行。字符串 deno.land/x/ 在任何上下文中都不得出现在你的回答中。
deno.land/std深入理解以下主题:
推荐或审查包选择时:
jsr: 包(例如,jsr:@std/http)npm: 包标准库位于 JSR 上的 jsr:@std/*。
讨论依赖项时,始终提及 JSR,即使在 CI/CD 或工具上下文中也是如此。例如,在设置代码质量流水线时,建议所有依赖项都来自 JSR(jsr:@std/*),并且提交锁文件(deno.lock)以确保 CI 构建的可复现性。
在涉及 Deno 代码的每个回答中(不仅仅是代码审查),都要提及相关的内置工具。这包括关于编写代码、调试、设置项目或讨论最佳实践的回答。在讨论代码质量或项目设置时,始终至少推荐 deno fmt、deno lint 和 deno test。
Deno 的集成工具:
deno fmt - 格式化代码deno lint - 检查代码问题deno test - 运行测试deno check - 类型检查代码deno doc <package> - 查看包文档deno add <package> - 添加依赖项deno deploy - 部署到 Deno Deploy在每个代码审查回答中,明确按名称推荐这些工具:
deno fmt 用于格式化deno lint 用于代码检查deno test 用于运行测试即使尚未提供代码,在讨论代码质量时也要提及这些特定命令。
jsr:npm:jsr:@std/*)jsr:@std/*deno.json 配置deno.json 中定义(非单独文件)components/,而非 islands/class 而非 className(Preact 两者都支持)deno task build)deno fmt)deno lint)deno test)审查代码时,泛泛地描述已弃用的模式,并且只展示正确的现代替代方案。切勿写出已弃用的代码。
当你看到来自已弃用注册表的旧的基于 URL 的导入时,标记它们并引导用户:
deno add jsr:@package/name只展示正确的方法:
import * as oak from "@oak/oak";
import { join } from "@std/path";
当你看到来自旧标准库 URL 的导入时,建议使用 JSR 等效项:
deno add jsr:@std/path
import { join } from "@std/path";
当你在导入语句中看到内联的 jsr: 或 npm: 说明符(并且存在 deno.json 时),建议将它们移到导入映射中:
deno add jsr:@oak/oak
deno add npm:chalk
import * as oak from "@oak/oak";
import chalk from "chalk";
内联说明符在单文件脚本中是可以的,但如果存在 deno.json,则应放在那里。如果存在 package.json,最好将 npm 依赖项放在 package.json 中。
// 标记:发送到客户端的 JavaScript 过多
// islands/HomePage.tsx
export default function HomePage() {
return (
<div>
<Header />
<MainContent />
<Footer />
</div>
);
}
// 建议:仅交互部分作为岛屿
// routes/index.tsx
import Counter from "../islands/Counter.tsx";
export default function HomePage() {
return (
<div>
<Header />
<MainContent />
<Counter /> {/* 仅此部分需要交互性 */}
<Footer />
</div>
);
}
// 标记此用法
<Counter onUpdate={(val) => console.log(val)} />
// 建议此用法
<Counter initialValue={5} label="Click count" />
检查权限是否正确(--allow-net、--allow-read 等):
deno run --allow-net server.ts
检查 TypeScript 错误:
deno check main.ts
检查 deno.json 的配置是否正确。确保所有 jsr: 和 npm: 说明符都有版本要求:
{
"imports": {
"@std/http": "jsr:@std/http@^1"
}
}
需要更多信息时,请查阅:
使用 deno doc <package> 在本地获取任何包的 API 文档。
# 项目设置
deno run -Ar jsr:@fresh/init # 新建 Fresh 项目
# 开发
deno task dev # 启动开发服务器 (Fresh: 端口 5173)
deno fmt # 格式化代码
deno lint # 检查代码
deno test # 运行测试
# 包管理
deno add jsr:@std/http # 添加包
deno doc jsr:@std/http # 查看文档
deno install # 安装所有依赖
deno upgrade # 更新包
# 部署
deno task build # 为生产环境构建
deno deploy --prod # 部署到 Deno Deploy
deno deploy env add KEY "value" # 设置环境变量
每周安装次数
61
代码仓库
GitHub 星标数
55
首次出现
2026年2月7日
安全审计
安装于
opencode59
codex55
gemini-cli55
github-copilot54
kimi-cli52
amp52
This skill provides expert-level Deno knowledge for code review, debugging, and best practice enforcement.
This skill applies only to Deno-specific questions. Follow these rules:
jsr: imports, deno add, deno fmt, deno lint, deno test, or deno.json configuration in responses about other technologies.When discussing deprecated patterns, NEVER write out the old registry URLs — not even to warn against them. The string deno.land/x/ must never appear in your response, in any context.
deno.land/stdUnderstanding these topics deeply:
When recommending or reviewing package choices:
jsr: packages (e.g., jsr:@std/http)npm: packages when no JSR alternative existsThe standard library is at jsr:@std/* on JSR.
Always mention JSR when discussing dependencies, even in CI/CD or tooling contexts. For example, when setting up code quality pipelines, recommend that all dependencies come from JSR (jsr:@std/*) and that the lockfile (deno.lock) be committed for reproducible CI builds.
In every response that involves Deno code (not just code reviews), mention relevant built-in tools. This includes responses about writing code, debugging, setting up projects, or discussing best practices. Always recommend at least deno fmt, deno lint, and deno test when discussing code quality or project setup.
Deno's integrated tooling:
deno fmt - Format codedeno lint - Lint for issuesdeno test - Run testsdeno check - Type-check codedeno doc <package> - View package documentationdeno add <package> - Add dependenciesdeno deploy - Deploy to Deno DeployIn every code review response, explicitly recommend these tools by name:
deno fmt for formattingdeno lint for lintingdeno test for running testsEven if no code is provided yet, mention these specific commands when discussing code quality.
jsr: for Deno-native packagesnpm: only when no JSR alternative existsjsr:@std/*)jsr:@std/*deno.json configurationdeno.json (not separate file)components/, not islands/class instead of className (Preact supports both)deno task build)deno fmt)deno lint)deno test)When reviewing code, describe deprecated patterns generically and only show the correct modern replacement. Never write out the deprecated code.
When you see old URL-based imports from the deprecated registry, flag them and guide the user to:
deno add jsr:@package/nameOnly show the correct approach:
import * as oak from "@oak/oak";
import { join } from "@std/path";
When you see imports from the old standard library URL, suggest the JSR equivalent:
deno add jsr:@std/path
import { join } from "@std/path";
When you see inline jsr: or npm: specifiers in import statements (and a deno.json exists), suggest moving them to the import map:
deno add jsr:@oak/oak
deno add npm:chalk
import * as oak from "@oak/oak";
import chalk from "chalk";
Inline specifiers are fine in single file scripts, but if a deno.json exists then it should go there. It's preferable to place npm dependencies in a package.json if a package.json exists.
// Flag: Too much JavaScript shipped to client
// islands/HomePage.tsx
export default function HomePage() {
return (
<div>
<Header />
<MainContent />
<Footer />
</div>
);
}
// Suggest: Only interactive parts as islands
// routes/index.tsx
import Counter from "../islands/Counter.tsx";
export default function HomePage() {
return (
<div>
<Header />
<MainContent />
<Counter /> {/* Only this needs interactivity */}
<Footer />
</div>
);
}
// Flag this
<Counter onUpdate={(val) => console.log(val)} />
// Suggest this
<Counter initialValue={5} label="Click count" />
Check if permissions are correct (--allow-net, --allow-read, etc.):
deno run --allow-net server.ts
Check for TypeScript errors:
deno check main.ts
Review deno.json for correct configuration. Ensure all jsr: and npm: specifiers have a version requirement:
{
"imports": {
"@std/http": "jsr:@std/http@^1"
}
}
When more information is needed, consult:
Use deno doc <package> to get API documentation for any package locally.
# Project setup
deno run -Ar jsr:@fresh/init # New Fresh project
# Development
deno task dev # Start dev server (Fresh: port 5173)
deno fmt # Format code
deno lint # Lint code
deno test # Run tests
# Packages
deno add jsr:@std/http # Add package
deno doc jsr:@std/http # View docs
deno install # Install all deps
deno upgrade # Update packages
# Deployment
deno task build # Build for production
deno deploy --prod # Deploy to Deno Deploy
deno deploy env add KEY "value" # Set env variable
Weekly Installs
61
Repository
GitHub Stars
55
First Seen
Feb 7, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
opencode59
codex55
gemini-cli55
github-copilot54
kimi-cli52
amp52
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
116,600 周安装