xiaohongshu
xiaohongshu
generating-nest-servers
PRIMARY expert for ALL NestJS and @lenne.tech/nest-server tasks. ALWAYS use this skill when working in projects with @lenne.tech/nest-server in package.json dependencies (supports monorepos with projects/*, packages/*, apps/* structure), or when asked about NestJS modules, services, controllers, ...
Full skill instructions
You are the PRIMARY expert for NestJS backend development and the @lenne.tech/nest-server framework. This skill handles ALL NestJS-related tasks, from analysis to creation to debugging:
ALWAYS use this skill for:
npm start, npm run dev)npm test)lt server modulelt server objectlt server addProplt server createRule: If it involves NestJS or @lenne.tech/nest-server in ANY way, use this skill!
Use TDD for robust, maintainable code:
1. Write API tests FIRST (REST/GraphQL endpoint tests)
2. Implement backend code until tests pass
3. Iterate until all tests green
4. Then proceed to frontend (E2E tests first)
Why TDD?
For TDD workflow, use building-stories-with-tdd skill - it coordinates backend and frontend test-first development.
afterAll(async () => {
// Clean up test-created entities
await db.collection('entities').deleteMany({ createdBy: testUserId });
await db.collection('users').deleteMany({ email: /@test\.com$/ });
});
Use separate test database: app-test instead of app-dev
Works closely with:
developing-lt-frontend skill - For ALL Nuxt/Vue frontend development (projects/app/)building-stories-with-tdd skill - For building user stories with Test-Driven Developmentusing-lt-cli skill - For Git operations and Fullstack initializationnest-server-updating skill - For updating @lenne.tech/nest-server to latest versionWhen to use which:
developing-lt-frontend skillbuilding-stories-with-tdd skill (it will use this skill for implementation)using-lt-cli skillnest-server-updating skillIn monorepo projects:
projects/api/ or packages/api/ → This skill (generating-nest-servers)projects/app/ or packages/app/ → developing-lt-frontend skillUse the LSP tool when available for better code intelligence in TypeScript/NestJS projects:
| Operation | Use Case |
|---|---|
goToDefinition | Find where a class, function, or type is defined |
findReferences | Find all usages of a symbol across the codebase |
hover | Get type information and documentation for a symbol |
documentSymbol | List all classes, functions, and variables in a file |
workspaceSymbol | Search for symbols across the entire project |
goToImplementation | Find implementations of interfaces or abstract methods |
incomingCalls | Find all callers of a function/method |
outgoingCalls | Find all functions called by a function/method |
When to use LSP:
goToDefinition, findReferencesgoToImplementationincomingCalls, outgoingCallsdocumentSymbolworkspaceSymbolInstallation (if LSP not available):
claude plugins install typescript-lsp --marketplace claude-plugins-official
Before you start ANY work, understand these NON-NEGOTIABLE rules:
@Restricted() decorators@Roles() decorators to more permissive rolessecurityCheck() logic to bypass security@Restricted(RoleEnum.ADMIN)Complete security rules with all details, examples, and testing strategies: security-rules.md
Comprehensive OWASP Secure Coding Practices checklist: owasp-checklist.md
declare KEYWORD FOR PROPERTIESDO NOT use the declare keyword when defining properties in classes!
// WRONG
declare name: string; // Decorator won't work!
// CORRECT
@UnifiedField({ description: 'Product name' })
name: string; // Decorator works properly
Why: declare prevents decorators from being applied, breaking the decorator system.
Complete explanation and correct patterns: declare-keyword-warning.md
Descriptions must be applied consistently to EVERY component.
Quick 3-Step Process:
// comments'English text' or 'English (Deutsch)' for German inputComplete formatting rules, examples, and verification checklist: description-management.md
This skill handles ALL NestJS server development tasks, including:
lt server modulelt server objectlt server addProplt server createnpm start or npm run devnpm testWhen you receive a complete structure specification, you will:
When analyzing existing code:
When debugging issues:
Remember: For ANY task involving NestJS or @lenne.tech/nest-server, use this skill!
Complete framework guide: framework-guide.md
Critical Rules:
node_modules/@lenne.tech/nest-server/src/core/common/services/crud.service.ts)currentUser)Complete guide: configuration.md
Quick Command Reference:
# Create complete module (REST is default!)
lt server module --name Product --controller Rest
# Create SubObject
lt server object --name Address
# Add properties
lt server addProp --type Module --element User
# New project
lt server create <server-name>
API Style: REST is the default!
--controller Rest - Standard for all modules unless explicitly requested otherwise--controller GraphQL - ONLY when user explicitly requests GraphQL--controller Both - ONLY when user explicitly wants both REST and GraphQLEssential Property Flags:
--prop-name-X / --prop-type-X - Name and type (string|number|boolean|ObjectId|Json|Date|bigint)--prop-nullable-X / --prop-array-X - Modifiers--prop-enum-X / --prop-schema-X / --prop-reference-X - Complex typesBefore starting ANY backend work, check if services are running:
# Check if API is running (Port 3000)
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/api
# Check if port is in use (alternative)
lsof -i :3000
Workflow:
┌────────────────────────────────────────────────────────────────┐
│ BEFORE starting backend work: │
│ │
│ 1. CHECK if Port 3000 is in use: │
│ lsof -i :3000 │
│ - If port in use: API already running, proceed │
│ - If port free: Start API │
│ │
│ 2. START API (if not running): │
│ cd projects/api && npm run start:dev & │
│ - Wait until API responds (max 30s) │
│ - Verify: curl -s http://localhost:3000/api │
│ │
│ 3. FOR FULLSTACK WORK (API + Frontend): │
│ Also check Port 3001 for frontend │
│ cd projects/app && npm run dev & │
│ │
│ 4. ONLY THEN proceed with development │
└────────────────────────────────────────────────────────────────┘
Starting Services (if not running):
# Start API in background (from monorepo root)
cd projects/api && npm run start:dev &
# Optional: Start Frontend too (Port 3001)
cd projects/app && npm run dev &
Important:
lsof -i :3000 BEFORE starting to avoid duplicate processeskill $(lsof -t -i :3000)Setup:
lt --version # Check CLI installation
npm install -g @lenne.tech/cli # If needed
ls src/server/modules # Verify project structure
Creating New Server:
lt server create <server-name>
Post-creation verification: Check src/config.env.ts for replaced secrets and correct database URIs.
Complete reference and examples: reference.md and examples.md
Quick Type Reference:
string, number, boolean, Date, bigint, Jsontype[] -> add --prop-array-X trueproperty?: type -> add --prop-nullable-X trueUser -> use --prop-type-X ObjectId --prop-reference-X UserAddress -> use --prop-schema-X AddressENUM (VAL1, VAL2) -> use --prop-enum-X PropertyNameEnumComplete details: workflow-process.md
7-Phase Workflow:
src/server/common/enums/Critical Testing Rules:
ALL properties must be in alphabetical order in Model, Input, and Output files. Verify and reorder after generating.
Complete checklist: verification-checklist.md
Essential Checks:
Common Issues:
Complete process: quality-review.md
7 Steps:
Critical: Understand TestHelper, analyze existing tests first, use appropriate user roles, all tests must pass.
After completing all tasks, provide:
When receiving a specification:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience