Skip to content
Back to skills

Common Operator Profile

ASecurity

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(amo...

  • 584 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
developmenttypescript

Security analysis

A100/100

Pro scans all 14 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-operator-profile --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Common Operator Profile?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Common Operator Profile
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hoangnguyen0403-common-operator-profile-fa795a49/badge)](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-operator-profile-fa795a49)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
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.md1.5 KB
  • eval-1.with-skill.md1.3 KB
  • eval-2.baseline.md3.4 KB
  • eval-2.with-skill.md2 KB
  • eval-3.baseline.md236 B
  • eval-3.with-skill.md376 B
  • eval-4.baseline.md833 B
  • eval-4.with-skill.md1 KB
  • trigger-1.md116 B
  • trigger-2.md135 B
  • trigger-3.md149 B
  • trigger-4.md162 B
  • trigger-5.md172 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.