用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/edfenton/claude-skills --skill nean-api-docs命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Scaffold a pnpm + Turborepo MERN monorepo with Next.js, tooling, tests, CI, and optional GitHub repo creation.
Configure GitHub repository security with branch protection, Dependabot, security scanning, and CI workflows. Integrates with mern-scaffold, nean-scaffold, and iOS projects.
Harden a Vercel deployment with security headers, CSP, bot protection, and deployment configuration
正在显示 SKILL.md
基于 SOC 职业分类
| name | nean-api-docs |
| description | Generate and serve OpenAPI documentation from NestJS decorators. |
| argument-hint | [--serve] [--export <path>] |
| allowed-tools | Bash, Write, Read, Glob, Grep |
Generate and serve OpenAPI (Swagger) documentation using @nestjs/swagger decorators.
--serve — Ensure Swagger UI is available at /api/docs--export <path> — Export OpenAPI spec to file (default: openapi.json)apps/api/src/
├── main.ts # Swagger setup (if not present)
└── modules/**/
└── *.controller.ts # API decorators added
openapi.json # Generated spec (if --export)
NestJS Swagger reads decorators from:
@ApiTags, @ApiOperation, @ApiResponse@ApiProperty from class-validator decorators@ApiParam, @ApiQuery, @ApiBody@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() {}
}
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;
}
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);
}
When configured, Swagger UI is available at /api/docs:
When auditing documentation:
@ApiTags@ApiOperation with summary@ApiResponse@ApiProperty decorators@ApiBearerAuth)For setup and customization, see reference/nean-api-docs-reference.md