Skip to content
Back to skills

Api Standards Hoangnguyen0403 Agent Skills Standar

ASecurity

Response wrapping, pagination, and error standardization.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 2, 2026
ai-agentstypescriptapi

Works with

  • api

Security analysis

A100/100

Scanned June 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill api-standards-hoangnguyen0403-agent-skills-standar --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Standards Hoangnguyen0403 Agent Skills Standar?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Standards Hoangnguyen0403 Agent Skills Standar
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-api-standards-hoangnguyen0403-agent-skills-standar/badge)](https://www.skillsdirectory.com/skills/majiayu000-api-standards-hoangnguyen0403-agent-skills-standar)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: NestJS API Standards
description: Response wrapping, pagination, and error standardization.
metadata:
  labels: [nestjs, api, pagination, response]
  triggers:
    files: ['**/*.controller.ts', '**/*.dto.ts']
    keywords: [ApiResponse, Pagination, TransformInterceptor]
---

# NestJS API Standards & Common Patterns

## **Priority: P1 (OPERATIONAL)**

Standardized API response patterns and common NestJS conventions.

## Generic Response Wrapper

- **Concept**: Standardize all successful API responses.
- **Implementation**: Use `TransformInterceptor` to wrap data in `{ statusCode, data, meta }`.

## Pagination Standards (Pro)

- **DTOs**: Use strict `PageOptionsDto` (page/take/order) and `PageDto<T>` (data/meta).
- **Swagger Logic**: Generics require `ApiExtraModels` and schema path resolution.
- **Reference**: See [Pagination Wrapper Implementation](references/pagination-wrapper.md) for the complete `ApiPaginatedResponse` decorator code.

## Custom Error Response

- **Standard Error Object**:

  ```typescript
  export class ApiErrorResponse {
    @ApiProperty()
    statusCode: number;

    @ApiProperty()
    message: string;

    @ApiProperty()
    error: string;

    @ApiProperty()
    timestamp: string;

    @ApiProperty()
    path: string;
  }
  ```

- **Docs**: Apply `@ApiBadRequestResponse({ type: ApiErrorResponse })` globally or per controller.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.