Dotnet.Samples.AspNetCore.WebApi CLAUDE.md

Development guidance for an ASP.NET Core web API that manages football players. It describes the project's layered structure, validation, database access, health checks, and other coding conventions.

In plain words
What is it for?
It guides developers building player-management endpoints, validation rules, database storage, caching, error responses, and automated API documentation.
Why use it?
It keeps the learning project easy to understand and ensures each part of the API has a clear responsibility.

Instructions file

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 instructions/nanotaboada/dotnet.samples.aspnetcore.webapi/claude-md
Clone the repo
git clone --depth 1 https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi
Per session 1,994 This file is loaded in full into every session.
When invoked 1,994 The same file — it is already loaded in full.
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.01994 $0.01994
Opus 5 $0.00997 $0.00997
Sonnet 5 $0.00399 $0.00399
Haiku 4.5 $0.00199 $0.00199

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

Security

Grade A, and why

Dotnet.Samples.AspNetCore.WebApi CLAUDE.md 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 3d 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.md · 191 lines

How it starts

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

CLAUDE.md

Overview

REST API for managing football players built with ASP.NET Core 10. Implements CRUD operations with a layered architecture, EF Core persistence (SQLite by default, PostgreSQL opt-in via DATABASE_PROVIDER), FluentValidation, AutoMapper, and in-memory caching. Primarily a learning and reference project — clarity and educational value take precedence over brevity.

Structure

Layer rule: Controller → Service → Repository → Database. Controllers must not access repositories directly. Business logic must not live in controllers.

Cross-cutting: Program.cs wires health checks (GET /health), rate limiting, CORS (dev only), and Swagger UI (dev only). Serilog is configured at host level. All validators are registered via AddValidatorsFromAssemblyContaining<PlayerRequestModelValidator>().

Coding Guidelines

  • Naming: PascalCase (public members), camelCase (private fields with _ prefix)
  • DI: Primary constructors everywhere
  • Async: All I/O operations use async/await; no ConfigureAwait(false) (unnecessary in ASP.NET Core)
  • Reads: Use AsNoTracking() for all EF Core read queries
  • Errors: RFC 7807 Problem Details via TypedResults.Problem(new HttpValidationProblemDetails(...)) for validation failures (422) and TypedResults.Problem(statusCode: ...) for other errors
  • Logging: Structured logging via ILogger<T>; never Console.Write
  • Avoid: synchronous EF Core APIs, controller business logic, static service/repository classes

Test naming conventions

Two naming patterns, strictly by layer:

Layer Location Pattern Example
Controller (unit) test/.../Unit/ {HttpMethod}_{Resource}_{Condition}_Returns{Outcome} Get_Players_Existing_ReturnsPlayers
Service / Validator test/.../Unit/ {MethodName}_{StateUnderTest}_{ExpectedBehavior} RetrieveAsync_CacheMiss_QueriesRepositoryAndCachesResult
HTTP integration test/.../Integration/ {HttpMethod}_{Resource}_{Condition}_Returns{Outcome} Get_Players_Existing_Returns200Ok

Read the full file on GitHub · 191 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. 3d ago First seen · 191 lines · 1,994 tokens per session scan A 15f4883ab5c2

Subscribe to this mod's changes

Dotnet.Samples.AspNetCore.WebApi CLAUDE.md is an instructions file published in the GitHub repository nanotaboada/Dotnet.Samples.AspNetCore.WebApi (10 stars, last pushed 3d ago), licensed MIT. It adds 1,994 tokens to every session, about $0.0100 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.