agentleFS
BothSannBothSann/agent-nestjs-skills/skills/nestjs-best-practices/SKILL.md

nestjs-best-practices

Skill0 starsChanged 8 days agoMITView on GitHub

Write, review, or refactor NestJS code using prioritized architecture, dependency-injection, security, testing, database, and deployment rules. Includes opt-in DDD guidance.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use playwright-best-practices, nodejs-backend-patterns and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • currents-devSkill

    playwright-best-practices

    Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions, multi-tab/popup flows, mobile/responsive layouts, touch gestures, GraphQL, error handling, offline mode, multi-user collaboration, third-party services (payments, email verification), console error monitoring, global setup/teardown, test annotations (skip, fixme, slow), test tags (@smoke, @fast, @critical, filtering with --grep), project dependencies, security testing (XSS, CSRF, auth), performance budgets (Web Vitals, Lighthouse), iframes, component testing, canvas/WebGL, service workers/PWA, test coverage, i18n/localization, Electron apps, or browser extension testing. Covers E2E, component, API, visual, accessibility, security, Electron, and extension testing.

    Also in 3 projects that use this

  • xfstudioSkill

    nodejs-backend-patterns

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

    Also in 3 projects that use this

  • xfstudioSkill

    typescript-advanced-types

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

    Also in 4 projects that use this

  • anasahmed07Skill

    better-auth-best-practices

    Skill for integrating Better Auth - the comprehensive TypeScript authentication framework.

    Also in 3 projects that use this

  • VercelSkill

    turborepo

    Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries.

    Also in 3 projects that use this

  • VercelSkill

    ai-sdk

    Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

    Also in 3 projects that use this

  • +1 more from vercel-labs

The file

Files
SKILL.md

NestJS rules

54 rules; read only those relevant to the task. Respect project conventions and installed versions. Categories below are ordered by priority; earlier categories win conflicts. DDD applies only to modular monoliths with real business rules, not ordinary CRUD.

Each file has rationale and wrong/right examples. Build its path as rules/<prefix><name>.md; e.g. rules/security-validate-all-input.md. Do not load the entire directory.

Category / impactPrefixNames
Architecture / CRITICALarch-avoid-circular-deps, feature-modules, module-sharing, single-responsibility, use-events, use-repository-pattern
DI / CRITICALdi-avoid-service-locator, interface-segregation, liskov-substitution, prefer-constructor-injection, scope-awareness, use-interfaces-tokens
Errors / HIGHerror-handle-async-errors, throw-http-exceptions, use-exception-filters
Security / HIGHsecurity-auth-jwt, authorize-records, headers-cors-csrf, rate-limiting, sanitize-output, use-guards, validate-all-input
Performance / HIGHperf-async-hooks, lazy-loading, optimize-database, use-caching, use-fastify
Testing / MEDIUM-HIGHtest-e2e-supertest, mock-external-services, use-testing-module
Database / MEDIUM-HIGHdb-avoid-n-plus-one, drizzle-prisma-integration, use-migrations, use-transactions
API / MEDIUMapi-use-dto-serialization, use-interceptors, use-pipes, versioning
Microservices / MEDIUMmicro-use-health-checks, use-idempotency-keys, use-patterns, use-queues, use-resilience
Deployment / LOW-MEDIUMdevops-docker-and-dependencies, graceful-shutdown, use-config-module, use-logging, use-tracing
DDD / MEDIUM-HIGH, opt-inddd-aggregate-repository, bounded-context-modules, cqrs, module-public-api, rich-domain-model, transactional-outbox

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.