Agent skill
nean-add-feature
Scaffold a new feature with NestJS module, TypeORM entity, DTOs, and Angular components.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/nean-add-feature
SKILL.md
Purpose
Add a complete feature slice to an existing NEAN project with all layers wired up and tests included.
Arguments
feature-name— Feature name in kebab-case (e.g.,user-profile,invoice)--no-ui— Skip Angular components (API-only feature)--no-api— Skip NestJS module (frontend-only feature)--no-entity— Skip TypeORM entity (use existing entity)
What gets created
Default (all layers)
libs/shared/types/src/<feature>.dto.ts # DTOs + interfaces
libs/api/database/src/entities/<feature>.entity.ts # TypeORM entity
apps/api/src/modules/<feature>/
<feature>.module.ts
<feature>.controller.ts
<feature>.service.ts
__tests__/
<feature>.controller.spec.ts
<feature>.service.spec.ts
apps/web/src/app/<feature>/
<feature>.routes.ts
<feature>-list/
<feature>-list.component.ts
<feature>-form/
<feature>-form.component.ts
<feature>-detail/
<feature>-detail.component.ts
libs/web/data-access/src/<feature>/
<feature>.service.ts
<feature>.store.ts (NgRx feature state)
With flags
--no-ui: Only DTOs + entity + NestJS module--no-api: Only DTOs + Angular components + data-access--no-entity: Only DTOs + NestJS module + Angular (uses existing entity)
Conventions
Naming
- Feature name:
kebab-case(input) - Classes:
PascalCase(e.g.,UserProfile,CreateUserProfileDto) - Files:
kebab-case.tsfor everything - API routes:
/api/<feature>for collection,/api/<feature>/:idfor item
DTO location
All DTOs go in libs/shared/types/src/<feature>.dto.ts:
Create<Feature>Dto— creation input with validation decoratorsUpdate<Feature>Dto— partial update input (PartialType)<Feature>ResponseDto— API response shape- Interfaces exported alongside classes
API endpoint structure
GET /api/<feature>— list (paginated)POST /api/<feature>— createGET /api/<feature>/:id— get onePATCH /api/<feature>/:id— updateDELETE /api/<feature>/:id— delete
Entity conventions
- Timestamps enabled (@CreateDateColumn, @UpdateDateColumn)
- Indexes defined with comments explaining why
- UUID primary keys by default
- Soft delete pattern if deletion is reversible
Workflow
- Create DTOs in libs/shared/types
- Create TypeORM entity (if not --no-entity)
- Create NestJS module with controller + service (if not --no-api)
- Create Angular components and routing (if not --no-ui)
- Create NgRx feature state
- Create tests for each layer
- Run
npm run lintandnpm run testto verify
Output
Summarize: files created, API endpoints available, components ready to use.
Reference
For templates and patterns, see reference/nean-add-feature-reference.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?