nestjs-crud-pattern

nestjs-crud-pattern is a skill for Claude Code from JoaoEquer/Oficina. It costs 73 tokens per session (1,049 once invoked), scanned A, original, MIT.

A NestJS project pattern for building data-management features with Prisma, a tool for working with databases. Each feature uses the same controller, service, database-access layer, input checks, and separate company data.

In plain words
What is it for?
Use it when adding a new NestJS feature such as a customer, task, or order, including its create, read, update, and delete operations.
Why use it?
It prevents each developer from structuring similar features differently and helps keep company data separated. It also keeps database details out of the business rules.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is ⚠️ **Deprecated**: no active Wibi backend uses NestJS — the 3 real backends (`dream-book-api`, `dream-book-api-agent`, `simple-management-api`) are Express + Pr.

Part of the oficina plugin — 17 skills, 6 commands shipped together

Good fit Use it when adding a new NestJS feature such as a customer, task, or order, including its create, read, update, and delete operations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/JoaoEquer/Oficina
agentmods
npx agentmods add skills/joaoequer/oficina/nestjs-crud-pattern

Made for: Claude Code.

Or install oficina, the plugin that ships this one along with the rest of its 17 skills, 6 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nestjs-crud-pattern

README.md
[![agentmods](https://agentmods.dev/badge/skills/joaoequer/oficina/nestjs-crud-pattern.svg)](https://agentmods.dev/skills/joaoequer/oficina/nestjs-crud-pattern)
Your own site
<a href="https://agentmods.dev/skills/joaoequer/oficina/nestjs-crud-pattern"><img src="https://agentmods.dev/badge/skills/joaoequer/oficina/nestjs-crud-pattern.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,049 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.01049
Opus 5 $0.00036 $0.00524
Sonnet 5 $0.00015 $0.00210
Haiku 4.5 $0.00007 $0.00105

Measured 2d ago against content hash 028eefb2182f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

nestjs-crud-pattern scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/nestjs-crud-pattern/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

⚠️ Deprecated: no active Wibi backend uses NestJS — the 3 real backends (dream-book-api, dream-book-api-agent, simple-management-api) are Express + Prisma in a manual Clean Architecture shape. Kept for historical reference, or in case a future project explicitly picks NestJS. For the real production stack, use express-prisma-pattern.

NestJS CRUD — house pattern

Every CRUD domain follows exactly the same shape. The project's first module is the mold; the rest copy its form. Do not invent variations.

Per-domain structure

src/modules/<domain>/
├── <domain>.controller.ts   # HTTP only: receives request, returns response. Zero business logic.
├── <domain>.service.ts      # Business logic. Depends on the repository ABSTRACTION, never on Prisma directly.
├── <domain>.repository.ts   # Abstract class (contract) + Prisma implementation in the same file.
├── dto/
│   ├── create-<domain>.dto.ts
│   └── update-<domain>.dto.ts
└── <domain>.module.ts       # Wiring: binds the contract to the implementation via provider token.

Cross-cutting concerns (PrismaService, guards, context decorators) live in src/shared/.

The repository contract (DIP in practice)

// <domain>.repository.ts
export abstract class TaskRepository {
  abstract create(workspaceId: string, data: CreateTaskDto): Promise<Task>;
  abstract findAll(workspaceId: string): Promise<Task[]>;
  abstract findById(workspaceId: string, id: string): Promise<Task | null>;
  abstract update(workspaceId: string, id: string, data: UpdateTaskDto): Promise<Task>;
  abstract softDelete(workspaceId: string, id: string): Promise<void>;
}

@Injectable()
export class PrismaTaskRepository extends TaskRepository {
  constructor(private readonly prisma: PrismaService) { super(); }
  // ... implementation: EVERY query filters by workspaceId
}
// <domain>.module.ts
@Module({
  controllers: [TaskController],
  providers: [
    TaskService,
    { provide: TaskRepository, useClass: PrismaTaskRepository },
  ],
})
export class TaskModule {}

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +2 lines 028eefb2182f
  2. 8d ago First seen · 85 lines · 73 tokens per session scan A c10fb0eb4755

Subscribe to this mod's changes

nestjs-crud-pattern is a skill published in the GitHub repository JoaoEquer/Oficina (2 stars, last pushed 6d ago), licensed MIT. It adds 73 tokens to every session and 1,049 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

nestjs

Use when building or structuring a NestJS backend — feature modules, providers and DI wiring, provider scopes and request-lifecycle order, where to bind guards/pipes/interceptors/filters, and testing with Test.createTestingModule. NOT a bare Express/Fastify service with no DI (that is nodejs), NOT framework-agnostic…

ericrisco/rsc-harness · 81 tokens

agent-operated-software

Use when designing, building, operating, or diagnosing an ongoing application whose live backend or control loop includes OpenRig agents, including applications with a Markdown, YAML, or JSON agent control plane or a thin surface over specialist agent roles.

mvschwarz/openrig · 51 tokens

nestjs-database

Implement data access patterns, Scaling, Migrations, and ORM selection in NestJS. Use when implementing TypeORM/Prisma repositories, migrations, or database patterns in NestJS.

FilippoDeSilva/skills · 40 tokens

claude-api

Use this skill when the user is building against Anthropic APIs or SDKs, including @anthropic-ai/sdk, anthropic, or Agent SDK integrations.

lk19940215/claude-coder · 0 tokens

nextjs-pages-router

Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext, withTRPC HOC, SSR via ssr option and ssrPrepass, SSG via createServerSideHelpers with getStaticProps, and server-side helpers for getServerSideProps prefetching.

trpc/trpc · 67 tokens

non-json-content-types

Handle FormData, file uploads, Blob, Uint8Array, and ReadableStream inputs in tRPC mutations. Use octetInputParser from @trpc/server/http for binary data. Route non-JSON requests with splitLink and isNonJsonSerializable() from @trpc/client. FormData and binary inputs only work with mutations (POST).

trpc/trpc · 75 tokens