К основному содержанию
скилл CX Codex

nestjs-code-audit — скилл для Claude Code: что делает и как установить

Скилл nestjs-code-audit для Claude Code и Codex проводит аудит репозитория на NestJS и формирует единый отчёт с проверенными проблемами. Запускается в режиме только для чтения без изменения кода проекта.

MIT 515 установок ★ 26 обновлён 2026-11-14

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add amirtaherkhani/nestjs-skills --skill nestjs-code-audit -a claude-code
Открыть на GitHub

Что делает nestjs-code-audit

Скилл проверяет проект на NestJS по выбранным направлениям: синтаксис, границы модулей, архитектура, безопасность, тесты и готовность к продакшену. Процесс строго ограничен чтением. Скрипт не применяет автофиксы, не ставит пакеты, не выполняет миграции базы и не трогает развёртывание.

Внутри запускается вспомогательный сборщик evidence-скриптом на Node.js. Он запускает безопасные проверки ESLint и tsc --noEmit. Если проверка недоступна или завершилась сбоем, скилл помечает её статус как невыполненную, а не пройденную.

Для работы требуются Node.js версии 20+ и репозиторий с зависимостью @nestjs/core. Соседние скиллы из набора расширяют анализ архитектуры или производительности, но не обязательны для базового запуска.

Какие задачи решает

  • провести аудит архитектуры модулей и границ зависимостей в NestJS
  • проверить кодовую базу на уязвимости и утечки секретов
  • найти ошибки типизации и линтинга без запуска автоисправлений
  • оценить покрытие тестами и риски во время выполнения

Примеры запросов агенту

  • $nestjs-code-audit full src/payments
  • $nestjs-code-audit security src/auth
  • /prompts:nestjs-audit static

Как установить nestjs-code-audit

1Через Skills CLI (Vercel)

npx skills add amirtaherkhani/nestjs-skills --skill nestjs-code-audit -a claude-code

2Вручную: положить файлы

~/.claude/skills/nestjs-code-audit/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/nestjs-code-audit/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о nestjs-code-audit

Как установить nestjs-code-audit в Claude Code?

Выполните команду npx skills add amirtaherkhani/nestjs-skills --skill nestjs-code-audit -a claude-code. Файл навыка сохранится по пути ~/.claude/skills/nestjs-code-audit/SKILL.md.

Что делает nestjs-code-audit?

Скилл собирает отчёт о качестве кода NestJS по статическому анализу, архитектуре, безопасности и тестам. Все проверки запускаются только на чтение без правок в файлах проекта.

Что нужно для работы nestjs-code-audit?

Требуется Node.js 20+ и проект с установленным пакетом @nestjs/core. Смежные скиллы из репозитория подключаются по желанию для углублённого анализа.

Исходный текст

SKILL.md · MIT
---
name: nestjs-code-audit
description: 'Audits an existing NestJS repository with bundled semantic guidance and optional specialist skills and returns one prioritized, evidence-backed code-quality report. Use when asked to check a whole NestJS codebase or a scoped folder for syntax, TypeScript, lint, module-boundary, dependency, design-smell, security, testing, performance, reliability, or production-readiness problems. This is a read-only review workflow: it does not fix code, install dependencies, run migrations, or deploy. When other skills also apply, reconcile ownership before mutation.'
license: MIT
compatibility: 'Requires Node.js 20+ and a NestJS repository. Sibling skills are optional.'
metadata:
  author: amirtaherkhani
  version: '1.0.3'
---

# NestJS Code Audit

Inspect the current user's NestJS project and return one consolidated report of verified code problems and evidence-backed risks. Audit only; do not modify the target project.

## Pre-execution conflict guard

Before editing files or running any state-changing command, reconcile active instructions. Read-only inspection may continue.

### Prerequisites

Confirm root, scope, instructions, Git state, installed versions/dependencies, and safe checks. Preserve user changes. Load [semantic-review.md](references/semantic-review.md) for the requested semantic lanes; sibling skills are optional deeper guidance, not installation prerequisites. Read other active skills only when their decisions overlap.

### Primary ownership

This skill owns read-only quality evidence, finding deduplication, severity, and report assembly. When installed and relevant, coordinate with:

- `nestjs-architecture-principles`: module, dependency, data, and transaction boundaries.
- `nestjs-oop-design-patterns`: object responsibilities, invariants, and patterns.
- `nestjs-features-performance`: lifecycle, API/security, testing, runtime, and performance.
- `nestjs-professional-software-engineering`: implementation and verification.
- `nestjs-feature-audit`: branch-specific roadmap gate and feature reporting.
- `nestjs-git-commit-pr-message`: authorized Git publication and CI follow-up.

These are decision boundaries, not required dependencies. Retain domain ownership when handing work to another workflow.

### Conflict test

