/harness-claude:nestjs-controller-patternfrom harness-claude
Define HTTP route handlers in NestJS using @Controller, method decorators, parameter extraction, and API versioning.
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-controller-pattern 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.
Define HTTP route handlers with @Controller, method decorators, params, and versioning
@Controller('resource') to set the route prefix. Use kebab-case for multi-word resources (@Controller('user-profiles')).@Get(), @Post(), @Put(), @Patch(), @Delete() to bind HTTP methods. Nest the path in the decorator when appropriate: @Get(':id').@Param('id') — path parameter@Query('page') — query string parameter@Body() — full request body (use a DTO class for type safety)@Headers('authorization') — request header@Req() / @Res() — raw Express/Fastify request/response (avoid unless necessary)@Res() unless you need to stream or set custom headers — doing so bypasses NestJS interceptors and exception filters.@HttpCode(201) to @Post() handlers that create resources (default is 200).@Header('Cache-Control', 'no-cache') for static header overrides.@Controller({ path: 'articles', version: '1' })
export class ArticlesController {
constructor(private readonly articlesService: ArticlesService) {}
@Get()
findAll(@Query('page') page = 1, @Query('limit') limit = 20) {
return this.articlesService.findAll({ page, limit });
}
@Get(':id')
findOne(@Param('id', ParseUUIDPipe) id: string) {
return this.articlesService.findOne(id);
}
@Post()
@HttpCode(201)
create(@Body() createArticleDto: CreateArticleDto) {
return this.articlesService.create(createArticleDto);
}
@Patch(':id')
update(@Param('id', ParseUUIDPipe) id: string, @Body() dto: UpdateArticleDto) {
return this.articlesService.update(id, dto);
}
@Delete(':id')
@HttpCode(204)
remove(@Param('id', ParseUUIDPipe) id: string) {
return this.articlesService.remove(id);
}
}
main.ts: app.enableVersioning({ type: VersioningType.URI }). Then use @Controller({ version: '1' }) or @Version('2') on individual handlers.Controllers are the entry point for HTTP requests in NestJS. They are registered in the controllers array of their parent module and are not injectable themselves.
Route ordering: NestJS registers routes in declaration order. Static routes (/articles/trending) must be declared before dynamic routes (/articles/:id) within the same controller to avoid shadowing.
@Res() caution: When you inject @Res(), NestJS hands off response management entirely to you. Interceptors (including serialization and transformation interceptors) will NOT run. If you only need to set headers or status codes, use @HttpCode() and @Header() decorators instead. If you must use @Res(), pass { passthrough: true } to keep NestJS in control: @Res({ passthrough: true }).
Pipe integration: Built-in pipes like ParseIntPipe, ParseUUIDPipe, ParseBoolPipe can be passed directly in the parameter decorator: @Param('id', ParseUUIDPipe) id: string. The pipe validates and transforms before the handler executes.
Versioning strategies: URI (/v1/articles), Header (X-API-Version: 1), Media Type (Accept: application/vnd.api+json;v=1), and Custom are all supported. URI versioning is the most visible and cacheable.
https://docs.nestjs.com/controllers
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Read 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 communication/a11y-image-text-altImage and Text Alternatives> Write effective alt text for images and provide text alternatives for all non-text content/a11y-keyboard-navigationKeyboard Navigation> Ensure all interactive elements are reachable and operable via keyboard alone without requiring a mouse/a11y-modal-patternsAccessible Modal Dialog Patterns> Build accessible modal dialogs with focus trapping, escape dismissal, background inertness, and screen reader announcementsnpx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeOther plugins' skills for the same job