netlify-typescript-api
Use when designing or implementing TypeScript backend APIs on Netlify, including handler structure, validation, typed contracts, error envelopes, and testable…
Skill by prachwal-archive
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/prachwal-archive-netlify-typescript-api
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, cloud
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/netlify-typescript-api
What's inside
- Skill name
netlify-typescript-api- Description
- Use when designing or implementing TypeScript backend APIs on Netlify, including handler structure, validation, typed contracts, error envelopes, and testable request/response flow.
- License
- MIT
- Instructions
- 58 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- contract-design.md · references/
- handler-patterns.md · references/
- testing.md · references/
SKILL.md (first lines)
# Netlify TypeScript API Skill Use this skill when building a backend API in TypeScript for Netlify Functions or Netlify-compatible serverless routes after the execution primitive has already been chosen. ## Core goals - Keep handlers small, deterministic, and easy to test. - Separate transport concerns from business logic. - Make request and response shapes explicit. - Fail fast on invalid input and return consistent error payloads. - Stay on the current Netlify Functions API instead of the older Lambda event object unless a legacy integration requires compatibility mode. ## Recommended structure - `src/models/` for shared types, schemas, and domain rules. - `src/services/` for database and external API adapters. - `netlify/functions/` for the deployed function entrypoints. - `src/lib/` for shared helpers such as parsing, errors, and logging. - `src/contracts/` for route-level request and response types when the API surface is non-trivial. ## Platform facts that change implementation - The current handler shape is `export default async (req: Request, context: Context) => Response`. - Use `context.params` for path params, `new URL(req.url)` for query params, and `Netlify.env.get()` for runtime env values. - Execution-model choices belong in `netlify-serverless`. ## Implementation rules - Use TypeScript end-to-end and avoid `any`. - Treat `req.json()` as untrusted input and validate it before it reaches services. - Validate all untrusted input at the edge. - Return stable JSON envelopes for success and failure. - Keep framework-specific code out of business logic. - Prefer small composable helpers over large monolithic handlers. - Return `Response` objects directly and use `Response.json()` for JSON payloads. - Use `context.waitUntil()` only for truly non-blocking work such as audit logs or metrics emission. - Keep secret policy and storage choice in the dedicated database skills. ## Reference files ### [`references/handler-patterns.md`](references/handler-patterns.md) **Handler structure and method guards** — Canonical handler with method guard → auth → GET/POST branches, path params via `context.params`, `apiSuccess`/`apiError` response envelope helpers, safe `req.json()` with `.catch(() => null)`, `requireAuth()` JWT helper pattern, rules for validation order and request ID inclusion. ### [`references/contract-design.md`](references/contract-design.md) **API contracts and versioning** — Typed `ApiSuccess<T>`/`ApiCollection<T>`/`ApiError` envelopes, `ok()`/`collection()`/`err()` builders with `satisfies`, error code constants, path-based versioning with `Deprecation`/`Sunset` headers, idempotency key pattern for retryable writes, security response headers. ### [`references/testing.md`](references/testing.md) **Unit and integration testing** — Full vitest handler test with `Request` constructor (GET list, GET by ID, POST create, validation failure, malformed JSON, 401, 405), `vi.mock` of service and auth layers, `vitest.config.ts` for Node environment, `curl`-based `netlify dev` smoke tests, test coverage target table. ## External references - Pair with [../netlify-serverless/SKILL.md](../netlify-serverless/SKILL.md) for execution-model choices. - Pair with [../netlify-database-security/SKILL.md](../netlify-database-security/SKILL.md) when the handler touches persistent data. - [Get started with functions](https://docs.netlify.com/functions/get-started/) - [Serverless Functions API reference](https://docs.netlify.com/build/functions/api/) - [Environment variables and functions](https://docs.netlify.com/functions/environment-variables/)
From prachwal-archive/web-ui-skills, MIT.
More from prachwal-archive/web-ui-skills
- 0.502score
a11y-review
prachwal-archive
Use when reviewing web interfaces for accessibility, including WCAG 2.2 mapping, ARIA misuse, keyboard access, focus management, responsive/mobile behavior…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
docs-instructions
prachwal-archive
Use when maintaining repository Markdown, Copilot instructions, Codex AGENTS.md, repo skills, prompts, or LLM evaluation tasks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
preact-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in Preact apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
react-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in React apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
react-ui
prachwal-archive
Guidance for building, redesigning, or reviewing React TSX pages/components, hooks, state management, styling, routing, accessibility, and Testing Library…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
project-tooling
prachwal-archive
Tooling guidance for Vite, Vitest, TypeScript, ESLint/Biome, package scripts, path aliases, and build/test tooling.
SkillCFreshness: C★ 1Claude Code +9 - 0.437score
netlify-serverless
prachwal-archive
Use when choosing and operating Netlify's serverless execution primitives.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
preact-ui
prachwal-archive
Use when designing, refactoring, or reviewing Preact pages and components, including component structure, MVVM architecture, signals, hooks, forms, routing…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
typescript-fundamentals
prachwal-archive
Use when designing or reviewing TypeScript code structure, type safety, patterns, JSDoc, naming conventions, formatting, and module organization.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
eslint-config
prachwal-archive
Use when setting up, extending, or fixing ESLint configuration for TypeScript projects, including flat config, Preact/React, Node.js, Netlify Functions, and…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
mongodb-netlify
prachwal-archive
Use when building Netlify Functions or full-stack apps that use MongoDB Atlas or MongoDB-compatible deployments.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
neon-netlify
prachwal-archive
Use when building Netlify apps or APIs with Neon Postgres.
SkillDFreshness: D★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 9, 2026 (6 months ago)
- Last release
- Apr 23, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from prachwal-archive
- 0.502score
a11y-review
prachwal-archive
Use when reviewing web interfaces for accessibility, including WCAG 2.2 mapping, ARIA misuse, keyboard access, focus management, responsive/mobile behavior…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
react-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in React apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
docs-instructions
prachwal-archive
Use when maintaining repository Markdown, Copilot instructions, Codex AGENTS.md, repo skills, prompts, or LLM evaluation tasks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
preact-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in Preact apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
react-ui
prachwal-archive
Guidance for building, redesigning, or reviewing React TSX pages/components, hooks, state management, styling, routing, accessibility, and Testing Library…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
project-tooling
prachwal-archive
Tooling guidance for Vite, Vitest, TypeScript, ESLint/Biome, package scripts, path aliases, and build/test tooling.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
netlify-typescript-api skill. Agent Mart. https://agentmart.dev/skills/prachwal-archive-netlify-typescript-api (last updated 2026-10-24)