odjaramillo/custom-rules/nestjs

Claude Code and agent skill by odjaramillo/custom-rules

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

NestJS best practices with decorators, modules, and TypeORM. Trigger: When building NestJS applications with decorators.

Install

npx vskill@latest install odjaramillo/custom-rules/nestjs

SKILL.md

The same SKILL.md was published earlier as odjaramillo/custom-rules/nestjs.

Critical Patterns

Module Organization (REQUIRED)
typescript
// ✅ ALWAYS: Feature modules with clear boundaries
@Module({
imports: [TypeOrmModule.forFeature([User])],
controllers: [UsersController],
providers: [UsersService],
exports: [UsersService],
})
export class UsersModule {}
DTOs with Validation (REQUIRED)
typescript
// ✅ ALWAYS: Use class-validator decorators
export class CreateUserDto {
@IsString()
@MinLength(2)
name: string;
@IsEmail()
email: string;
@IsString()
@MinLength(8)
password: string;
}
Exception Filters (REQUIRED)
typescript
// ✅ ALWAYS: Custom exceptions for domain errors
export class UserNotFoundException extends NotFoundException {
constructor(userId: string) {
super(`User with ID ${userId} not found`);
}
}
// Global exception filter
@Catch()
export class AllExceptionsFilter implements ExceptionFilter {
catch(exception: unknown, host: ArgumentsHost) {
// Handle all exceptions
}
}

Decision Tree

Need CRUD? → Use @nestjs/crud
Need auth? → Use @nestjs/passport + JWT
Need caching? → Use @nestjs/cache-manager
Need queue processing? → Use @nestjs/bull
Need GraphQL? → Use @nestjs/graphql
Need WebSockets? → Use @nestjs/websockets

Code Examples

Controller with Guards
typescript
@Controller('users')
@UseGuards(JwtAuthGuard)
export class UsersController {
constructor(private readonly usersService: UsersService) {}
@Get(':id')
async findOne(@Param('id') id: string): Promise<User> {
return this.usersService.findById(id);
}
@Post()
@UsePipes(new ValidationPipe({ transform: true }))
async create(@Body() dto: CreateUserDto): Promise<User> {
return this.usersService.create(dto);
}
}
Service with Repository
typescript
@Injectable()
export class UsersService {
constructor(
@InjectRepository(User)
private usersRepository: Repository<User>,
) {}
async findById(id: string): Promise<User> {
const user = await this.usersRepository.findOne({ where: { id } });
if (!user) throw new UserNotFoundException(id);
return user;
}
}

Commands

bash
nest new myapp
nest generate module users
nest generate controller users
nest generate service users
npm run start:dev
npm run test

Resources

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/odjaramillo/custom-rules/nestjs/badge)](https://verified-skill.com/skills/odjaramillo/custom-rules/nestjs)

Something wrong with this skill or its page? Tell us.