Skip to content
Development
Command

/devkit.typescript.code-review

Provides comprehensive TypeScript monorepo code review for Nx workspaces including NestJS backend, React web, and React Native mobile apps. Use when reviewing architecture, boundaries, security, performance, CI/CD and Nx-specific practices.

From plugin
developer-kit
37135 skills44 agents35 commands2 MCP
> /plugin marketplace add giuseppe-trisciuoglio/developer-kit
> /plugin install developer-kit@developer-kit

Command definition

devkit.typescript.code-review.md
allowed-tools: Read, Write, Bash, Edit, Grep, Glob
argument-hint: "[review-type] [file/directory-path] [options]"
description: Provides comprehensive TypeScript monorepo code review for Nx workspaces including NestJS backend, React web, and React Native mobile apps. Use when reviewing architecture, boundaries, security, performance, CI/CD and Nx-specific practices.
model: inherit

TypeScript Monorepo Code Review - Nx / NestJS / React / React Native

Overview

Provides comprehensive TypeScript monorepo code review for Nx workspaces including NestJS backend, React web, and React Native mobile apps. Use when reviewing architecture, boundaries, security, performance, CI/CD and Nx-specific practices.

Usage

/devkit.typescript.code-review $ARGUMENTS

Arguments

| Argument | Description | |--------------|------------------------------------------| | `$ARGUMENTS` | Combined arguments passed to the command |

Current Context

  • **Current Git Branch**: !`git branch --show-current`
  • **Git Status**: !`git status --porcelain`
  • **Recent Commits**: !`git log --oneline -5`
  • **Modified Files**: !`git diff --name-only HEAD~1`
  • **Nx Affected Projects**: !

`[ -f nx.json ] && npx nx show projects --affected --base=HEAD~1 2>/dev/null || echo "Nx not detected"`

Execution Instructions

**Agent Selection**: To execute this code review, use the following agent with fallback:

  • Primary: `developer-kit-typescript:typescript-software-architect-review`
  • If not available: `developer-kit:typescript-software-architect-review` fallback to

`developer-kit:general-code-reviewer`, if not available use `general-purpose`

**Run context**:

  • Use `npx nx show projects --affected --base=HEAD~1` to limit scope (only if Nx workspace detected)
  • Provide `$1` as `full` or `security` etc., and optional path to a project or file

Review Configuration

The review will analyze: **$ARGUMENTS**

**Available review types:**

  • `full` - Complete 360° review (default)
  • `security` - Focus on vulnerabilities, secrets, access control
  • `performance` - Build/runtime and resource usage
  • `architecture` - Boundaries, module ownership, dependency graph
  • `testing` - Tests, coverage, e2e strategies
  • `ci` - CI/CD, caching and Nx Cloud usage
  • `best-practices` - TypeScript/Monorepo best practices

Phase 1: Identify Review Scope and Workspace

1.1 Detect scope

IF "$1" IS PROVIDED THEN Analyze specific file or project: $ARGUMENTS ELSE Analyze affected and recently modified projects in workspace ENDIF

1.2 Base Workspace Metrics

  • **Nx Workspace**: nx.json, workspace.json or project.json layout
  • **Packages Layout**: apps/, libs/, packages/ (check for custom layout)
  • **Node/TS Versions**: Check engines and package.json
  • **Build System**: Nx builders, Vite, Metro, Webpack
  • **Package Manager**: npm / yarn / pnpm (pnpm recommended for monorepos)

Phase 2: Monorepo & Nx Best Practices

2.1 Project Boundaries

  • Verify clear separation apps vs libs
  • Enforce tags and implicitDependencies in project.json and nx.json
  • Prefer small, focused, reusable libs (feature, ui, util, data)
  • Check for barrel exports and public-api.ts in libs
  • Validate path mappings (tsconfig.base.json -> paths)

2.2 Dependency Graph and Affected Changes

  • Use `npx nx dep-graph --file=depgraph.svg` to visualize
  • Ensure libs have minimal incoming dependencies
  • Identify circular dependencies and large fan-in nodes
  • Validate proper use of buildable/libs-with-build-targets where needed

2.3 Workspace Tooling

  • nx.json: targetDefaults, implicitDependencies, cacheableOperations
  • CI cache: Nx Cloud or local caching configured
  • Script hygiene: package.json scripts use nx run-commands or nx commands

Phase 3: Backend (NestJS) Review

3.1 Project Structure & Modules

  • Prefer domain/feature libs for core business logic, keep NestJS adapters thin
  • Modules should be cohesive and small; avoid god modules
  • Use constructor injection, avoid dynamic module misuse

3.2 DTOs, Validation, Pipes, Guards

  • Use class-validator and class-transformer on DTOs; prefer readonly properties
  • Validate DTOs globally with ValidationPipe and whitelist=true
  • Implement Guards, Interceptors, ExceptionFilters for cross-cutting concerns

3.3 Database & Repositories

  • Check TypeORM/Prisma/Sequelize usage consistency across services
  • Prevent raw string concatenation in queries, prefer parameterized queries or Prisma client
  • Use repository pattern in libs to decouple from framework

3.4 Security (NestJS)

  • Properly configure CORS, CSP, security headers
  • Secure cookies, tokens, and refresh token rotation if applicable
  • Validate JWT usage, revocation strategy, and token scopes

Phase 4: Frontend (React / React Native) Review

4.1 Component Libraries & Reuse

  • Component libs (ui) should be framework-agnostic where possible
  • Use storybook or similar for visual regression and component catalog
  • Ensure shared hooks and utilities live in libs and avoid app duplication

4.2 State Management & Data Fetching

  • Prefer local state in components, lift state to libs as needed
  • Validate consistent data fetching strategy (React Query, SWR, or custom)
  • Check for serialization issues when sharing code between web and native

4.3 Performance & Native Integration

  • Optimize bundle size (route-based code splitting, lazy loading)
  • For RN, validate Metro config, native module usage, and Hermes support
  • Check for heavy synchronous operations on UI thread

Phase 5: Build, CI, and Release

5.1 Nx Build Targets

  • Verify build/test/lint targets defined for each project
  • Use `nx affected:test` and `nx affected:build` in CI
  • Prefer buildable libs for publishable packages

5.2 CI/CD and Caching

  • Check Nx Cloud or remote caching configuration
  • Ensure CI uses cacheableOperations and restores cache correctly
  • Use incremental builds and selective E2E execution for speed

#

Read more
@giuseppe-trisciuoglio
Ships withdeveloper-kit

Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI.

371116 skills44 agents2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
371
Star history of giuseppe-trisciuoglio/developer-kit on GitHub, a chart by star-history.com

Other commands on developer-kit.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command