/harness-claude:nestjs-swagger-integrationfrom harness-claude
Documents NestJS APIs with @nestjs/swagger: annotates controllers, DTOs, and generates interactive OpenAPI specs at /api.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:nestjs-swagger-integration still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Document APIs with @ApiProperty, @ApiOperation, @ApiTags, and DocumentBuilder
/api (or a custom path)npm install @nestjs/swagger swagger-ui-express
// main.ts
const config = new DocumentBuilder()
.setTitle('My API')
.setDescription('REST API documentation')
.setVersion('1.0')
.addBearerAuth()
.build();
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api', app, document, {
swaggerOptions: { persistAuthorization: true },
});
@ApiTags('users')
@Controller('users')
export class UsersController {
@ApiOperation({ summary: 'Get a user by ID' })
@ApiParam({ name: 'id', type: 'string', format: 'uuid' })
@ApiResponse({ status: 200, type: UserDto })
@ApiResponse({ status: 404, description: 'User not found' })
@Get(':id')
findOne(@Param('id') id: string) { ... }
@ApiOperation({ summary: 'Create a user' })
@ApiBody({ type: CreateUserDto })
@ApiResponse({ status: 201, type: UserDto })
@ApiBearerAuth()
@Post()
create(@Body() dto: CreateUserDto) { ... }
}
export class CreateUserDto {
@ApiProperty({ example: '[email protected]', description: 'User email address' })
@IsEmail()
email: string;
@ApiProperty({ example: 'myP@ssw0rd', minLength: 8 })
@IsString()
@MinLength(8)
password: string;
@ApiPropertyOptional({ example: 'John Doe' })
@IsOptional()
@IsString()
displayName?: string;
}
@nestjs/swagger (not @nestjs/mapped-types) for full Swagger compatibility:import { PartialType, OmitType, PickType } from '@nestjs/swagger';
export class UpdateUserDto extends PartialType(CreateUserDto) {}
export class UserProfileDto extends OmitType(CreateUserDto, ['password']) {}
@ApiResponse({ status: 200, schema: {
properties: {
data: { type: 'array', items: { $ref: getSchemaPath(UserDto) } },
total: { type: 'number' },
page: { type: 'number' },
}
}})
@nestjs/swagger uses TypeScript reflection metadata to auto-detect types in DTOs and controllers. When emitDecoratorMetadata is enabled in tsconfig.json (it must be for NestJS to work), most types are inferred automatically.
Enum documentation: Pass enum: MyEnum in @ApiProperty for Swagger to show all valid values: @ApiProperty({ enum: UserRole, enumName: 'UserRole' }).
@ApiHideProperty(): Exclude a property from the Swagger spec (e.g., internal tracking fields) without removing it from the DTO class.
CLI plugin (recommended): Add to nest-cli.json to auto-add @ApiProperty based on class-validator decorators — eliminates duplication:
{
"compilerOptions": {
"plugins": ["@nestjs/swagger"]
}
}
Exclude from production: The Swagger UI and spec endpoint should be conditionally registered. Wrap the SwaggerModule.setup() call: if (process.env.NODE_ENV !== 'production') { ... }.
Export the spec: SwaggerModule.createDocument() returns a plain OpenAPI 3.0 object. Write it to disk with fs.writeFileSync('swagger.json', JSON.stringify(document)) to integrate with API gateway import workflows.
https://docs.nestjs.com/openapi/introduction
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job