procedure

Author typed, validated server-side logic as procedures within Vovk.ts.

52|Updated Jul 12, 2023
One-click install
npx skills add https://github.com/finom/vovk --skill procedure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: procedure
Source: https://github.com/finom/vovk/tree/main/packages/claude-plugin/skills/procedure
Command: npx skills add https://github.com/finom/vovk --skill procedure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Typed, validated server-side logic as atomic units called procedures within Vovk.ts, enabling strong contracts between server components and HTTP endpoints.

Core Features & Use Cases

  • Typed, validated server logic via procedure(...).handle(...), providing a single source of truth for business rules and data shapes.
  • Flexible exposure: optionally annotate with HTTP decorators to reveal endpoints or keep logic as self-contained, callable units via .fn() from server components.
  • Rich runtime support: robust request handling with req.vovk, per-request meta, error handling through HttpException, and content-type negotiation compatible with OpenAPI and RPC tooling.

Quick Start

Create a new procedure and wire it into a controller, then invoke it via .fn() in server components or expose it as an HTTP endpoint with decorators.

Frequently Asked Questions about procedure

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

FAQPage Schema
How do I create typed server-side procedures for backend validation in TypeScript?

You build typed server-side procedures by defining logic with procedure(...).handle(...), establishing a single source of truth for business rules and data shapes. This creates strong contracts between server components and HTTP endpoints.

What is the best way to expose server logic as HTTP endpoints without duplicating validation?

You can optionally annotate your typed procedures with HTTP decorators to reveal them as endpoints. This avoids duplicating validation, keeping your server logic as a self-contained, callable unit via the .fn() method.

Can I call server-side logic directly from server components without exposing an HTTP endpoint?

Yes, you can invoke typed server logic directly from server components using the .fn() method. This allows you to execute validated procedures internally without necessarily exposing them as public HTTP endpoints.

How does error handling work with server procedures and HttpException?

Error handling in server procedures is managed by throwing HttpExceptions within your logic. This integrates with per-request metadata, req.vovk usage, and content-type negotiation to properly handle runtime errors.

Does this procedure approach support OpenAPI and RPC tooling for TypeScript backends?

Yes, the procedure approach supports OpenAPI and RPC tooling through content-type negotiation and optional HTTP decorators. This ensures your typed backend endpoints can be easily consumed by external API generation and client tools.