[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AQ65862CEGSGM7498WHECV":3,"skill-same:01M7AQ65862CEGSGM7498WHECV":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7AQ65862CEGSGM7498WHECV","nestjs-patterns",null,"NestJS architecture patterns for modules, controllers, providers, DTO validation, guards, interceptors, config, and production-grade TypeScript backends. Use when building or reviewing a NestJS backend — modules, providers, DTO validation, guards, or interceptors.","Cyrilthetecchieee\u002Fcyril-code-","Cyrilthetecchieee","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219787998?v=4","01M7AF0MMMKRAA0H61XMJPV92H","Julian Cyril D ","01M7AF0MQ10AVG6QJQ1C2BC0F5",2,"MIT","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Fskills\u002Fnestjs-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nestjs-patterns\ndescription: NestJS architecture patterns for modules, controllers, providers, DTO validation, guards, interceptors, config, and production-grade TypeScript backends. Use when building or reviewing a NestJS backend — modules, providers, DTO validation, guards, or interceptors.\nmetadata:\n  origin: ECC\n---\n\n# NestJS Development Patterns\n\nProduction-grade NestJS patterns for modular TypeScript backends.\n\n## When to Activate\n\n- Building NestJS APIs or services\n- Structuring modules, controllers, and providers\n- Adding DTO validation, guards, interceptors, or exception filters\n- Configuring environment-aware settings and database integrations\n- Testing NestJS units or HTTP endpoints\n\n## Project Structure\n\n```text\nsrc\u002F\n├── app.module.ts\n├── main.ts\n├── common\u002F\n│   ├── filters\u002F\n│   ├── guards\u002F\n│   ├── interceptors\u002F\n│   └── pipes\u002F\n├── config\u002F\n│   ├── configuration.ts\n│   └── validation.ts\n├── modules\u002F\n│   ├── auth\u002F\n│   │   ├── auth.controller.ts\n│   │   ├── auth.module.ts\n│   │   ├── auth.service.ts\n│   │   ├── dto\u002F\n│   │   ├── guards\u002F\n│   │   └── strategies\u002F\n│   └── users\u002F\n│       ├── dto\u002F\n│       ├── entities\u002F\n│       ├── users.controller.ts\n│       ├── users.module.ts\n│       └── users.service.ts\n└── prisma\u002F or database\u002F\n```\n\n- Keep domain code inside feature modules.\n- Put cross-cutting filters, decorators, guards, and interceptors in `common\u002F`.\n- Keep DTOs close to the module that owns them.\n\n## Bootstrap and Global Validation\n\n```ts\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule, { bufferLogs: true });\n\n  app.useGlobalPipes(\n    new ValidationPipe({\n      whitelist: true,\n      forbidNonWhitelisted: true,\n      transform: true,\n      transformOptions: { enableImplicitConversion: true },\n    }),\n  );\n\n  app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)));\n  app.useGlobalFilters(new HttpExceptionFilter());\n\n  await app.listen(process.env.PORT ?? 3000);\n}\nbootstrap();\n```\n\n- Always enable `whitelist` and `forbidNonWhitelisted` on public APIs.\n- Prefer one global validation pipe instead of repeating validation config per route.\n\n## Modules, Controllers, and Providers\n\n```ts\n@Module({\n  controllers: [UsersController],\n  providers: [UsersService],\n  exports: [UsersService],\n})\nexport class UsersModule {}\n\n@Controller('users')\nexport class UsersController {\n  constructor(private readonly usersService: UsersService) {}\n\n  @Get(':id')\n  getById(@Param('id', ParseUUIDPipe) id: string) {\n    return this.usersService.getById(id);\n  }\n\n  @Post()\n  create(@Body() dto: CreateUserDto) {\n    return this.usersService.create(dto);\n  }\n}\n\n@Injectable()\nexport class UsersService {\n  constructor(private readonly usersRepo: UsersRepository) {}\n\n  async create(dto: CreateUserDto) {\n    return this.usersRepo.create(dto);\n  }\n}\n```\n\n- Controllers should stay thin: parse HTTP input, call a provider, return response DTOs.\n- Put business logic in injectable services, not controllers.\n- Export only the providers other modules genuinely need.\n\n## DTOs and Validation\n\n```ts\nexport class CreateUserDto {\n  @IsEmail()\n  email!: string;\n\n  @IsString()\n  @Length(2, 80)\n  name!: string;\n\n  @IsOptional()\n  @IsEnum(UserRole)\n  role?: UserRole;\n}\n```\n\n- Validate every request DTO with `class-validator`.\n- Use dedicated response DTOs or serializers instead of returning ORM entities directly.\n- Avoid leaking internal fields such as password hashes, tokens, or audit columns.\n\n## Auth, Guards, and Request Context\n\n```ts\n@UseGuards(JwtAuthGuard, RolesGuard)\n@Roles('admin')\n@Get('admin\u002Freport')\ngetAdminReport(@Req() req: AuthenticatedRequest) {\n  return this.reportService.getForUser(req.user.id);\n}\n```\n\n- Keep auth strategies and guards module-local unless they are truly shared.\n- Encode coarse access rules in guards, then do resource-specific authorization in services.\n- Prefer explicit request types for authenticated request objects.\n\n## Exception Filters and Error Shape\n\n```ts\n@Catch()\nexport class HttpExceptionFilter implements ExceptionFilter {\n  catch(exception: unknown, host: ArgumentsHost) {\n    const response = host.switchToHttp().getResponse\u003CResponse>();\n    const request = host.switchToHttp().getRequest\u003CRequest>();\n\n    if (exception instanceof HttpException) {\n      return response.status(exception.getStatus()).json({\n        path: request.url,\n        error: exception.getResponse(),\n      });\n    }\n\n    return response.status(500).json({\n      path: request.url,\n      error: 'Internal server error',\n    });\n  }\n}\n```\n\n- Keep one consistent error envelope across the API.\n- Throw framework exceptions for expected client errors; log and wrap unexpected failures centrally.\n\n## Config and Environment Validation\n\n```ts\nConfigModule.forRoot({\n  isGlobal: true,\n  load: [configuration],\n  validate: validateEnv,\n});\n```\n\n- Validate env at boot, not lazily at first request.\n- Keep config access behind typed helpers or config services.\n- Split dev\u002Fstaging\u002Fprod concerns in config factories instead of branching throughout feature code.\n\n## Persistence and Transactions\n\n- Keep repository \u002F ORM code behind providers that speak domain language.\n- For Prisma or TypeORM, isolate transactional workflows in services that own the unit of work.\n- Do not let controllers coordinate multi-step writes directly.\n\n## Testing\n\n```ts\ndescribe('UsersController', () => {\n  let app: INestApplication;\n\n  beforeAll(async () => {\n    const moduleRef = await Test.createTestingModule({\n      imports: [UsersModule],\n    }).compile();\n\n    app = moduleRef.createNestApplication();\n    app.useGlobalPipes(new ValidationPipe({ whitelist: true, transform: true }));\n    await app.init();\n  });\n});\n```\n\n- Unit test providers in isolation with mocked dependencies.\n- Add request-level tests for guards, validation pipes, and exception filters.\n- Reuse the same global pipes\u002Ffilters in tests that you use in production.\n\n## Production Defaults\n\n- Enable structured logging and request correlation ids.\n- Terminate on invalid env\u002Fconfig instead of booting partially.\n- Prefer async provider initialization for DB\u002Fcache clients with explicit health checks.\n- Keep background jobs and event consumers in their own modules, not inside HTTP controllers.\n- Make rate limiting, auth, and audit logging explicit for public endpoints.\n","# NestJS Development Patterns\n\nProduction-grade NestJS patterns for modular TypeScript backends.\n\n## When to Activate\n\n- Building NestJS APIs or services\n- Structuring modules, controllers, and providers\n- Adding DTO validation, guards, interceptors, or exception filters\n- Configuring environment-aware settings and database integrations\n- Testing NestJS units or HTTP endpoints\n\n## Project Structure\n\n```text\nsrc\u002F\n├── app.module.ts\n├── main.ts\n├── common\u002F\n│   ├── filters\u002F\n│   ├── guards\u002F\n│   ├── interceptors\u002F\n│   └── pipes\u002F\n├── config\u002F\n│   ├── configuration.ts\n│   └── validation.ts\n├── modules\u002F\n│   ├── auth\u002F\n│   │   ├── auth.controller.ts\n│   │   ├── auth.module.ts\n│   │   ├── auth.service.ts\n│   │   ├── dto\u002F\n│   │   ├── guards\u002F\n│   │   └── strategies\u002F\n│   └── users\u002F\n│       ├── dto\u002F\n│       ├── entities\u002F\n│       ├── users.controller.ts\n│       ├── users.module.ts\n│       └── users.service.ts\n└── prisma\u002F or database\u002F\n```\n\n- Keep domain code inside feature modules.\n- Put cross-cutting filters, decorators, guards, and interceptors in `common\u002F`.\n- Keep DTOs close to the module that owns them.\n\n## Bootstrap and Global Validation\n\n```ts\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule, { bufferLogs: true });\n\n  app.useGlobalPipes(\n    new ValidationPipe({\n      whitelist: true,\n      forbidNonWhitelisted: true,\n      transform: true,\n      transformOptions: { enableImplicitConversion: true },\n    }),\n  );\n\n  app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)));\n  app.useGlobalFilters(new HttpExceptionFilter());\n\n  await app.listen(process.env.PORT ?? 3000);\n}\nbootstrap();\n```\n\n- Always enable `whitelist` and `forbidNonWhitelisted` on public APIs.\n- Prefer one global validation pipe instead of repeating validation config per route.\n\n## Modules, Controllers, and Providers\n\n```ts\n@Module({\n  controllers: [UsersController],\n  providers: [UsersService],\n  exports: [UsersService],\n})\nexport class UsersModule {}\n\n@Controller('users')\nexport class UsersController {\n  constructor(private readonly usersService: UsersService) {}\n\n  @Get(':id')\n  getById(@Param('id', ParseUUIDPipe) id: string) {\n    return this.usersService.getById(id);\n  }\n\n  @Post()\n  create(@Body() dto: CreateUserDto) {\n    return this.usersService.create(dto);\n  }\n}\n\n@Injectable()\nexport class UsersService {\n  constructor(private readonly usersRepo: UsersRepository) {}\n\n  async create(dto: CreateUserDto) {\n    return this.usersRepo.create(dto);\n  }\n}\n```\n\n- Controllers should stay thin: parse HTTP input, call a provider, return response DTOs.\n- Put business logic in injectable services, not controllers.\n- Export only the providers other modules genuinely need.\n\n## DTOs and Validation\n\n```ts\nexport class CreateUserDto {\n  @IsEmail()\n  email!: string;\n\n  @IsString()\n  @Length(2, 80)\n  name!: string;\n\n  @IsOptional()\n  @IsEnum(UserRole)\n  role?: UserRole;\n}\n```\n\n- Validate every request DTO with `class-validator`.\n- Use dedicated response DTOs or serializers instead of returning ORM entities directly.\n- Avoid leaking internal fields such as password hashes, tokens, or audit columns.\n\n## Auth, Guards, and Request Context\n\n```ts\n@UseGuards(JwtAuthGuard, RolesGuard)\n@Roles('admin')\n@Get('admin\u002Freport')\ngetAdminReport(@Req() req: AuthenticatedRequest) {\n  return this.reportService.getForUser(req.user.id);\n}\n```\n\n- Keep auth strategies and guards module-local unless they are truly shared.\n- Encode coarse access rules in guards, then do resource-specific authorization in services.\n- Prefer explicit request types for authenticated request objects.\n\n## Exception Filters and Error Shape\n\n```ts\n@Catch()\nexport class HttpExceptionFilter implements ExceptionFilter {\n  catch(exception: unknown, host: ArgumentsHost) {\n    const response = host.switchToHttp().getResponse\u003CResponse>();\n    const request = host.switchToHttp().getRequest\u003CRequest>();\n\n    if (exception instanceof HttpException) {\n      return response.status(exception.getStatus()).json({\n        path: request.url,\n        error: exception.getResponse(),\n      });\n    }\n\n    return response.status(500).json({\n      path: request.url,\n      error: 'Internal server error',\n    });\n  }\n}\n```\n\n- Keep one consistent error envelope across the API.\n- Throw framework exceptions for expected client errors; log and wrap unexpected failures centrally.\n\n## Config and Environment Validation\n\n```ts\nConfigModule.forRoot({\n  isGlobal: true,\n  load: [configuration],\n  validate: validateEnv,\n});\n```\n\n- Validate env at boot, not lazily at first request.\n- Keep config access behind typed helpers or config services.\n- Split dev\u002Fstaging\u002Fprod concerns in config factories instead of branching throughout feature code.\n\n## Persistence and Transactions\n\n- Keep repository \u002F ORM code behind providers that speak domain language.\n- For Prisma or TypeORM, isolate transactional workflows in services that own the unit of work.\n- Do not let controllers coordinate multi-step writes directly.\n\n## Testing\n\n```ts\ndescribe('UsersController', () => {\n  let app: INestApplication;\n\n  beforeAll(async () => {\n    const moduleRef = await Test.createTestingModule({\n      imports: [UsersModule],\n    }).compile();\n\n    app = moduleRef.createNestApplication();\n    app.useGlobalPipes(new ValidationPipe({ whitelist: true, transform: true }));\n    await app.init();\n  });\n});\n```\n\n- Unit test providers in isolation with mocked dependencies.\n- Add request-level tests for guards, validation pipes, and exception filters.\n- Reuse the same global pipes\u002Ffilters in tests that you use in production.\n\n## Production Defaults\n\n- Enable structured logging and request correlation ids.\n- Terminate on invalid env\u002Fconfig instead of booting partially.\n- Prefer async provider initialization for DB\u002Fcache clients with explicit health checks.\n- Keep background jobs and event consumers in their own modules, not inside HTTP controllers.\n- Make rate limiting, auth, and audit logging explicit for public endpoints.\n",{"name":5,"metadata":24,"description":7},{"origin":25},"ECC","main","57e7aa6b6e03bce1a7d7862ba9c2ec312f7f19b5","src\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Fskills\u002Fnestjs-patterns",0,"https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee","https:\u002F\u002Fwithcyril.me\u002F","Hi, I’m Julian Cyril D, a Computer Science and Business Systems student at PSNACET.\r\nI’m passionate about full-stack development, UI\u002FUX design, and building sma","2026-11-04 23:28:50",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Cyrilthetecchieee\u002Fcyril-code- --skill nestjs-patterns",{"tool":41,"command":42},"bunx","bunx skills add Cyrilthetecchieee\u002Fcyril-code- --skill nestjs-patterns",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Cyrilthetecchieee\u002Fcyril-code- --skill nestjs-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Fskills\u002Fnestjs-patterns\u002FSKILL.md",true,[],[50,59,66,74,81,88],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":54,"licenseFileUrl":55,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7AQV6CYX8RMC78420V9WZ62","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7AQV2895N3S1MEX6K76G6G2","youtube-downloader","Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Fvideo-downloader\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":54,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7AQTRNX62DNKVZ5GXEHRBKB","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Ftheme-factory\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7AQTNNVHAAN9H6DA8T6ZVE0","template-skill","Replace with description of the skill and when Claude should use it.","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Ftemplate-skill\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7AQTJ3MQ6AKX152MEX2MYCC","tailored-resume-generator","Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Ftailored-resume-generator\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":54,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7AQTD7D5MYET2YWG7HG9WM3","slack-gif-creator","Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like \"make me a GIF for Slack of X doing Y\".","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FCyrilthetecchieee\u002Fcyril-code-\u002Fblob\u002Fmain\u002Fsrc\u002Fcyril_code\u002Fassets\u002F.skills_repo\u002Fslack-gif-creator\u002FSKILL.md",[],[]]