daloyjs-best-practices

Codify DaloyJS API best practices for routes, schemas, and security.

18|2|Updated May 14, 2026
One-click install
npx skills add https://github.com/daloyjs/daloy --skill daloyjs-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: daloyjs-best-practices
Source: https://github.com/daloyjs/daloy/tree/main/packages/create-daloy/templates/deno-basic/_agents/skills/daloyjs-best-practices
Command: npx skills add https://github.com/daloyjs/daloy --skill daloyjs-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Best practices for building, testing, and hardening this DaloyJS REST API on the Deno runtime. This guide is the single source of truth for adding routes, writing tests, ensuring secure defaults, managing permissions, and aligning with quality gates across the project.

Core Features & Use Cases

  • Contract-first routing and validation with Zod: ensure request and response schemas are defined at the route level and validated at boundaries.
  • Secure-by-default baseline: enforce requestId, secureHeaders, and rateLimit, with explicit permissions in deno.json.
  • OpenAPI generation and docs: guidelines to regenerate the API spec and keep docs in sync.
  • Testing, typechecking, and governance: recommended testing patterns, test coverage goals, and code-review guardrails to maintain quality gates.

Quick Start

Review this guidance before making substantial changes to routes, tests, or security configurations to ensure compliant, secure deployments.

Frequently Asked Questions about daloyjs-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I secure API routes in DaloyJS on Deno?

Secure API routes in DaloyJS by enforcing secureHeaders, requestId, and rateLimit middleware, and declaring explicit permissions in deno.json to restrict file system and network access.

What is the best way to validate request schemas in DaloyJS?

Validate request schemas in DaloyJS by defining Zod schemas directly at the route level, ensuring data is validated at boundaries before processing logic handles the payload.

How does OpenAPI spec generation work for Deno REST APIs?

OpenAPI spec generation for Deno REST APIs involves regenerating the API document from route definitions and schemas, keeping API docs perfectly synchronized with code changes.

Can I use Zod for contract-first routing in DaloyJS?

Yes, you can use Zod for contract-first routing in DaloyJS by enforcing request and response schemas at the route level, ensuring strict boundary validation and type safety.

What are the testing and typechecking patterns for DaloyJS projects?

Testing and typechecking patterns for DaloyJS projects involve applying recommended test coverage goals and code-review guardrails to maintain quality gates during substantial route or schema updates.

Why do I need explicit permissions in deno.json for DaloyJS APIs?

Explicit permissions in deno.json are needed for DaloyJS APIs to establish a secure-by-default baseline, preventing unauthorized network or file system access during runtime execution.