Resolve incompatible findings, unsafe checks, or missing evidence using explicit user intent, repository contracts, verified runtime constraints, then the narrowest owner. Keep one finding per root cause; unresolved claims belong in **Needs verification**. If an action crosses the audit boundary, stop before mutation. An audit alone never authorizes fixes; if the user explicitly requested both, finish the read-only audit first, then enter the authorized implementation phase without asking for the same approval again.

## Invocation

Preferred portable invocation:

```text
$nestjs-code-audit
$nestjs-code-audit full src/payments
$nestjs-code-audit static
$nestjs-code-audit security src/auth
```

Codex CLI/IDE custom-prompt alias, when installed:

```text
/prompts:nestjs-audit
/prompts:nestjs-audit full src/payments
```

Codex does not provide arbitrary bare user-defined commands such as `/Nestjs audit`; keep the supported alias explicit.

### Actions

| Action | Coverage |
| --- | --- |
| `full` (default) | Safe static gates plus architecture, object design, runtime, security, testing, and delivery review |
| `static` | Syntax, TypeScript, lint, configuration, and directly related toolchain failures |
| `architecture` | Modules, dependencies, data/write ownership, transactions, events, ports, and service boundaries |
| `design` | Responsibilities, invariants, coupling, abstractions, patterns, and refactoring risks |
| `runtime` | Nest lifecycle, API/errors, reliability, performance evidence, health, shutdown, and delivery |
| `security` | Input, identity/access, tenant isolation, secrets, output, abuse controls, and security tests |
| `tests` | Test-layer choice, missing boundary coverage, flaky lifecycle risks, and safely runnable checks |

An optional repository-relative scope follows the action. If the first argument is not a recognized action, treat all arguments as the scope/focus and use `full`. For focused actions, load only the relevant lanes in the bundled semantic reference, plus any available specialist guidance needed for a cross-lane blocker. Report only the requested scope.

## Audit workflow

### 1. Establish eligibility and scope

1. Resolve the current working directory and optional user scope without escaping the repository root.
2. Read `AGENTS.md` and other repository instructions, `package.json`, lockfiles, `nest-cli.json`, TypeScript and lint configuration, bootstrap files, module files, tests, and deployment manifests that affect the scope.
3. Verify that `@nestjs/core` is declared or that the repository is clearly a NestJS workspace. If not, stop and report that this audit is not applicable.
4. Record the current branch and dirty state. Do not alter or discard existing changes.
5. State a one-sentence baseline of the observed architecture. Do not infer Clean Architecture, DDD, CQRS, or microservices from folder names.

### 2. Collect deterministic evidence

Use the bundled collector from this skill's directory:

```bash
node scripts/collect-quality-evidence.mjs --root "$PWD" --run
```

Add `--scope <relative-path>` when the user requested a narrower audit. The collector:

- reads manifests and source files without changing them;
- identifies the package manager and available quality scripts;
- runs only allow-listed, non-fixing ESLint and `tsc --noEmit` commands when `--run` is present;
- never installs dependencies, runs builds, updates snapshots, writes coverage, or invokes arbitrary package scripts;
- returns JSON containing command results and heuristic review candidates.

If dependencies are missing or a command is unsafe, unavailable, timed out, or outside scope, record it as **not run**. Do not reinterpret a missing check as a pass. Never run `lint --fix`, format/write commands, migrations, deployment commands, live integration tests, or tests that may reach shared infrastructure during this audit.

### 3. Review four evidence lanes

#### Toolchain correctness

- Report parser, TypeScript, and lint diagnostics exactly enough to locate the problem.
- Deduplicate cascaded compiler errors when they share one root cause.
- Separate command failure from a code finding, such as missing dependencies or broken configuration.

#### Architecture

Trace bootstrap entry points, module imports/exports, provider visibility, request/message paths, persistence ownership, transactions, events, and external adapters. Confirm cycles or boundary leaks from real imports and call paths. Do not report architectural preference as a defect.

#### Object design and maintainability

Inspect responsibilities, dependency clusters, invariant placement, repeated conditional variation, framework/vendor leakage, hidden service location, speculative abstractions, and risky refactor seams. File length or a regex signal alone is not a finding.

#### Runtime, security, and verification

Inspect lifecycle placement, validation, authentication/authorization, tenant/resource ownership, public error and response contracts, secrets/logging, query and resource bounds, timeouts/retries/idempotency, health/shutdown, test boundaries, and deployment evidence when present. Do not claim performance problems without measurements.

### 4. Verify and deduplicate findings

A confirmed finding needs:

- a stable ID: `TOOL`, `ARCH`, `OOP`, `RUN`, `SEC`, or `TEST` plus a number;
- severity: critical, high, medium, or low;
- primary owning skill;
- file and line evidence plus the relevant import, call path, diagnostic, or configuration;
- concrete impact, not only a rule name;
- the smallest safe remedy;
- a validation step that could prove the remedy.

