crud

crud is a command for Claude Code from JoaoEquer/Oficina. It costs 19 tokens per session (697 once invoked), scanned A, original, MIT.

A command for creating a complete CRUD area in a NestJS and Prisma application. CRUD means the basic actions for creating, reading, updating, and deleting records.

In plain words
What is it for?
Use it to add a multi-tenant entity, including its database model, migration, API routes, validation, services, and repository code.
Why use it?
It avoids repeatedly designing the same backend pieces and requires the new data model and routes to follow the project's existing patterns.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions AGENTS.md.

Part of the oficina plugin — 16 skills, 5 commands shipped together

Good fit Use it to add a multi-tenant entity, including its database model, migration, API routes, validation, services, and repository code.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/joaoequer/oficina/crud
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/JoaoEquer/Oficina

Made for: Claude Code.

Or install oficina, the plugin that ships this one along with the rest of its 16 skills, 5 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 crud

README.md
[![agentmods](https://agentmods.dev/badge/commands/joaoequer/oficina/crud/github.svg)](https://agentmods.dev/commands/joaoequer/oficina/crud)
Your own site
<a href="https://agentmods.dev/commands/joaoequer/oficina/crud"><img src="https://agentmods.dev/badge/commands/joaoequer/oficina/crud/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for crud

Your own site · 80×15
<a href="https://agentmods.dev/commands/joaoequer/oficina/crud"><img src="https://agentmods.dev/badge/commands/joaoequer/oficina/crud.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 697 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.00019 $0.00697
Opus 5.5 $0.00008 $0.00279
Sonnet 5.5 $0.00004 $0.00139
Haiku 4.5 $0.00002 $0.00070

Measured 13d ago against content hash 3d85e6c4145d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

crud 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 13d 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.

commands/crud.md · 31 lines

What it actually says

Create the CRUD domain $ARGUMENTS following the house pattern (express-prisma-pattern), plus the conventions in the prisma-schema-conventions skill.

Mandatory steps, in this order:

  1. Detect the stack: check the project's package.json. express present → use the express-prisma-pattern skill. @nestjs/core present instead → stop and tell the user Oficina doesn't maintain a NestJS pattern today (no active backend in the house stack runs NestJS); they can adapt express-prisma-pattern's principles by hand, or pull the retired nestjs-crud-pattern skill from an older commit if they want the literal Nest structure back. Neither present → STOP and ask which pattern to follow; do not guess.

  2. Locate the project's data model document (UML/diagram in docs/). If you can't find it or the entity isn't in it, STOP and ask for the fields — do not invent them.

  3. If a CRUD module/feature already exists in the repo, use it as the mold and keep the format identical.

  4. Model the entity in schema.prisma following the conventions (workspaceId, soft delete, UTC, and whichever others apply) and generate the migration with a descriptive name.

  5. Create the complete feature exactly as express-prisma-pattern describes — full folder structure, wiring, and validation approach. Controller → usecase → repository, wired by hand in a factory.

  6. Validate: project boots, migration applied, all 5 routes respond, lint and build clean.

  7. Write the delivery log in docs/log/ (what was done, decisions, pending items), per the git-workflow rule.

  8. Self-verification (mandatory — do not skip): before declaring the domain done, check every item below and print the checklist with an explicit pass/fail per item. If any item fails, fix it before finishing; if it cannot be fixed, report it as a pending item — never declare done with a silent failure.

    • Entity fields match the project's data model document (no invented fields)
    • Migration applied with a descriptive name (table exists)
    • Repository is an interface/abstract contract + Prisma implementation, never called directly by controller or business logic
    • workspaceId comes from the authenticated context; zero endpoints accept it in the body
    • Every repository query filters by workspaceId
    • Input validated as the first thing that runs (zod, in whichever layer — controller or usecase — the project already validates at) — every non-negotiable rule of express-prisma-pattern followed
    • All 5 routes respond (POST, GET list, GET by id, PATCH, DELETE)
    • Feature wired into the app: factory + route registration; lint and build clean
    • Delivery log written in docs/log/
    • Any decision marked PENDING in the project's AGENTS.md was flagged, not silently decided

Non-negotiable rules: workspaceId from the authenticated context (never from the body), every query filters by tenant, permissions validated on the server, dates in UTC.

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. 13d ago Changed 3d85e6c4145d
  2. 1mo ago Changed · -10 tokens per session 7fa18b0c3012
  3. 1mo ago Changed · +1 lines · +9 tokens per session 86d103ce3457
  4. 1mo ago First seen · 30 lines · 20 tokens per session scan A e8c6342643f7

Subscribe to this mod's changes

crud is a command published in the GitHub repository JoaoEquer/Oficina (2 stars, last pushed 13d ago), licensed MIT. It adds 19 tokens to every session and 697 once invoked, about $0.0001 per session on Opus 5.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.