dabydat/alpha-omega/nestjs-constants

Claude Code and agent skill by dabydat/alpha-omega

Trust tier 3
  • community
Source check pending

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

Constants pattern for NestJS. Covers DI tokens, controller maps, topic constants, and single source of truth for service communication. Use when organizing constants, creating DI tokens, or defining message patterns.

Install

npx vskill@latest install dabydat/alpha-omega/nestjs-constants

SKILL.md

NestJS Constants Strategy

Constants are the connective tissue of a microservices architecture. They provide single sources of truth for routes, message patterns, injection tokens, and topic names. Without consistent constants, services become tightly coupled and difficult to maintain.

Why Constants Matter

See references/why-constants.md for the ❌ BAD hardcoded-strings example and the ✅ GOOD constants example.


Types of Constants

1. Module Tokens (Dependency Injection) + Module Module Tokens

See references/di-tokens.md for Symbol-based tokens, module wiring, injection, and module tokens.

2. Controller Maps (Route + Message Pattern)

See references/controller-map.md for name, tag, routes, message patterns, the combined map, and the ControllerAction<T> type.

3. Client Constants (BFF Service References)

See references/client-constants.md.

4. Topic Constants + Kafka Group Constants

See references/topic-constants.md.


File Structure & Naming Conventions

See references/file-structure.md for the domain/constants/ vs infrastructure/constants/ split and the naming convention table.


Usage in Controllers

See references/usage.md for TCP (@MessagePattern) and REST BFF (route + client.send) usage.


Anti-Patterns to Avoid

See references/anti-patterns.md for the five ❌ examples (string literals, no barrel export, no layer separation, mutable constants, inconsistent naming).


Summary

Constant TypePurposeLayer
Module TokenDI injection symbolLibrary
Module Module TokenModule referenceLibrary
Controller MapRoute + Message Pattern mappingDomain
Client ConstantMicroservice client injectionInfrastructure
Topic ConstantEvent topic namesInfrastructure
Kafka GroupsConsumer group IDsInfrastructure

Golden rule: Every string that has meaning across services should be a constant. Hardcoded strings are technical debt.

Security

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

Quality evaluation

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

Source

Popularity

7-day trend score
5

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/dabydat/alpha-omega/nestjs-constants/badge)](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-constants)

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