pn-backend-scaffolding

pn-backend-scaffolding is a skill for Cursor from perniemann/pnCore. It costs 75 tokens per session (1,287 once invoked), scanned A, original, MIT.

A starting structure for Node web APIs using Express, Fastify, Hono, or similar frameworks.

In plain words
What is it for?
Use it when creating a Node API or adding a route, resource, module, or service to an existing backend.
Why use it?
It gives routes, business logic, validation, errors, configuration, and shared code clear places to live as the backend grows.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { authenticate } from "../shared/middleware/authenticate.js";.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it when creating a Node API or adding a route, resource, module, or service to an existing backend.

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/perniemann/pnCore
agentmods
npx agentmods add skills/perniemann/pncore/pn-backend-scaffolding

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

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 pn-backend-scaffolding

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-backend-scaffolding/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-backend-scaffolding)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-backend-scaffolding"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-backend-scaffolding/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 pn-backend-scaffolding

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-backend-scaffolding"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-backend-scaffolding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,287 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.00075 $0.01287
Opus 5 $0.00037 $0.00643
Sonnet 5 $0.00015 $0.00257
Haiku 4.5 $0.00007 $0.00129

Measured 8d ago against content hash 25e0a7a9a125, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pn-backend-scaffolding 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 8d 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.

packages/pn-core-mcp/content/skills/backend/pn-backend-scaffolding/SKILL.md · 187 lines

How it starts

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

Backend scaffolding

When to use

  • Adding a new API route, handler, or endpoint.
  • Creating a new backend module, service, or domain.
  • Setting up a new Node backend project from scratch.
  • Adding a new resource to an existing API.

Folder structure

Prefer domain-driven layout over technical-layer layout:

# Domain-driven (preferred)
src/
  users/
    users.router.ts     # Express/Fastify route definitions
    users.service.ts    # Business logic
    users.schema.ts     # Zod validation schemas
    users.types.ts      # TypeScript types for this domain
  orders/
    orders.router.ts
    orders.service.ts
    orders.schema.ts
  shared/
    db.ts               # DB connection/pool
    errors.ts           # AppError class, error codes
    middleware/
      authenticate.ts
      errorHandler.ts
  index.ts              # App entry point

vs. technical-layer (avoid for anything beyond a toy project):

# Avoid at scale
controllers/
models/
routes/
services/

Express scaffold

// src/users/users.router.ts
import { Router } from "express";
import { authenticate } from "../shared/middleware/authenticate.js";
import { asyncHandler } from "../shared/middleware/asyncHandler.js";
import { CreateUserSchema } from "./users.schema.js";
import { createUser, getUserById } from "./users.service.js";

export const usersRouter = Router();

usersRouter.post(
  "/",
  authenticate,
  asyncHandler(async (req, res) => {
    const body = CreateUserSchema.parse(req.body); // throws on validation fail
    const user = await createUser(body);
    res.status(201).json({ data: user });
  })
);

usersRouter.get(
  "/:id",
  authenticate,
  asyncHandler(async (req, res) => {
    const user = await getUserById(Number(req.params.id), req.user.id);
    res.json({ data: user });
  })
);
// src/shared/middleware/asyncHandler.ts
import type { Request, Response, NextFunction, RequestHandler } from "express";

export function asyncHandler(
  fn: (req: Request, res: Response, next: NextFunction) => Promise<unknown>
): RequestHandler {
  return (req, res, next) => fn(req, res, next).catch(next);
}

Read the full file on GitHub · 187 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. 8d ago First seen · 187 lines · 75 tokens per session scan A 25e0a7a9a125

Subscribe to this mod's changes

pn-backend-scaffolding is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 5d ago), licensed MIT. It adds 75 tokens to every session and 1,287 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-09-03.

Related

Other skills, from other repositories

fastapi-templates

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

wshobson/agents · 37 tokens

chat-sdk

Build multi-platform chat bots with Chat SDK (chat npm package). Use when developers want to (1) Build a Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, or WhatsApp bot, (2) Use Chat SDK to handle mentions, direct messages, subscribed threads, reactions, slash commands, cards, modals, files, or AI…

vercel-labs/open-agents · 191 tokens

azure-identity-ts

Authenticate to Azure services using Azure Identity library for JavaScript (@azure/identity). Use when configuring authentication with DefaultAzureCredential, managed identity, service principals, or interactive browser login.

microsoft/skills · 41 tokens

typescript

TypeScript coding conventions, best practices, and patterns for writing clean, maintainable code.

genkit-ai/genkit · 20 tokens

zod-validation-utilities

Creates reusable Zod v4 schemas, validates API payloads, forms, and configuration input, transforms and coerces data safely, and handles validation errors with strong type inference for TypeScript applications. Use when designing validation layers, parsing z.string(), z.object(), or z.email() schemas, or implementing…

giuseppe-trisciuoglio/developer-kit · 77 tokens

fluent-development

This skill should be used when the user asks to "build a fluent app", "create a servicenow app in typescript", or mentions "servicenow sdk", "now-sdk", "fluent", "scoped app as code", or "pro-code development" — or when the working directory contains a now.config.json or .now.ts files.

serac-labs/serac · 77 tokens