pn-backend-philosophy

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

A rulebook for designing and reviewing backend services, APIs, databases, configuration, secrets, authentication, and error handling. It follows common web security and REST design practices.

In plain words
What is it for?
Use it when creating or auditing APIs, data access code, authentication, authorization, configuration, payments, or third-party integrations.
Why use it?
It gives a consistent checklist for avoiding unsafe secrets handling, weak access control, unclear APIs, and fragile error boundaries.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

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

Good fit Use it when creating or auditing APIs, data access code, authentication, authorization, configuration, payments, or third-party integrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-backend-philosophy
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.

Any agent
npx skills add perniemann/pnCore --skill pn-backend-philosophy
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

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-philosophy

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-backend-philosophy"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-backend-philosophy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,587 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.00047 $0.01587
Opus 5 $0.00023 $0.00794
Sonnet 5 $0.00009 $0.00317
Haiku 4.5 $0.00005 $0.00159

Measured 8d ago against content hash bddfab3566b4, 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-philosophy 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-philosophy/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.

Backend Design Philosophy

When used as a standalone skill, begin every response with [pn-skill] 🔺

Purpose

Use this as a backend design rulebook for services that:

  • Expose REST or API endpoints
  • Access databases or external services
  • Manage configuration and secrets
  • Handle authentication and authorization
  • Process payments or sensitive data

It is framework-agnostic and aligned with OWASP, current industry standards, and production resilience.

When to use

  • Designing new APIs, services, or data access layers
  • Reviewing backend security, error handling, or config
  • Establishing backend standards for a team or AI agent
  • Auditing API design, secrets management, or error boundaries
  • Integrating payments or third-party APIs

For workflow, audit checklist, and templates, see reference.md.

Sources


Core Philosophy (non-negotiables)

Resources over RPC

Design APIs around resources (nouns) and HTTP methods. Use clear URIs, avoid nesting beyond 2–3 levels, use query params for filtering and pagination. REST principles: statelessness, cacheability, uniform interface.

Errors at boundaries

Catch errors at request/DB/external boundaries. Return consistent error payloads; log server-side only. Never leak internals (stack traces, query details, paths) to clients. Standard status codes: 4xx for client, 5xx for server.

Secrets never in code

Never commit secrets. Use environment variables or a secret manager (Vault, AWS Secrets Manager, Azure Key Vault). Prefer short-lived credentials over long-lived keys. Document required vars in .env.example; never in README as real values.

Defense in depth

Multiple security layers. Principle of least privilege. Never trust user input—validate and sanitize everything. Fail securely; no information leakage. Regular dependency scanning: use pn-dependency-audit (or npm audit, Snyk).

Read the full file on GitHub · 190 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 190 lines · 47 tokens per session scan A bddfab3566b4

Subscribe to this mod's changes

pn-backend-philosophy is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 5d ago), licensed MIT. It adds 47 tokens to every session and 1,587 once invoked, about $0.0002 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

architecture-patterns

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or…

wshobson/agents · 65 tokens

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 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

developing-genkit-tooling

Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency guidelines.

genkit-ai/genkit · 35 tokens

stripe-projects

Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching", "give me a Postgres", "provision Redis", "I need hosting", "add a vector DB", "get me an API key for X", "get credentials for X", "sign up for a service", "set…

stripe/ai · 213 tokens

ax-go-flow

Use when writing Go code with github.com/ax-llm/ax/packages/go for flows, nodes, program graphs, nested programs, dynamic options, caching, and optimizer components.

ax-llm/ax · 43 tokens