backend-fundamentals

backend-fundamentals is a skill for Claude Code from kouroshez/coding-os. It costs 86 tokens per session (5,376 once invoked), scanned A, original, Apache-2.0.

A set of server-side coding patterns that apply across languages and frameworks. It covers common work such as HTTP handlers, database queries, background jobs, authentication, and webhooks.

In plain words
What is it for?
Use it when building or changing APIs, database access, background processing, authentication, middleware, webhooks, or other server-side code.
Why use it?
It helps prevent backend code from failing under heavy traffic, mishandling errors, repeating work, or querying large databases inefficiently.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it when building or changing APIs, database access, background processing, authentication, middleware, webhooks, or other server-side code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kouroshez/coding-os/backend-fundamentals
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 kouroshez/coding-os --skill backend-fundamentals
Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os

Made for: Claude Code.

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 backend-fundamentals

README.md
[![agentmods](https://agentmods.dev/badge/skills/kouroshez/coding-os/backend-fundamentals.svg)](https://agentmods.dev/skills/kouroshez/coding-os/backend-fundamentals)
Your own site
<a href="https://agentmods.dev/skills/kouroshez/coding-os/backend-fundamentals"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/backend-fundamentals.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,376 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00086 $0.05376
Opus 5 $0.00043 $0.02688
Sonnet 5 $0.00017 $0.01075
Haiku 4.5 $0.00009 $0.00538

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

Security

Grade A, and why

backend-fundamentals 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/check_layering.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/core/skills/backend-fundamentals/SKILL.md · 289 lines

How it starts

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

Backend Fundamentals — Stack-Agnostic Patterns

Universal guidance that holds for Django, FastAPI, Go (stdlib + Fiber), Rails, NestJS, Spring, and any other server-side framework. Framework-specific layering (DRF ViewSets, Pydantic Depends, Fiber middleware chain) lives in the stack-specific skill that depends_on: [backend-fundamentals].

Loaded automatically when enforce-skill.sh routes a file under backend/ that matches a stack skill.

0. Scale mindset (think before writing)

Every handler, query, and API must be written as if it will be called by 1,000 concurrent users on a 50M-row table. Before writing:

  • How many rows does this touch? Unknown → run EXPLAIN ANALYZE or ask.
  • How many callers at once? Single-user admin page vs. public endpoint changes everything.
  • Where's the bottleneck? DB index miss · network hop · CPU work.
  • What's the latency budget? Default P99 < 500 ms; surface the number in the PR description.
  • What happens if step 3 of 5 fails? Transactions · idempotency key · compensating action.

Code that works on 10 rows but collapses on 10 M is a production incident waiting for traffic. Correct answer to "will this scale?" is a number, not "yes".

1. Service / selector split

Business logic lives in services (write path — mutates state, encapsulates a transaction). Read-only DB queries live in selectors (pure functions, cached when possible). Controllers / views / handlers only:

  1. Parse and validate the request.
  2. Call a service or selector.
  3. Shape the response.

No ORM calls in controllers. No business rules in serializers. No DB writes in selectors. This split makes unit testing trivial (mock the service boundary) and keeps transaction boundaries visible.

2. Standard response envelope

Every handler returns one of:

{ "ok": true,  "data":  <T> }
{ "ok": false, "error": { "code": "<UPPER_SNAKE>", "message": "<human>", "retryable": true|false } }

Error codes come from a project-level registry (list every code in one file, e.g. backend/errors.py or docs/api-contracts/error-codes.md). Never invent codes on the fly — if a new case doesn't fit an existing code, add the new code to the registry first, then reference it.

Read the full file on GitHub · 289 lines

Files

What ships with it

3 files 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. 7d ago First seen · 289 lines · 86 tokens per session scan A 8cb3768d7d03

Subscribe to this mod's changes

backend-fundamentals is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 86 tokens to every session and 5,376 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-08-31.

Related

Other skills, from other repositories

potpie-repo-baseline

Use when establishing, refreshing, or deeply understanding a repository's baseline memory in Potpie: purpose, application type, features, services/modules, environments, deploy shape, dependencies, API contracts, datastores, integrations, ownership, and explicit preferences. The harness reads authored and…

potpie-ai/potpie · 75 tokens

potpie-infra-architecture

Use for project infra and architecture context: environments, adapters, runtime configuration, deployments, service dependencies, datastores, API contracts, ownership, incidents, and dependency blast radius.

potpie-ai/potpie · 43 tokens

potpie-project-preferences

Use before writing, modifying, reviewing, refactoring, or testing code so repo/project preferences surface: error handling, file structure, frameworks, logging, dependency choices, testing, security, API style, and naming. Also use after code work when a reusable project preference should be recorded.

potpie-ai/potpie · 63 tokens

booboo-deploy

Stand up a Booboo brain end to end — scaffold the project, write booboo.config.yaml against a real Postgres/Supabase or JSON source, build the snapshot, then wire the REST API, the MCP server, the 3D viewer and the panel. Use when someone wants a brain built for the first time, wants to point Booboo at their own…

jessymariau/booboo · 94 tokens

booboo-adapter

Feed data into a Booboo brain that the built-in postgres and json adapters do not cover — write a small config-driven adapter against the spec instead of forking the builder. Use when a source is Neo4j, an API, a CSV export, a proprietary store, or any shape the standard config cannot express.

jessymariau/booboo · 71 tokens

python-sdk

Implement or modify Python SDK behavior under python/composio, including tools, toolkits, sessions, auth configs, connected accounts, client integration, and shared Python models. Use for Python core runtime/API work; pair with python-testing and cross-sdk-parity when TypeScript must match.

ComposioHQ/composio · 60 tokens