pn-backend-architecture

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

A guide for planning backend systems, including APIs, databases, background jobs, and cloud deployment. It helps choose between a single application, a modular monolith, and separate services.

In plain words
What is it for?
Use it when designing API contracts, database schemas, indexing, event-driven workflows, service boundaries, or infrastructure.
Why use it?
It prevents architecture choices from being made without considering scale, data consistency, response time, team size, and deployment constraints.

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 designing API contracts, database schemas, indexing, event-driven workflows, service boundaries, or infrastructure.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-backend-architecture"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-backend-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,569 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.00037 $0.01569
Opus 5 $0.00018 $0.00785
Sonnet 5 $0.00007 $0.00314
Haiku 4.5 $0.00004 $0.00157

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

Security

Grade A, and why

pn-backend-architecture 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-architecture/SKILL.md · 151 lines

How it starts

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

Backend architecture

When to use

  • Designing API structure or database schema before implementation begins.
  • Choosing between service patterns (monolith, modular monolith, microservices).
  • Schema design, indexing strategy, and performance considerations.
  • Event-driven architecture, queuing, and async processing decisions.
  • Cloud infrastructure and deployment strategy.

Workflow

1. Clarify requirements first

Before choosing a pattern, establish constraints:

  • Scale: Expected traffic (requests/sec), data volume (rows, GB), and growth trajectory.
  • Consistency: Does stale data break user trust, or is eventual consistency acceptable?
  • Latency: Are there hard SLA requirements? (< 100ms p99, real-time sync, etc.)
  • Team size: More services = more operational overhead. A team of 2 should not run 10 microservices.
  • Deployment target: Managed cloud (Vercel, Railway, Render), containers (Fly, ECS), or bare metal?

2. Choose a service decomposition strategy

Start with a modular monolith. Extract services only when a specific boundary causes a measurable problem.

Pattern When to use Risks
Monolith < 5-person team, single domain, proving the product Hard to scale individual bottlenecks
Modular monolith Clear domain boundaries, single team, shared DB acceptable Discipline required to maintain boundaries
Microservices Independent scaling needs, separate deploy cadences, multiple teams Network overhead, distributed tracing, operational complexity
Event-driven Decoupled workflows (email on signup, inventory on order), async side effects Eventual consistency, harder to debug

Rules for extraction:

  • Extract a service only when: a team boundary, a scaling need, or a technology requirement demands it.
  • Never decompose by technical layer (separate service for "the DB layer"). Decompose by domain.

3. API contract design

Design the API contract before writing implementation code. Use OpenAPI-first.

Read the full file on GitHub · 151 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 · 151 lines · 37 tokens per session scan A ccb6fe4cf9f0

Subscribe to this mod's changes

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

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

cqrs-implementation

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

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

output-dev-credentials

Store and reference encrypted secrets in Output SDK workflows using @outputai/credentials. Use when integrating API keys, database passwords, or third-party tokens.

growthxai/output · 35 tokens

firebase-data-connect

Use when setting up Data Connect, writing GraphQL queries/mutations, configuring generated SDKs, handling offline, or applying security rules.

evanca/flutter-ai-rules · 31 tokens

backend-patterns

Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes. Use when building or reviewing Node.js, Express, or Next.js API routes and their data access.

affaan-m/ECC · 51 tokens