Common Operator Profile
ASecurityProfile: hybrid Assumption: you’re adding a `Payments` module to a standard NestJS TypeScript application. In NestJS, a Laravel service provider is usually split into: - `@Injectable()` service: the actual application logic - `@Module()` class: registers and exposes dependencies - lifecycle hooks such as `OnModuleInit`: equivalent to provider boot-time setup Create `payments.service.ts`: ```ts import { Injectable } from '@nestjs/common'; @Injectable() export class PaymentsService { charge(amo...
- 584 stars
- 0 votes
- 0 copies
- 1 view
- Added September 5, 2026
Security analysis
100/100Pro scans all 14 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-operator-profile --agent claude-codeAre you the author of Common Operator Profile?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-operator-profile-fa795a49)Profile: hybrid
Assumption: you’re adding a `Payments` module to a standard NestJS TypeScript application.
In NestJS, a Laravel service provider is usually split into:
- `@Injectable()` service: the actual application logic
- `@Module()` class: registers and exposes dependencies
- lifecycle hooks such as `OnModuleInit`: equivalent to provider boot-time setup
Create `payments.service.ts`:
```ts
import { Injectable } from '@nestjs/common';
@Injectable()
export class PaymentsService {
charge(amount: number): string {
return `Charging ${amount}`;
}
}
```
Create `payments.module.ts`:
```ts
import { Module } from '@nestjs/common';
import { PaymentsService } from './payments.service';
@Module({
providers: [PaymentsService],
exports: [PaymentsService],
})
export class PaymentsModule {}
```
Register the module in `app.module.ts`:
```ts
import { Module } from '@nestjs/common';
import { PaymentsModule } from './payments/payments.module';
@Module({
imports: [PaymentsModule],
})
export class AppModule {}
```
Consume it from another provider:
```ts
import { Injectable } from '@nestjs/common';
import { PaymentsService } from './payments/payments.service';
@Injectable()
export class OrdersService {
constructor(private readonly paymentsService: PaymentsService) {}
payOrder(): string {
return this.paymentsService.charge(100);
}
}
```
The Laravel equivalents are:
| Laravel | NestJS |
|---|---|
| Service provider | Module |
| `singleton()` binding | Provider in `providers` |
| `bind()` interface implementation | Token provider using `provide` and `useClass` |
| Provider `boot()` | `OnModuleInit` |
| Container visibility | `exports` and `imports` |
For boot-time setup:
```ts
import { Injectable, OnModuleInit } from '@nestjs/common';
@Injectable()
export class PaymentsService implements OnModuleInit {
onModuleInit() {
// Equivalent to provider boot-time initialization
}
}
```
By default, NestJS providers are singleton-scoped, similar to Laravel’s `singleton()`.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- eval-4.baseline.md
- eval-4.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
- trigger-5.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.