---
name: deno-6ae8e3638c30
slug: deno
version: 1.0.0
description: Build with Deno runtime avoiding permission gotchas, URL import traps, and Node.js migration pitfalls.
homepage: https://clawic.com/skills/deno
metadata:
  clawdbot:
    emoji: 🦕
    requires:
      bins:
      - deno
    os:
    - linux
    - darwin
    - win32
    displayName: Deno
---

## When to Use

User needs Deno expertise — secure TypeScript runtime with permissions model. Agent handles permission configuration, dependency management via URLs/npm, and migration from Node.js.

## Quick Reference

| Topic | File |
|-------|------|
| Permission system | `permissions.md` |
| Imports and dependencies | `imports.md` |
| Node.js migration | `node-compat.md` |

## Permission Traps

- `--allow-all` in development — then production crashes because you don't know what permissions you actually need
- `--allow-read` without path — grants access to entire filesystem, security hole
- `--allow-run` without list — subprocess can run anything, specify: `--allow-run=git,npm`
- `--allow-env` without list — leaks all env vars, specify: `--allow-env=API_KEY,DATABASE_URL`
- `--allow-net` without list — can connect anywhere, specify hosts: `--allow-net=api.example.com`
- Missing permission in CI — hangs waiting for prompt that never comes, add `--no-prompt`

## Import Traps

- Remote URLs in production — network failure = app won't start, vendor dependencies locally
- No lockfile by default — deps can change between runs, always use `deno.lock`
- `@^1.0.0` semver syntax doesn't exist — use exact URLs or import maps
- Import maps in wrong place — must be in `deno.json`, not separate file (Deno 2.x)
- HTTPS required — HTTP imports blocked by default, most CDNs work but self-hosted may not
- URL typo — no error until runtime when import fails

## TypeScript Traps

- `.ts` extension required in imports — model generates extensionless imports that fail
- `tsconfig.json` paths ignored — Deno uses import maps in `deno.json`, not tsconfig
- Type-only imports — must use `import type` or bundler may fail
- Decorators — experimental, different from tsc behavior
- `/// <reference>` — handled differently than tsc, may be ignored

## Deployment Traps

- `deno compile` includes runtime — binary is 50MB+ minimum
- `--cached-only` requires prior cache — fresh server needs `deno cache` first
- Deno Deploy limitations — no filesystem, no subprocess, no FFI
- Environment variables — different API: `Deno.env.get("VAR")` not `process.env.VAR`
- Signals — `Deno.addSignalListener` not `process.on("SIGTERM")`

## Testing Traps

- `Deno.test` different from Jest — no `describe`, different assertions
- Async test without await — test passes before promise resolves
- Resource leaks — tests fail if you don't close files/connections
- Permissions in tests — test may need different permissions than main code
- Snapshot testing — format differs from Jest snapshots

## npm Compatibility Traps

- `npm:` specifier — works for most packages but native addons fail
- `node:` specifier required — `import fs from 'fs'` fails, need `import fs from 'node:fs'`
- `node_modules` optional — enable with `"nodeModulesDir": true` in deno.json
- `package.json` scripts — not automatically supported, use deno.json tasks
- Peer dependencies — handled differently, may get wrong versions

## Runtime Differences

- `Deno.readTextFile` vs `fs.readFile` — different API, different error types
- `fetch` is global — no import needed, unlike Node 18-
- Top-level await — works everywhere, no wrapper needed
- Permissions at runtime — can request dynamically but user must approve


---
Source attribution: clawic
Original project: https://github.com/clawic/skills/blob/f825206afbf1c697202533a9187be68c7b697e0e/skills/deno/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Ivan G. Davila

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: clawic
Original project: https://github.com/clawic/skills/blob/f825206afbf1c697202533a9187be68c7b697e0e/skills/deno/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Backend Developer, DevOps / SRE, Full-Stack Developer, Product Manager, Technical Product Manager
Specialties: Backend
Tools: Deno
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 266f2b9b0415c086194f0b753dd5fc9df874a14cde534e5525f86ec99237174a
