Skip to main content

code-review

Review code quality, patterns, and best practices

Datos de origen

Repositorio
vinilana/workshop-yungas
Última actividad en el origen
2 de marzo de 2026 a las 18:43
Idioma detectado de SKILL.md
inglés
Estrellas
0
Forks
0

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
type
skill
name
Code Review
description
Review code quality, patterns, and best practices
skillSlug
code-review
phases
["R","V"]
generated
2026-03-02T00:00:00.000Z
status
filled
scaffoldVersion
2.0.0
# Code Review ## When to Use Activate this skill when reviewing code changes (not necessarily a PR) for quality, patterns, and adherence to project conventions. This is a broader review than PR review — it can apply to any code segment. ## Instructions 1. **Type safety**: Verify TypeScript strict mode compliance. Check for implicit `any`, missing return types on public methods, and proper null handling. 2. **Pattern adherence**: - NestJS: Modules, injectable services, controllers with decorators, guards for auth. - Express: Middleware chain, router handlers, inline SQL with prepared statements. - Next.js: App Router conventions, `"use client"` directives, React hooks. - Svelte: Runes (`$state`, `$derived`, `$effect`), SvelteKit file routing. 3. **Error handling**: All async operations wrapped in try/catch. API errors return proper status codes and `ApiErrorResponse` shape. 4. **Database access**: Parameterized queries only. No string concatenation in SQL. WAL mode enabled. 5. **Code smells**: - Functions longer than 50 lines → suggest extraction. - Duplicated logic between backends → suggest shared utility. - Magic numbers or strings → suggest constants in `packages/shared`. - Deep nesting (>3 levels) → suggest early returns or extraction. 6. **Security**: No SQL injection, no XSS vectors, no exposed secrets, auth on all endpoints. 7. **Legacy awareness**: Verify no new features are being added to legacy projects (Express.js, Next.js). Only critical bug fixes are permitted in `apps/backend-express` and `apps/frontend-nextjs`. New development must target NestJS and SvelteKit. ## Examples **Good pattern:** ```typescript // NestJS service with proper error handling async findOne(id: number): Promise<Franchise> { const row = this.db.prepare('SELECT * FROM franchises WHERE id = ?').get(id); if (!row) throw new NotFoundException(`Franchise #${id} not found`); return this.mapRow(row); } ``` **Code smell:** ```typescript // Duplicated row mapping — should be in shared package const franchise = { id: row.id, name: row.name, ownerName: row.owner_name, // exists in both Express and NestJS // ... }; ```
Ver en GitHub