AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Nean Api Docs

skill-edfenton-claude-skills-nean-api-docs · by edfenton

Generate and serve OpenAPI documentation from NestJS decorators.

No reviews yet
0 installs
16 views
0.0% view→install

Install

$ agentstack add skill-edfenton-claude-skills-nean-api-docs

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-edfenton-claude-skills-nean-api-docs)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Nean Api Docs? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Purpose

Generate and serve OpenAPI (Swagger) documentation using @nestjs/swagger decorators.

Arguments

  • --serve — Ensure Swagger UI is available at /api/docs
  • --export — Export OpenAPI spec to file (default: openapi.json)
  • (no args) — Audit endpoints for missing documentation

What gets created/updated

apps/api/src/
├── main.ts                     # Swagger setup (if not present)
└── modules/**/
    └── *.controller.ts         # API decorators added
    
openapi.json                    # Generated spec (if --export)

How it works

NestJS Swagger reads decorators from:

  1. Controllers@ApiTags, @ApiOperation, @ApiResponse
  2. DTOs@ApiProperty from class-validator decorators
  3. Parameters@ApiParam, @ApiQuery, @ApiBody

Decorator conventions

Controller decorators

@Controller('users')
@ApiTags('users')
@UseGuards(JwtAuthGuard)
@ApiBearerAuth()
export class UsersController {
  @Get()
  @ApiOperation({ summary: 'List all users' })
  @ApiPaginatedResponse(UserResponseDto)
  findAll(@Query() query: PaginationDto) {}

  @Get(':id')
  @ApiOperation({ summary: 'Get user by ID' })
  @ApiResponse({ status: 200, type: UserResponseDto })
  @ApiResponse({ status: 404, description: 'User not found' })
  findOne(@Param('id', ParseUUIDPipe) id: string) {}

  @Post()
  @ApiOperation({ summary: 'Create new user' })
  @ApiCreatedResponse({ type: UserResponseDto })
  @ApiBadRequestResponse({ description: 'Validation failed' })
  create(@Body() dto: CreateUserDto) {}
}

DTO decorators

export class CreateUserDto {
  @ApiProperty({ 
    description: 'User email address',
    example: 'user@example.com' 
  })
  @IsEmail()
  email: string;

  @ApiProperty({ 
    description: 'Display name',
    minLength: 1,
    maxLength: 100 
  })
  @IsString()
  @MinLength(1)
  @MaxLength(100)
  name: string;

  @ApiPropertyOptional({ 
    description: 'Profile bio',
    default: '' 
  })
  @IsOptional()
  @IsString()
  bio?: string;
}

Swagger setup (main.ts)

import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  // Swagger configuration
  const config = new DocumentBuilder()
    .setTitle('My API')
    .setDescription('API documentation')
    .setVersion('1.0')
    .addBearerAuth()
    .addTag('health', 'Health check endpoints')
    .addTag('auth', 'Authentication endpoints')
    .addTag('users', 'User management')
    .build();

  const document = SwaggerModule.createDocument(app, config);
  SwaggerModule.setup('api/docs', app, document, {
    swaggerOptions: {
      persistAuthorization: true,
    },
  });

  await app.listen(3000);
}

Swagger UI

When configured, Swagger UI is available at /api/docs:

  • Interactive API explorer
  • Try-it-out functionality (with auth)
  • Schema visualization
  • Download OpenAPI spec

Audit checklist

When auditing documentation:

  • [ ] All controllers have @ApiTags
  • [ ] All endpoints have @ApiOperation with summary
  • [ ] All response codes documented with @ApiResponse
  • [ ] All DTOs have @ApiProperty decorators
  • [ ] Examples provided for complex types
  • [ ] Auth requirements documented (@ApiBearerAuth)
  • [ ] Error responses documented

Workflow

  1. Ensure @nestjs/swagger is installed
  2. Configure Swagger in main.ts
  3. Audit controllers for missing decorators
  4. Add decorators as needed
  5. Verify documentation at /api/docs

Output

  • Endpoints documented count
  • Missing documentation warnings
  • Spec file location (if exported)

Reference

For setup and customization, see reference/nean-api-docs-reference.md

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.