api-conventions
Skill4 starsChanged 10 days agoMITView on GitHub
The REST conventions for this API - plural lowercase routes, status codes per operation, problem details for errors, JSON casing and paging parameters. Use when choosing a route, a status code or a response shape.
15 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- LeanMeanCleanApps/CleanLambdaFunctiontheir own version, first seen Nov 15, 2026
- LeanMeanCleanApps/CleanGraphQLApitheir own version, first seen Nov 15, 2026
- LeanMeanCleanApps/CleanMinimalApiedited, first seen Nov 15, 2026
- LeanMeanCleanApps/CleanModelContextProtocoltheir own version, first seen Nov 8, 2026
- willdady/platypustheir own version, first seen Nov 8, 2026
- leroyguillaume/claudetheir own version, first seen Oct 30, 2026
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- LeanMeanCleanApps/CleanMinimalApi★ 40076% same
Wrote their own version · 14
- mx-space/core★ 567same name
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- willdady/platypus★ 130same name
- maxyeh0817/Forge★ 34same name
- LeanMeanCleanApps/CleanGraphQLApi★ 13same name
- harness-studio/harness-studio★ 9same name
- leroyguillaume/claude★ 7same name
- CodeWithBehnam/cc-docs★ 2same name
- lodetomasi/claude-code-training-lab★ 2same name
- onejaejae/skills★ 2same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-a-use-caseSkill
- branches-and-pull-requestsSkill
- cancellationSkill
- ci-for-your-solutionSkill
- ci-pipelineSkill
- clean-architecture-layersSkill
- configuration-and-environmentsSkill
- coverageSkill
- csharp-house-styleSkill
- data-access-ef-coreSkill
- database-migrationsSkill
- docker-and-composeSkill
- docs-and-voiceSkill
- errors-and-exceptionsSkill
- expose-a-use-caseSkill
- family-syncSkill
- health-checksSkill
- integration-testsSkill
- json-serializationSkill
- mapping-with-mapperlySkill
- mediatorSkill
- openapi-and-scalarSkill
- optional-token-authSkill
- packages-and-dependenciesSkill
- pagingSkill
- presentation-integration-testsSkill
- releasesSkill
- sample-dataSkill
- security-findingsSkill
- serilogSkill
- telemetrySkill
- template-authoringSkill
- test-designSkill
- time-providerSkill
- unit-testsSkill
- validationSkill
- writing-a-skillSkill
- xml-docs-and-openapiSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
If an update can't change some fields, leave them out of the request class and say so in the remarks.
- Distinctive: line 34
Add an integration test for each status code the action documents.
- Very specific: line 38
Use verbs or singular nouns in routes (/api/getMovie, /api/movie), or [controller] tokens, which give Movies instead of movies.
- Very specific: line 40
Add a separate /search route.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API conventions
The rule
| Topic | Convention |
| Routes | [Route("api/<plural-lowercase-resource>")] on the controller, and {id:guid} for one item: /api/movies, /api/reviews/{id} |
| Lists | GET with offset and limit (and query to search) in the query string, returning Page<T> (paging) |
| Read one | GET {id} returns 200 with the entity, 404 when it doesn't exist |
| Create | POST returns 201 with the entity and a Location header from CreatedAtAction |
| Update | PUT {id} with only the fields that may change, returns 204 |
| Delete | DELETE {id} returns 204 |
| Invalid input | 400 with validation problem details (errors grouped by property, or by JSON path when the body can't be read) |
| Not found | 404 problem details with a readable detail |
| Unexpected | 500 problem details with no internals. ApplicationExceptionHandler logs the exception as Error (serilog) |
| JSON | camelCase names, enums as camelCase strings, nulls left out, numbers strict (no numbers as strings) |
| Auth | In a solution created with --include-auth, ApiControllerBase has [Authorize] and only health, the OpenAPI document and Scalar are anonymous (optional-token-auth). Without it, nothing asks for authorization |
| Tags | One OpenAPI tag per resource, taken from the controller name |
Errors are RFC 9457 problem details. ApplicationExceptionHandler (src/Presentation/Errors/) writes them for exceptions from Application, [ApiController] writes them when a body or route value can't be bound, and AddProblemDetails() with UseStatusCodePages() covers the rest (an unknown route, an unsupported media type).
Steps
- Pick the route and verb from the table. A new resource gets a new controller, which gives it a new tag.
- Declare every status the action can return with
[ProducesResponseType](expose-a-use-case). - If an update can't change some fields, leave them out of the request class and say so in the remarks.
- Add an integration test for each status code the action documents.
Don't
- Use verbs or singular nouns in routes (
/api/getMovie,/api/movie), or[controller]tokens, which giveMoviesinstead ofmovies. - Return
200with an error in the body, or404for an empty list. - Add a separate
/searchroute. Search is thequeryparameter on the list. - Version the API until there's a second version to show.
Check
dotnet test tests/Presentation.Tests.IntegrationDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

