Skills nestjs-oop-design-patterns
๐Ÿ“ฆ

nestjs-oop-design-patterns

v1.0.2 Content revision r1 Safe โš™๏ธ External commands

Refactor NestJS Code with Pragmatic Design Patterns

Unclear responsibilities and unnecessary abstractions make NestJS code difficult to change and test. This skill guides evidence-based object design, pattern selection, and behavior-preserving refactoring.

Supports: Claude Codex Code(CC)
๐Ÿฅ‰ 79 Bronze

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "nestjs-oop-design-patterns" from https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns.md and its manifest at https://skillstore.io/api/skills/amirtaherkhani-nestjs-oop-design-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

Your Agent should still show its plan and request any confirmation required by the security policy.

Test it

Using "nestjs-oop-design-patterns". A checkout service validates orders, calls a payment SDK, and maps database rows.

Expected outcome:

  • Role: The checkout use case coordinates order placement.
  • Evidence: Vendor payment details and persistence mapping change for different reasons.
  • Recommendation: Keep coordination in the use case and move vendor translation into an application-owned payment adapter.
  • Trade-off: The adapter adds a boundary and requires contract tests.
  • Verification: Preserve payment errors, order invariants, and provider wiring with focused tests.

Using "nestjs-oop-design-patterns". Should a service with one stable pricing rule use Strategy?

Expected outcome:

  • Evidence: Only one pricing algorithm exists, with no accepted requirement for another.
  • Recommendation: Keep the direct implementation rather than adding interchangeable policy classes.
  • Verification: Test pricing behavior and invariants through the public operation.

Using "nestjs-oop-design-patterns". Does an in-process event guarantee publication after a database commit?

Expected outcome:

  • Finding: In-process notification does not provide durable delivery across crashes or replicas.
  • Recommendation: Consider a transactional outbox when external consumers must reliably observe committed changes.
  • Trade-off: A relay requires retries, retention, ordering decisions, and idempotent consumers.

Security Audit

Safe
v1 โ€ข 10/4/2026 Open versioned report

All 25 static findings are false positives involving ordinary design guidance, Markdown identifiers, or headings. Backticks mark inline code, and the reconnaissance matches contain no system enumeration instructions. No evidence found of prompt injection, credential theft, unauthorized execution, or data exfiltration in the reviewed passages and surrounding files.

7
Files scanned
904
Lines analyzed
0
Review items
0
False positives ignored
No confirmed security findings were detected by the latest completed static and semantic audit. This does not prove the skill has no side effects.
Audited by: codex
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/amirtaherkhani-nestjs-oop-design-patterns/security.svg)](https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/amirtaherkhani-nestjs-oop-design-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/amirtaherkhani-nestjs-oop-design-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA ยท BibTeX ยท CFF)

APA citation

amirtaherkhani. (2026). nestjs-oop-design-patterns security audit report (audit version 1) [Author version 1.0.2]. Skillstore. https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns/audits/1

BibTeX citation

@techreport{amirtaherkhani-amirtaherkhani-nestjs-oop-design-patterns-2026, author = {amirtaherkhani}, title = {nestjs-oop-design-patterns security audit report (audit version 1)}, institution = {Skillstore}, year = {2026}, number = {1}, url = {https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns/audits/1}, note = {Author version 1.0.2} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "nestjs-oop-design-patterns security audit report (audit version 1)" version: "1.0.2" type: report authors: - name: "amirtaherkhani" date-released: "2026-10-04" url: "https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns/audits/1" identifiers: - type: other value: "skillstore:amirtaherkhani-nestjs-oop-design-patterns:audit:1" description: "Skillstore immutable audit report identifier"

Skillstore Score

Why this score Evidence Confidence: Medium
45
Architecture
100
Maintainability
87
Content
65
Community
100
Spec Compliance

What You Can Build

Review an overloaded service

Identify unrelated responsibilities and propose a small refactor that preserves behavior and public contracts.

Choose a provider integration pattern

Compare direct integration, Adapter, and Strategy using vendor coupling, variation, and substitution requirements.

Plan contract-focused verification

Define tests for invariants, adapter substitution, Nest provider wiring, and transport behavior before refactoring.

Try These Prompts

Understand one object
Review [class] and its callers. Explain its role, responsibilities, and one concrete design concern without editing files.
Select the smallest design
Compare a direct solution, Strategy, and Factory for [observed variation]. Recommend one using repository evidence and explain its testing cost.
Refactor a service safely
Refactor [service] to separate [misplaced responsibility]. Preserve public behavior and user changes, add focused tests, and verify Nest provider wiring.
Review consistency and substitution
Review [workflow] for adapter substitution, transaction boundaries, and event delivery guarantees. Compare direct coordination with outbox or saga designs and specify contract tests.

Best Practices

  • Inspect callers, tests, module wiring, and repository conventions before selecting a pattern.
  • State the concrete problem, simpler alternative, and added cost before introducing an abstraction.
  • Preserve behavior with focused tests and verify contracts and provider wiring after refactoring.

Avoid

  • Adding interfaces, factories, repositories, or class hierarchies without real variation or a useful boundary.
  • Judging design only by line counts or applying fixed size limits as mandatory rules.
  • Assuming CQRS dispatch, in-process events, or pattern names provide durability or scalability.

Frequently Asked Questions

Which projects does this skill target?
It targets NestJS and TypeScript object-oriented backend code, including controllers, providers, domain objects, adapters, and tests.
Does every class need an interface?
No. Add application-owned contracts for volatile effects, real variation, or useful testing boundaries, not every local class.
Will it always recommend a design pattern?
No. It recommends the direct implementation when repository evidence does not justify additional abstraction.
Are the related NestJS skills required?
No. They are optional coordination references when installed and relevant to overlapping decisions.
Which tests should accompany a refactor?
Use focused behavior tests, adapter contract tests, and module wiring checks according to the changed boundary.
Does a Nest event bus guarantee durable delivery?
No. Reliable external publication requires explicit persistence, delivery, recovery, and idempotency design, such as a transactional outbox.

Developer Details

License

MIT

Author version

v1.0.2

Skillstore revision

r1

Ref

c97a1862d1bc82763903ee068cd15acab35d638c

Maintenance freshness

10/5/2026

Usage

0 downloads ยท 0 views

File structure

๐Ÿ“ evals/

๐Ÿ“„ evals.json

๐Ÿ“ references/

๐Ÿ“„ nestjs-native-patterns.md

๐Ÿ“„ object-design.md

๐Ÿ“„ oop-solid.md

๐Ÿ“„ pattern-catalog.md

๐Ÿ“„ smells-refactoring.md

๐Ÿ“„ SKILL.md

More from amirtaherkhani

View all
View all