
nestjs
Provides comprehensive guidance for NestJS using the official documentation. Use when the user asks about NestJS architecture, controllers, providers, modules, middleware, guards, pipes, interceptors, dependency injection, GraphQL, WebSockets, microservices, OpenAPI/Swagger, security, or testing.
- Installs
- 80
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/full-stack-skills/nodejs-skills --skill nestjs- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads nestjs automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
When to use this skill
Use this skill whenever the user wants to:
- Build or refactor a NestJS application
- Implement controllers, providers, and modules
- Apply middleware, pipes, guards, or interceptors
- Configure DI scopes, dynamic modules, or lifecycle hooks
- Add validation, serialization, caching, logging, or queues
- Integrate GraphQL, WebSockets, or microservices
- Document APIs with OpenAPI/Swagger
- Implement authentication/authorization or security hardening
- Write unit or e2e tests for NestJS
How to use this skill
-
Identify the topic from the user's request and find the corresponding example file in the mapping below
-
Load the appropriate example file from the
examples/directory -
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- All examples follow NestJS official documentation structure
- Examples include both JavaScript and TypeScript versions where applicable
- Each example file includes key concepts, code examples, and official documentation links
- Always check the example file for best practices and common patterns
-
Use templates from the
templates/directory to speed up common scaffolding
Doc mapping (one-to-one with https://docs.nestjs.com/)
Overview (概览)
examples/overview/introduction.md→ https://docs.nestjs.com/examples/fundamentals/first-steps.md→ https://docs.nestjs.com/first-stepsexamples/fundamentals/controllers.md→ https://docs.nestjs.com/controllersexamples/fundamentals/providers.md→ https://docs.nestjs.com/providersexamples/fundamentals/modules.md→ https://docs.nestjs.com/modulesexamples/fundamentals/middleware.md→ https://docs.nestjs.com/middlewareexamples/fundamentals/exception-filters.md→ https://docs.nestjs.com/exception-filtersexamples/fundamentals/pipes.md→ https://docs.nestjs.com/pipesexamples/fundamentals/guards.md→ https://docs.nestjs.com/guardsexamples/fundamentals/interceptors.md→ https://docs.nestjs.com/interceptorsexamples/overview/custom-decorators.md→ https://docs.nestjs.com/custom-decorators
Fundamentals (基础)
examples/fundamentals/custom-providers.md→ https://docs.nestjs.com/fundamentals/custom-providersexamples/fundamentals/async-providers.md→ https://docs.nestjs.com/fundamentals/async-providersexamples/fundamentals/dynamic-modules.md→ https://docs.nestjs.com/fundamentals/dynamic-modulesexamples/fundamentals/module-ref.md→ https://docs.nestjs.com/fundamentals/module-refexamples/fundamentals/execution-context.md→ https://docs.nestjs.com/fundamentals/execution-contextexamples/fundamentals/lifecycle-events.md→ https://docs.nestjs.com/fundamentals/lifecycle-eventsexamples/fundamentals/injection-scopes.md→ https://docs.nestjs.com/fundamentals/injection-scopesexamples/fundamentals/request-scoped.md→ https://docs.nestjs.com/fundamentals/request-scopedexamples/fundamentals/circular-dependency.md→ https://docs.nestjs.com/fundamentals/circular-dependency
Techniques (技巧)
examples/techniques/configuration.md→ https://docs.nestjs.com/techniques/configurationexamples/techniques/validation.md→ https://docs.nestjs.com/techniques/validationexamples/techniques/serialization.md→ https://docs.nestjs.com/techniques/serializationexamples/techniques/caching.md→ https://docs.nestjs.com/techniques/cachingexamples/techniques/logger.md→ https://docs.nestjs.com/techniques/loggerexamples/techniques/events.md→ https://docs.nestjs.com/techniques/eventsexamples/techniques/task-scheduling.md→ https://docs.nestjs.com/techniques/task-schedulingexamples/techniques/queues.md→ https://docs.nestjs.com/techniques/queuesexamples/techniques/file-upload.md→ https://docs.nestjs.com/techniques/file-uploadexamples/techniques/streaming-files.md→ https://docs.nestjs.com/techniques/streaming-filesexamples/techniques/database.md→ https://docs.nestjs.com/techniques/databaseexamples/techniques/mongodb.md→ https://docs.nestjs.com/techniques/mongodbexamples/techniques/mongoose.md→ https://docs.nestjs.com/techniques/mongooseexamples/techniques/sequelize.md→ https://docs.nestjs.com/techniques/sequelizeexamples/techniques/prisma.md→ https://docs.nestjs.com/recipes/prisma
Security (安全)
examples/security/authentication.md→ https://docs.nestjs.com/security/authenticationexamples/security/authorization.md→ https://docs.nestjs.com/security/authorizationexamples/security/helmet.md→ https://docs.nestjs.com/security/helmetexamples/security/cors.md→ https://docs.nestjs.com/security/corsexamples/security/rate-limiting.md→ https://docs.nestjs.com/security/rate-limiting
GraphQL
examples/graphql/quick-start.md→ https://docs.nestjs.com/graphql/quick-startexamples/graphql/resolvers.md→ https://docs.nestjs.com/graphql/resolversexamples/graphql/scalars.md→ https://docs.nestjs.com/graphql/scalarsexamples/graphql/interfaces.md→ https://docs.nestjs.com/graphql/interfacesexamples/graphql/unions.md→ https://docs.nestjs.com/graphql/unionsexamples/graphql/directives.md→ https://docs.nestjs.com/graphql/directivesexamples/graphql/plugins.md→ https://docs.nestjs.com/graphql/pluginsexamples/graphql/subscriptions.md→ https://docs.nestjs.com/graphql/subscriptionsexamples/graphql/federation.md→ https://docs.nestjs.com/graphql/federationexamples/graphql/migration.md→ https://docs.nestjs.com/graphql/migration
WebSockets
examples/websockets/gateways.md→ https://docs.nestjs.com/websockets/gatewaysexamples/websockets/exception-filters.md→ https://docs.nestjs.com/websockets/exception-filtersexamples/websockets/guards.md→ https://docs.nestjs.com/websockets/guardsexamples/websockets/interceptors.md→ https://docs.nestjs.com/websockets/interceptorsexamples/websockets/adapters.md→ https://docs.nestjs.com/websockets/adapters
Microservices
examples/microservices/basics.md→ https://docs.nestjs.com/microservices/basicsexamples/microservices/redis.md→ https://docs.nestjs.com/microservices/redisexamples/microservices/mqtt.md→ https://docs.nestjs.com/microservices/mqttexamples/microservices/nats.md→ https://docs.nestjs.com/microservices/natsexamples/microservices/kafka.md→ https://docs.nestjs.com/microservices/kafkaexamples/microservices/grpc.md→ https://docs.nestjs.com/microservices/grpcexamples/microservices/rabbitmq.md→ https://docs.nestjs.com/microservices/rabbitmqexamples/microservices/custom-transport.md→ https://docs.nestjs.com/microservices/custom-transportexamples/microservices/hybrid-application.md→ https://docs.nestjs.com/microservices/hybrid-application
OpenAPI (Swagger)
examples/openapi/introduction.md→ https://docs.nestjs.com/openapi/introductionexamples/openapi/operations.md→ https://docs.nestjs.com/openapi/operationsexamples/openapi/types-and-parameters.md→ https://docs.nestjs.com/openapi/types-and-parametersexamples/openapi/security.md→ https://docs.nestjs.com/openapi/securityexamples/openapi/mapped-types.md→ https://docs.nestjs.com/openapi/mapped-types
CLI & Testing & Recipes
examples/cli/overview.md→ https://docs.nestjs.com/cli/overviewexamples/testing/unit-testing.md→ https://docs.nestjs.com/fundamentals/testingexamples/testing/e2e-testing.md→ https://docs.nestjs.com/fundamentals/testingexamples/recipes/cqrs.md→ https://docs.nestjs.com/recipes/cqrsexamples/recipes/mikroorm.md→ https://docs.nestjs.com/recipes/mikroormexamples/recipes/terminus.md→ https://docs.nestjs.com/recipes/terminusexamples/faq.md→ https://docs.nestjs.com/faq
Examples and Templates
This skill includes detailed examples organized to match the NestJS official documentation structure (https://docs.nestjs.com/). All examples are in the examples/ directory, organized by topic (see mapping above).
To use examples:
- Identify the topic from the user's request
- Load the appropriate example file from the mapping above
- Follow the instructions, syntax, and best practices in that file
- Adapt the code examples to your specific use case
To use templates:
- Reference templates in
templates/directory for common scaffolding - Templates include: controller, provider, module, middleware, guard, pipe, interceptor, exception filter, DTO, and project structure
- Adapt templates to your specific needs and coding style
Best Practices
- Use dependency injection: Leverage NestJS DI container for better testability and maintainability
- Organize by modules: Group related functionality into feature modules
- Use decorators consistently: Follow NestJS decorator patterns for controllers, providers, and routes
- Validate input data: Use ValidationPipe and DTOs for request validation
- Handle errors gracefully: Implement global exception filters for consistent error handling
- Use guards for authorization: Protect routes with guards rather than inline checks
- Leverage interceptors: Use interceptors for cross-cutting concerns like logging and transformation
- Type safety: Use TypeScript for better type safety and developer experience
- Test thoroughly: Write unit tests for services and E2E tests for API endpoints
- Follow official patterns: Refer to official documentation for recommended patterns and practices
Resources
- Official Documentation: https://docs.nestjs.com/
- GitHub Repository: https://github.com/nestjs/nest
Keywords
NestJS, Node.js, framework, controller, provider, module, middleware, exception filter, pipe, guard, interceptor, dependency injection, GraphQL, WebSocket, microservice, OpenAPI, Swagger, testing, validation, caching, logging, TypeScript, decorator, DI, IoC, 控制器, 提供者, 模块, 中间件, 守卫, 管道, 拦截器, 依赖注入
FAQ
What does the nestjs skill do?
Provides comprehensive guidance for NestJS using the official documentation. Use when the user asks about NestJS architecture, controllers, providers, modules, middleware, guards, pipes, interceptors, dependency injection, GraphQL, WebSockets, microservices, OpenAPI/Swagger, security, or testing.
How do I install nestjs?
Run npx skills add https://github.com/full-stack-skills/nodejs-skills --skill nestjs in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/nestjs/ (personal) or .claude/skills/nestjs/ (project).
Which AI agents can use nestjs?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is nestjs safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains nestjs?
It is published by full-stack-skills in full-stack-skills/nodejs-skills. It has 80 recorded installs.
More from full-stack-skills/nodejs-skills
express
full-stack-skills/nodejs-skills
Provides comprehensive guidance for Express.js framework including routing, middleware, request handling, templating, and API development. Use when the user asks about Express, needs to create Express applications, set up routes, implement middleware, or build REST APIs.
fastify
full-stack-skills/nodejs-skills
Provides comprehensive guidance for Fastify framework including routing, plugins, schemas, hooks, and performance optimization. Use when the user asks about Fastify, needs to create high-performance Node.js applications, implement Fastify plugins, or optimize API performance.
koa
full-stack-skills/nodejs-skills
Provides comprehensive guidance for Koa.js framework including middleware, context, async/await patterns, and application structure. Use when the user asks about Koa, needs to create Koa applications, implement middleware, or build Node.js web applications.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.