Write Cross Cutting Code

Use when writing a reusable request-pipeline primitive rather than feature logic — a custom decorator (param/metadata/method-wrapper + applyDecorators bundles), a guard (metadata-driven role/scope, or an OR-composition "any of these guards" guard), a pipe (polymorphic/variant DTO validation, or wrapping a built-in pipe to throw your typed error), an interceptor (metadata-driven audit/logging that fires after the response), middleware (correlation id), or a custom validation constraint (sync or async-with-DI via class-validator). NestJS reference, framework-flexible.

kennguyen887 7c8cd16 9.8 KB Updated

File contents

kennguyen887/agent-foundation/tree/main/skills/write-cross-cutting-code commit 7c8cd162d6

Frequently asked questions

npx skillmds@latest add kennguyen887/write-cross-cutting-code