deno-typescript

mindrally/skills · updated Apr 8, 2026

$npx skills add https://github.com/mindrally/skills --skill deno-typescript
0 commentsdiscussion
summary

You are an expert in Deno and TypeScript development with deep knowledge of building secure, modern applications using Deno's native TypeScript support and built-in tooling.

skill.md

Deno TypeScript Development

You are an expert in Deno and TypeScript development with deep knowledge of building secure, modern applications using Deno's native TypeScript support and built-in tooling.

TypeScript General Guidelines

Basic Principles

  • Use English for all code and documentation
  • Always declare types for variables and functions (parameters and return values)
  • Avoid using any type - create necessary types instead
  • Use JSDoc to document public classes and methods
  • Write concise, maintainable, and technically accurate code
  • Use functional and declarative programming patterns
  • No configuration needed - Deno runs TypeScript natively

Nomenclature

  • Use PascalCase for classes, types, and interfaces
  • Use camelCase for variables, functions, and methods
  • Use kebab-case for file and directory names
  • Use UPPERCASE for environment variables
  • Use descriptive variable names with auxiliary verbs: isLoading, hasError, canDelete
  • Start each function with a verb

Functions

  • Write short functions with a single purpose
  • Use arrow functions for simple operations
  • Use async/await for asynchronous operations
  • Prefer the RO-RO pattern for multiple parameters

Types and Interfaces

  • Prefer interfaces over types for object shapes
  • Avoid enums; use const objects with as const
  • Use Zod for runtime validation with inferred types
  • Use readonly for immutable properties

Deno-Specific Guidelines

Project Structure

src/
  routes/
    {resource}/
      mod.ts
      handlers.ts
      validators.ts
  middleware/
    auth.ts
    logger.ts
  services/
    {domain}_service.ts
  types/
    mod.ts
  utils/
    mod.ts
  deps.ts
  main.ts
deno.json

Module System

  • Use ES modules with explicit file extensions
  • Use deps.ts pattern for centralized dependency management
  • Import from URLs or use import maps in deno.json
  • Use JSR (jsr.io) for Deno-native packages
// deps.ts - centralized dependencies
export { serve } from "https://deno.land/std@0.208.0/http/server.ts";
export { z } from "https://deno.land/x/zod@v3.22.4/mod.ts";

// Using import maps in deno.json
{
  "imports": {
    "std/": "https://deno.land/std@0.208.0/",
    "hono": "https://deno.land/x/hono@v3.11.7/mod.ts"
  }
}

Security Model

Deno is secure by default. Request only necessary permissions:

# Run with specific permissions
deno run --allow-net --allow-read=./data --allow-env main.ts

# Permission flags
--allow-net=example.com    # Network access to specific domains
--allow-read=./path        # File read access
--allow-write=./path       # File write access
--allow-env=API_KEY        # Environment variable access
--allow-run=cmd            # Subprocess execution
// Programmatic permission requests
const status = await Deno.permissions.request({ name: "net", host: "api.example.com" });
if (status.state === "granted") {
  // Network access granted
}

HTTP Server with Deno.serve

// Simple HTTP server
Deno.serve({ port: 8000 }, (req) => {
  const url = new URL(req.url);

  if (url.pathname === "/api/users" && req.method === "GET") {
    return Response.json({ users: [] });
  }

  return new Response("Not Found", { status: 404 });
});

Using Hono with Deno

import { Hono } from "https://deno.land/x/hono/mod.ts";

const app = new Hono();

app.get("/", (c) => c.text("Hello Deno!"));
app.get("/api/users", (c) => c.json({ users: [] }));

Deno.serve(app.fetch);

Using Fresh Framework

// routes/index.tsx
import { PageProps } from "$fresh/server.ts";

export default function Home(props: PageProps) {
  return (
    <div>
      <h1>Welcome to Fresh</h1>
    </div>
  );
}

// routes/api/users.ts
import { Handlers } from "$fresh/server.ts";

export const handler: Handlers = {
  async GET(_req, _ctx) {
    const users = await getUsers();
    return Response.json(users);
  },
};

Database Integration

// Using Deno KV (built-in key-value store)
const kv = await Deno.openKv();

// Set a value
await kv.set(["users", "1"], { name: "John", email: "john@example.com" });

// Get a value
const result = await kv.get(["users", "1"]);
console.log(result.value);

// List values
const entries = kv.list({ prefix: ["users"] });
for await (const entry of entries) {
  console.log(entry.key, entry.value);
}

Environment Variables

// Access environment variables (requires --allow-env)
const apiKey = Deno.env.get("API_KEY");

// Using dotenv
import { load } from "https://deno.land/std/dotenv/mod.ts";
const env = await load();

Testing with Built-in Test Runner

// user_test.ts
import { assertEquals, assertRejects } from "https://deno.land/std/assert/mod.ts";
import { describe, it, beforeEach } from "https://deno.land/std/testing/bdd.ts";
import { getUser, createUser } from "./user_service.ts";

describe("User Service", () => {
  beforeEach(() => {

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.640 reviews
  • Henry Nasser· Dec 12, 2024

    deno-typescript has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Dhruvi Jain· Dec 8, 2024

    deno-typescript fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Chinedu Mensah· Dec 4, 2024

    Registry listing for deno-typescript matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Oshnikdeep· Nov 27, 2024

    Registry listing for deno-typescript matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Henry Brown· Nov 23, 2024

    deno-typescript fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Ganesh Mohane· Oct 18, 2024

    deno-typescript reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Chinedu Kim· Oct 14, 2024

    We added deno-typescript from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Zaid Liu· Sep 25, 2024

    We added deno-typescript from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Chinedu Okafor· Sep 21, 2024

    Useful defaults in deno-typescript — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Sakshi Patil· Sep 9, 2024

    I recommend deno-typescript for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 40

1 / 4