new-resource

new-resource is a skill for Claude Code, Codex from KhaledSaeed18/node-express-boilerplate. It costs 53 tokens per session (1,442 once invoked), scanned A, original, MIT.

A step-by-step guide for adding a complete API resource, meaning a related set of endpoints for one kind of data such as comments. It covers the database model, types, validation, storage, business logic, routes, application setup, API documentation, and tests.

In plain words
What is it for?
Use it when adding a new entity, model, resource, or group of endpoints to a TypeScript API that uses Prisma and the listed application layers.
Why use it?
It helps keep all parts of a new API feature consistent instead of adding an endpoint while overlooking its database, documentation, or tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { validateBody } from '../lib/validate';.

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/KhaledSaeed18/node-express-boilerplate
agentmods
npx agentmods add skills/khaledsaeed18/node-express-boilerplate/new-resource

Made for: Claude Code, Codex.

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 new-resource

README.md
[![agentmods](https://agentmods.dev/badge/skills/khaledsaeed18/node-express-boilerplate/new-resource.svg)](https://agentmods.dev/skills/khaledsaeed18/node-express-boilerplate/new-resource)
Your own site
<a href="https://agentmods.dev/skills/khaledsaeed18/node-express-boilerplate/new-resource"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/node-express-boilerplate/new-resource.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,442 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00053 $0.01442
Opus 5 $0.00026 $0.00721
Sonnet 5 $0.00011 $0.00288
Haiku 4.5 $0.00005 $0.00144

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

Security

Grade A, and why

new-resource 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 6d 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.

.agents/skills/new-resource/SKILL.md · 190 lines

How it starts

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

When the user asks to add a new resource (e.g. "add a comments resource"), follow this exact sequence. Ask for the resource name if not provided.

Variables

  • <Name> = PascalCase singular (e.g. Comment)
  • <name> = camelCase singular (e.g. comment)
  • <names> = camelCase plural (e.g. comments)

Step 1 — Prisma Schema (prisma/schema.prisma)

Add the new model first so TypeScript types are available for every subsequent step.

Requirements:

  • id String @id @default(cuid())
  • All fields with appropriate types and nullability
  • Foreign key relations with onDelete: Cascade on the child side
  • createdAt DateTime @default(now()) and updatedAt DateTime @updatedAt
  • @@index on every foreign key column and commonly filtered fields
  • @@map("snake_case_table_name")

Then immediately run:

pnpm prisma:migrate
pnpm prisma:generate

Step 2 — Types (src/types/<name>.types.ts)

Define DTOs before writing any other layer:

export interface Create<Name>DTO { /* fields */ }
export interface Update<Name>DTO { /* partial fields */ }
export interface <Name>ResponseDTO { /* safe fields to return, no password etc. */ }

Export from src/types/index.ts.


Step 3 — Validation (src/validations/<name>.validation.ts)

Create Zod v4 schemas. Pattern from src/validations/note.validation.ts:

import { z } from 'zod';
import { validateBody } from '../lib/validate';
import type { RequestHandler } from 'express';

export const create<Name>Schema = z.object({ /* fields */ });
export type Create<Name>Input = z.infer<typeof create<Name>Schema>;
export const create<Name>Validation: RequestHandler = validateBody(create<Name>Schema);

export const update<Name>Schema = z.object({ /* fields, all optional for PATCH */ });
export type Update<Name>Input = z.infer<typeof update<Name>Schema>;
export const update<Name>Validation: RequestHandler = validateBody(update<Name>Schema);

Step 4 — Repository (src/repository/<name>.repository.ts)

Read the full file on GitHub · 190 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. 6d ago First seen · 190 lines · 53 tokens per session scan A 2a11bce02600

Subscribe to this mod's changes

new-resource is a skill published in the GitHub repository KhaledSaeed18/node-express-boilerplate (33 stars, last pushed 5d ago), licensed MIT. It adds 53 tokens to every session and 1,442 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

saas-builder

Clone, verify, map, and build on top of ixartz/SaaS-Boilerplate for a user's SaaS idea. Use when a user wants to reuse SaaS Boilerplate, evaluate how their product fits it, or build product-specific pages, database schema, roles, permissions, MVP features, and launch scope on top of the boilerplate.

ixartz/SaaS-Boilerplate · 75 tokens

prisma-orm

Use when modeling data or writing type-safe queries with Prisma ORM in TypeScript — schema.prisma, prisma.config.ts, the generated Prisma Client, and Prisma Migrate, including the v6 to v7 upgrade. NOT schema-as-TS with a SQL builder (that is drizzle-orm), NOT ORM-agnostic zero-downtime migration (that is…

ericrisco/rsc-harness · 101 tokens

mail-time

Use when building, wiring, reviewing, or debugging MailTime and ostrio:mailer email queues for horizontally scaled Node.js, Bun, or Meteor apps. Trigger on MailTime, MongoQueue, RedisQueue, PostgresQueue, mailTimePreset, JoSk email scheduling, Redis Cluster / KeyDB Cluster / Valkey useHashTags, KeyDB…

veliovgroup/mail-time · 179 tokens

huawei-cloud-ges-graph

Provides access guide for Huawei Cloud Graph Database GES service. Covers Cypher queries, GQL queries, schema/label management, summary info queries, graph data editing and more. Use this skill when users want to operate Huawei Cloud graph database GES service via terminal.

huaweicloud/huaweicloud-skills · 64 tokens

cis-aws-database-2.10

Ensure Database has IAM Auth is Enabled.

CyberStrikeus/CyberStrike · 17 tokens

cis-aws-database-3.13

Ensure Database has IAM Auth is Enabled.

CyberStrikeus/CyberStrike · 17 tokens