NestJS agent skills
Official Agent Skills for building and extending NestJS applications with coding agents. They give an agent what its training data lacks:
- the current APIs, which are often newer than the model;
- Nest's first-party packages;
- the mistakes that still pass tests: a sign-in that leaks which emails exist,
@IsOptional() letting null through to a 500, a rate limiter that never sees the user, an event stream that outlives a revoked key, and many more.
Each skill is a folder with a SKILL.md that holds its rules, plus references/ with longer recipes. Every recipe was run on the released packages. The skills work with any agent that reads the Agent Skills format: Claude Code, Codex, Cursor and others.
Skills
| Skill | Use when |
|---|
nestjs | creating or extending a NestJS application: starting a project, layout, module system, where the docs are, common mistakes |
nestjs-feature | adding or changing endpoints: where code goes, modules and providers, validation (Zod with @Body({ schema }) or class-validator), status codes, errors, HTTP options, Server-Sent Events |
nestjs-auth | adding or changing authentication or authorization: @nestjs/authentication (passwords, sessions, tokens, API keys) and @nestjs/authorization (policies) |
nestjs-data | adding or changing persistence: @nestjs/drizzle and @nestjs/typeorm, migrations, safe updates, paging, transactions |
nestjs-testing | writing, running or fixing tests: unit, service and end-to-end tests, overriding providers and global guards, signing test users in |
nestjs-production | preparing for production: configuration, logs, observability with NestJS Observe, health checks, rate limiting, OpenAPI, shutdown, deployment |
Agents load a skill when its description matches the task, so there's nothing to invoke by hand.
Install
The skills live in plugins/nestjs/skills/. Install them for one project (committed with the code, so everyone on the team gets them) or for your user account (every project on your machine).
Any agent, with npm
npx @nestjs/skills add
copies every skill into .agents/skills/, which Codex and Cursor read. Choose where with --agent:
--agent | Folder | Read by |
|---|
agents (default) | .agents/skills/ | Codex, Cursor and other Agent Skills readers |
claude | .claude/skills/ | Claude Code (and Cursor) |
cursor | .cursor/skills/ | Cursor |
all | .agents/skills/ and .claude/skills/ | Codex, Cursor and Claude Code at once (Cursor reads both folders) |
npx @nestjs/skills add --agent claude # Claude Code, this project
npx @nestjs/skills add --agent all # Codex, Cursor and Claude Code
npx @nestjs/skills add --agent agents --global # every project on your machine (~/.agents/skills)
npx @nestjs/skills add nestjs nestjs-auth # only some skills
npx @nestjs/skills list # what's in the package
npx @nestjs/skills remove # remove what it installed
--agent also takes several targets (--agent agents,claude or repeated). --dir <path> installs anywhere else. The installer only replaces or removes folders it installed itself (it leaves a .nestjs-skills marker in each); --force replaces a same-named folder that it didn't. Pin the version for the team with npm i -D @nestjs/skills and npx nestjs-skills add. Programmatic use: import { listSkills, skillsDir } from '@nestjs/skills'.
Claude Code
As a plugin, from this repository's marketplace:
claude plugin marketplace add nestjs/agent-skills
claude plugin install nestjs@nestjs
Or inside a session: /plugin marketplace add nestjs/agent-skills, then /plugin install nestjs@nestjs. Skills from the plugin are namespaced (nestjs:nestjs-auth).
Without the plugin: npx @nestjs/skills add --agent claude (add --global for ~/.claude/skills/).
To preconfigure a repository for your team, add this to its .claude/settings.json; each contributor still runs the install once:
{
"extraKnownMarketplaces": {
"nestjs": { "source": { "source": "github", "repo": "nestjs/agent-skills" } }
},
"enabledPlugins": { "nestjs@nestjs": true }
}
Codex
Codex reads skills from .agents/skills/ in the repository (and in parent folders up to the repository root) and from ~/.agents/skills/ for your user.
Cursor
Cursor reads skills from .agents/skills/ and .cursor/skills/ in the project, and from ~/.agents/skills/ and ~/.cursor/skills/ for your user. It also loads .claude/skills/ and .codex/skills/.
Gemini CLI
gemini extensions install https://github.com/nestjs/agent-skills