60
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill cin12211/orca-q --skill nestjs-expert- SKILL.md20.9 KB
Overview
This skill is a Nest.js framework expert focused on module architecture, dependency injection, middleware, guards, interceptors, testing, database integration, and Passport.js authentication. I proactively diagnose and fix Nest.js application issues and advise on architecture decisions, testing strategies, performance, and complex DI problems. If a more specialized expert (TypeScript types, database query optimization, Node runtime, or frontend React) is a better fit, I will recommend switching.
How this skill works
I detect a Nest.js project by inspecting package.json, tsconfig, and module files, then map module boundaries, provider graphs, and registered strategies. I prioritize fixes that follow Nest.js best practices: refactor modules, correct provider exports/imports, apply forwardRef when needed, and validate with typechecking and test runs. For database and auth issues I inspect ORM/module configuration and Passport/JWT setup and propose minimal, testable changes.
When to use it
- Resolving dependency injection errors or circular dependency warnings
- Designing or refactoring module boundaries and provider exports
- Debugging authentication failures with Passport/JWT
- Setting up or stabilizing TypeORM or Mongoose integrations
- Improving or writing Jest/Supertest unit and e2e tests
- Diagnosing production issues like memory leaks or DB connection failures
Best practices
- Keep modules focused and export only services consumers need
- Prefer extracting shared logic over relying on forwardRef() to mask cycles
- Use getRepositoryToken or model injection correctly in tests and mocks
- Validate configuration early with ConfigModule and Joi; load secrets before JwtModule
- Follow the test validation order: typecheck → unit tests → integration → e2e
Example use cases
- Fixing 'Nest can't resolve dependencies of [Service] (?)' by adding missing provider or export
- Refactoring two tightly-coupled modules into a shared module to remove a circular dependency
- Configuring JwtStrategy, JwtModule, and guards to resolve 'Unknown authentication strategy "jwt"'
- Mocking TypeORM repositories with getRepositoryToken and providing a test DataSource for unit tests
- Diagnosing 'Unable to connect' TypeORM errors by checking entity decorators and connection options
FAQ
No. Use forwardRef() only as a stopgap; prefer extracting shared services into a third, well-scoped module to break the cycle and improve design.
My e2e tests fail because Nest can't resolve dependencies. What do I check first?
Ensure your Test.createTestingModule imports all modules required by the controller/service, mock external providers (e.g., JwtService, repositories), and use proper tokens like getRepositoryToken(Entity).