Global Conventions

Enforce monorepo conventions for NestJS API and Next.js blog apps.

1|Updated Dec 4, 2024
One-click install
npx skills add https://github.com/imkdw/imkdw-dev --skill global-conventions-imkdw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Global Conventions
Source: https://github.com/imkdw/imkdw-dev/tree/main/.claude/skills/global-conventions
Command: npx skills add https://github.com/imkdw/imkdw-dev --skill global-conventions-imkdw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent code organization, naming, and dependency management can slow down development, increase cognitive load, and make onboarding new team members difficult. This Skill establishes clear, project-specific conventions for a cohesive and efficient codebase.

Core Features & Use Cases

  • Monorepo Structure: Understand and navigate the apps/ and packages/ layout, clarifying where different parts of the application reside.
  • Feature Module Organization: Structure NestJS feature modules for clarity, scalability, and maintainability, promoting a domain-driven approach.
  • Dependency Management: Follow unidirectional dependency flow and leverage pnpm workspace commands for efficient and consistent package management.
  • Use Case: When creating a new feature, quickly determine where to place files (controller, DTOs, use cases), how to name them according to project standards, and how to manage dependencies using pnpm.

Quick Start

Explain the recommended directory structure for a new 'Comment' feature module within the NestJS API, including its DTOs, use cases, and how it fits into the overall monorepo.

Frequently Asked Questions about Global Conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a monorepo with consistent conventions across NestJS and Next.js applications?

Monorepo structure uses `apps/` for NestJS APIs and Next.js blogs, `packages/` for shared code, and enforces unidirectional dependency flow: Features → Shared → Infra. This organization clarifies where components belong and prevents circular dependencies across your workspace.

What's the best way to organize NestJS feature modules in a monorepo?

Feature modules follow domain-driven design with dedicated directories for controllers, DTOs, and use cases. Each module maintains internal cohesion while respecting the unidirectional dependency flow, making features independently scalable and maintainable.

How do I manage dependencies consistently across a pnpm workspace?

Use pnpm workspace commands to enforce dependency management patterns that prevent cross-cutting dependencies. Combined with unidirectional flow rules, this ensures packages only depend on lower-layer abstractions, reducing coupling and cognitive load.

Can I use Turborepo caching with monorepo conventions?

Yes. Turborepo build caching integrates with standardized file and module organization to optimize incremental builds. Consistent conventions enable Turborepo to reliably cache task outputs across apps and packages in your workspace.

Why should I standardize commit messaging and environment variable handling?

Standardized workflows reduce onboarding friction and prevent configuration drift. Consistent commit messaging and environment conventions across all apps and packages make collaboration predictable and catch inconsistencies early in development.

Does monorepo structure work for teams with multiple services?

Yes. Clear conventions for file organization, naming, and dependency patterns scale across multiple services and packages. Unidirectional flow and workspace-level tooling support team velocity by making navigation and feature placement obvious.