backend-conventions

backend-conventions is a skill for Claude Code, Codex from fpindej/netrock. It costs 27 tokens per session (3,075 once invoked), scanned A, original, MIT.

A reference for backend code conventions using .NET 10 and C# 13, including where different parts of an application belong and how they are organized.

In plain words
What is it for?
Use it as a guide for organizing domains, services, data access, APIs, authorization, and shared backend code.
Why use it?
It gives backend agents consistent project patterns to follow when adding or reviewing code. The input does not describe specific commands or workflows.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/fpindej/netrock/backend-conventions
Any agent
npx skills add fpindej/netrock --skill backend-conventions
Clone the repo
git clone --depth 1 https://github.com/fpindej/netrock

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/fpindej/netrock/backend-conventions.svg)](https://agentmods.dev/skills/fpindej/netrock/backend-conventions)
Your own site
<a href="https://agentmods.dev/skills/fpindej/netrock/backend-conventions"><img src="https://agentmods.dev/badge/skills/fpindej/netrock/backend-conventions.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,075 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 $0.00027 $0.03075
Opus 5 $0.00014 $0.01537
Sonnet 5 $0.00005 $0.00615
Haiku 4.5 $0.00003 $0.00308

Measured 5d ago against content hash 230f223056c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backend-conventions 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 5d 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.

.claude/skills/backend-conventions/SKILL.md · 250 lines

How it starts

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

Backend Conventions (.NET 10 / C# 13)

Project Structure

src/backend/
├── MyProject.Shared/              # Result, Error, ErrorType, ErrorMessages (zero deps)
├── MyProject.Domain/Entities/     # Business entities (BaseEntity)
├── MyProject.Application/         # Interfaces, DTOs, service contracts
│   ├── Features/{Feature}/I{Feature}Service.cs
│   ├── Features/{Feature}/Dtos/{Operation}Input.cs, {Entity}Output.cs
│   ├── Identity/IUserService.cs, IUserContext.cs
│   └── Identity/Constants/AppRoles.cs, AppPermissions.cs
├── MyProject.Infrastructure/      # Implementations (all internal)
│   ├── Features/{Feature}/Services/, Configurations/, Extensions/
│   └── Persistence/MyProjectDbContext.cs
├── MyProject.ServiceDefaults/     # Aspire shared: OTEL, service discovery, resilience
├── MyProject.AppHost/             # Aspire orchestrator (local dev only)
└── MyProject.WebApi/              # Entry point
    ├── Features/{Feature}/{Feature}Controller.cs, {Feature}Mapper.cs
    ├── Features/{Feature}/Dtos/{Operation}/{Operation}Request.cs + Validator
    ├── Authorization/             # RequirePermission, PermissionPolicyProvider
    └── Shared/                    # ApiController, ProblemFactory, ValidationConstants

C# Conventions

Access Modifiers

Item Modifier
Domain entities, Application interfaces/DTOs public
Infrastructure services, EF configs, mappers internal
WebApi controllers, request/response DTOs public

Key Rules

  • Nullability: string.Empty for required, string? for optional. Express nullability in the type system.
  • Collections: Prefer IReadOnlyList<T> on public interfaces. Avoid exposing List<T> or T[] directly.
  • Time: TimeProvider registered as TimeProvider.System singleton.
  • NuGet: To add a package: <PackageVersion Include="Pkg" Version="X.Y.Z" /> in Directory.Packages.props, <PackageReference Include="Pkg" /> in .csproj.

Entity Definition

New entities should extend BaseEntity (provides Id, CreatedAt/By, UpdatedAt/By, IsDeleted, DeletedAt/By - all set by AuditingInterceptor automatically) and use BaseEntityRepository<T> for data access.

Read the full file on GitHub · 250 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. 5d ago First seen · 250 lines · 27 tokens per session scan A 230f223056c8

Subscribe to this mod's changes

backend-conventions is a skill published in the GitHub repository fpindej/netrock (231 stars, last pushed 4d ago), licensed MIT. It adds 27 tokens to every session and 3,075 once invoked, about $0.0001 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

clean-architecture-dotnet

Use when domain logic leaks into API/Infrastructure, project references violate layer boundaries, or you need to decide between CQS (always), CQRS bus (complex domains), and DDD patterns (invariants and events).

SebastienDegodez/copilot-instructions · 50 tokens

creating-dotnet-mcp-servers

Use when building Model Context Protocol (MCP) servers in .NET, configuring tools, transports (SSE/stdio), JSON serialization for AOT, or testing MCP endpoints.

SebastienDegodez/copilot-instructions · 43 tokens

update-dependencies

Use when the task in front of you is to move dependency pins — packages in either stack, Rust crates, tools, SDKs, GitHub Action references, or container images — or to find out which of them are behind and whether any changed licence.

Krzysztof318/MailFathom · 55 tokens

python

Enforces FastAPI, Dependency Injection, and general Python coding standards based on the repository structure.

aps08/fullstack-clean-architecture · 21 tokens

dpg-migration

Migration logic for Azure SDK for .NET data-plane libraries migrating from AutoRest/Swagger to TypeSpec-based generation. Uses MCP tools from the generator-agent server for automated deterministic fixes.

Azure/azure-sdk-for-net · 41 tokens

mitigate-breaking-changes

Patterns and techniques for mitigating breaking changes in Azure management-plane SDKs. Covers SDK-side customizations (partial classes, CodeGenType, CodeGenSuppress) and TypeSpec decorator customizations (clientName, access, markAsPageable, alternateType, hierarchyBuilding).

Azure/azure-sdk-for-net · 60 tokens