Use critical only for a present security, data-loss, tenant-isolation, or severe availability risk. High requires likely incorrect behavior or a boundary flaw blocking a known change. Medium requires a credible maintainability, correctness, or operability cost. Low is a localized improvement with limited risk.

Move unverified regex signals, suspected dead code, possible performance issues, and checks blocked by missing dependencies to **Needs verification**. Do not inflate the report with style preferences or multiple findings for one root cause.

## Required report

Return Markdown in this order:

1. **Audit verdict:** pass, pass with risks, or fail; audited scope; one-sentence baseline.
2. **Quality gates:** syntax/TypeScript, lint, tests if safely available, and audit coverage, each marked pass, fail, or not run with the exact command or reason.
3. **Finding summary:** counts by severity and owner.
4. **Confirmed findings:** ordered by severity and impact, using the evidence/remedy/validation contract above.
5. **Needs verification:** candidate, missing evidence, and smallest next check.
6. **Healthy patterns:** only notable controls actually verified in the repository.
7. **Recommended order:** a short, dependency-aware remediation sequence; implement only in a distinct phase if the user explicitly authorized those fixes.

If there are no confirmed problems, say so and list the checks that were not run. A clean lint result is not proof of sound architecture, security, runtime behavior, or test coverage.

## Reference routing

| Need | Load |
| --- | --- |
| Review architecture, objects, runtime, and healthy controls without sibling skills | [semantic-review.md](references/semantic-review.md) |
| Decide which checks may run without modifying the project | [check-policy.md](references/check-policy.md) |
| Assign and deduplicate findings across the three domain skills | [finding-ownership.md](references/finding-ownership.md) |
| Format the final audit consistently | [report-template.md](references/report-template.md) |

© amirtaherkhani · MIT · amirtaherkhani/nestjs-skills

Похожие скиллы

Все скиллы по теме «Бэкенд и API» →
nestjs-code-review-expert Giuseppe Trisciuoglio Субагент nestjs-code-review-expert для Claude Code проверяет NestJS-код после изменений и при разработке функций. Он разбирает архитектуру, практики TypeScript и качество тестов. CX Codex ★ 372звёзд репо nestjs-code-review giuseppe-trisciuoglio Скилл nestjs-code-review для ревью NestJS-приложений: проверяет контроллеры, сервисы, модули, DI, гарды и работу с базой. Пригодится перед мержем пул-реквеста. CX Codex +1 4 000установок nestjs-best-practices Kadajett Скилл nestjs-best-practices для Claude Code помогает писать, проверять и рефакторить код NestJS. Он подключается к задачам по архитектуре, безопасности и производительности. CX Codex +1 32 000установок nestjs-patterns affaan-m Скилл nestjs-patterns задаёт архитектурные правила для бэкендов на NestJS и TypeScript: от структуры каталогов до валидации DTO и тестов. CX Codex +1 6 900установок nestjs-expert https://github.com/Jeffallan Скилл nestjs-expert для Claude Code и Codex помогает проектировать и писать NestJS-бэкенды на TypeScript. Создаёт REST API и GraphQL с enterprise-паттернами. CX Codex +1 6 400установок production-code-audit sickn33 Скилл production-code-audit для комплексной проверки кода на уязвимости, ошибки и узкие места перед развёртыванием. Находит конкретные проблемы, предлагает исправления и проверяет результаты. CX Codex +1 1 300установок

Из того же набора7

nestjs-architecture-principles Скилл nestjs-architecture-principles для Claude Code помогает проектировать и разбирать архитектуру приложений на NestJS. Включается при планировании модулей, поиске циклических зависимостей и оценке CQRS или микросервисов. CX Codex +1 592установок nestjs-oop-design-patterns Скилл nestjs-oop-design-patterns для Claude Code помогает применять ООП, SOLID и паттерны проектирования в NestJS и TypeScript. Подключается при написании и рефакторинге кода или поиске проблем в объектной модели. CX Codex +1 560установок nestjs-professional-software-engineering Скилл nestjs-professional-software-engineering для Claude Code и Cursor проектирует, реализует, рефакторит и проверяет код на NestJS и TypeScript. Запускается при разработке новых функций, исправлении багов и написании тестов. CX Codex +1 556установок nestjs-features-performance Скилл nestjs-features-performance для Claude Code помогает выбирать и внедрять функции NestJS для API, безопасности, тестирования и производительности. CX Codex +1 550установок nestjs-feature-audit Скилл nestjs-feature-audit для Claude Code сверяет реализацию функции NestJS с дорожной картой и готовит отчёт с подтверждениями. Запускается по запросу проверить полноту функции, статус миграции или расхождения с планом. CX Codex +1 454установок nestjs-git-commit-pr-message Скилл nestjs-git-commit-pr-message для Claude Code готовит изменения NestJS-проекта к коммиту, push или pull request. Запускается по просьбе подготовить Git-сообщение, опубликовать изменения или проверить результат CI. CX Codex +1 410установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой