# Nestjs Docs

> Use when users ask how to build, explain, configure, secure, test, deploy, or troubleshoot NestJS applications, including modules, controllers, providers, dependency injection, middleware, guards, pipes, interceptors, exception filters, configuration, databases, validation, caching, queues, GraphQL, microservices, WebSockets, OpenAPI/Swagger, CLI, or platform adapters (Express/Fastify), especiall…

- **Type:** Skill
- **Install:** `agentstack add skill-cookiemonsterdev-agents-skills-nestjs-docs`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [cookieMonsterDev](https://agentstack.voostack.com/s/cookiemonsterdev)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [cookieMonsterDev](https://github.com/cookieMonsterDev)
- **Source:** https://github.com/cookieMonsterDev/agents-skills/tree/master/docs-skills/nestjs-docs

## Install

```sh
agentstack add skill-cookiemonsterdev-agents-skills-nestjs-docs
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

NestJS questions are easy to answer from stale memory or generic Node.js advice. Use this skill to ground answers in the official NestJS documentation and return the closest authoritative page instead of improvising framework patterns.

## When to Use

Use this skill when the request is about:

- NestJS concepts, architecture, terminology, or project structure
- Modules, controllers, providers, services, and dependency injection
- Middleware, guards, pipes, interceptors, exception filters, and custom decorators
- Request lifecycle, execution context, or scoping (global, controller, route)
- Configuration, environment variables, and dynamic modules
- Databases, ORMs, validation, serialization, caching, queues, and task scheduling
- Authentication, authorization, CORS, Helmet, CSRF, rate limiting, and encryption
- GraphQL, microservices, WebSockets, and hybrid applications
- OpenAPI/Swagger documentation and API design with `@nestjs/swagger`
- Testing, CLI scaffolding, deployment, serverless, and performance tuning
- Express or Fastify as the underlying HTTP platform (`@nestjs/platform-express`, `@nestjs/platform-fastify`)

Do not use this skill for:

- Raw Express or Fastify usage without NestJS abstractions. Use `expressjs-docs` or `fastify-docs` instead.
- Angular frontend questions unless the user is asking about shared Nest/Angular patterns in the NestJS docs.
- Third-party package behavior not covered by NestJS docs unless the docs explicitly reference that package.

## Workflow

### 1. Classify the request

Decide which bucket the question belongs to before searching:

- Getting started or first steps
- Core fundamentals (modules, controllers, providers, DI)
- Request pipeline (middleware, guards, pipes, interceptors, filters)
- Techniques (configuration, database, validation, caching, queues, etc.)
- Security and authentication
- GraphQL, microservices, or WebSockets
- OpenAPI/Swagger
- CLI, testing, deployment, or FAQ
- Recipes and integration patterns

If you need a quick starting point, load `references/topic-map.md` and jump to the closest section.

### 2. Search official NestJS docs first

- Treat `docs.nestjs.com` as the source of truth for NestJS.
- Prefer pages under .
- Search with the user's exact terms plus focused NestJS phrases such as `CanActivate`, `ValidationPipe`, `NestFactory`, `SwaggerModule`, or `Transport`.
- When multiple pages are plausible, compare 2-3 candidate pages and pick the one that most directly answers the user's question.
- For lifecycle or ordering questions, check the request lifecycle FAQ before answering from memory.

### 3. Open the best page before answering

- Read the most relevant page, and the exact section when practical.
- Use the topic map only to narrow the search space or surface likely starting pages.
- If a page appears renamed, moved, or incomplete, say that explicitly and return the nearest authoritative pages instead of guessing.

### 4. Answer with docs-grounded guidance

- Start with a direct answer in plain language.
- Include exact NestJS docs links, not just the docs homepage.
- Only provide TypeScript examples when the user asks for them or when the docs page makes an example necessary.
- Make any inference explicit. Good phrasing:
  - `According to NestJS docs, ...`
  - `Inference: this likely means ...`

## Answer Shape

Use a compact structure unless the user asks for depth:

1. Direct answer
2. Relevant docs
3. Example code, only if needed
4. Explicit inference callout, only if you had to connect multiple docs pages

Keep citations close to the claim they support.

## Search and Routing Tips

- For beginner questions, prefer First Steps and fundamentals before deep technique pages.
- For DI questions, prefer providers, custom providers, and injection scopes docs.
- For validation questions, prefer pipes and the validation technique page before guessing `class-validator` setup.
- For auth questions, distinguish authentication (who you are) from authorization (what you can do).
- For OpenAPI questions, start with the OpenAPI introduction, then decorators or operations as needed.
- For microservice questions, distinguish message patterns, event patterns, and HTTP gateways.
- For platform-specific behavior, check whether the user is on Express or Fastify and consult the platform section in First Steps.

## Common Mistakes

- Answering from memory without verifying the current NestJS docs
- Linking the NestJS docs landing page when a narrower page exists
- Confusing middleware order with guard/pipe/interceptor order in the request lifecycle
- Suggesting Express-only patterns when the user is on the Fastify adapter (or vice versa)
- Mixing up `@nestjs/swagger` decorators with framework-agnostic OpenAPI concepts
- Treating third-party ORM or queue library APIs as NestJS core behavior without checking the relevant technique or recipe page

## Bundled Reference

Read `references/topic-map.md` only as a compact index of likely doc entry points. It is intentionally incomplete and should never replace the live NestJS docs as the final authority.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [cookieMonsterDev](https://github.com/cookieMonsterDev)
- **Source:** [cookieMonsterDev/agents-skills](https://github.com/cookieMonsterDev/agents-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-cookiemonsterdev-agents-skills-nestjs-docs
- Seller: https://agentstack.voostack.com/s/cookiemonsterdev
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
