api-conventions
Skill0 starsChanged 10 days agoMITView on GitHub
The conventions for this Lambda function's contract - function names, one request record in and one response record out, offset paging with NextOffset, errors as Lambda function errors, the HTTP API routes and their problem details, and what is left to API Gateway or IAM. Use when naming a function, shaping its request or response, or deciding how a failure reaches the caller.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- LeanMeanCleanApps/CleanWebApitheir own version, first seen Nov 15, 2026
- LeanMeanCleanApps/CleanGraphQLApitheir own version, first seen Nov 15, 2026
- LeanMeanCleanApps/CleanMinimalApitheir own version, 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 · 0
None found.
Wrote their own version · 15
- mx-space/core★ 567same name
- LeanMeanCleanApps/CleanMinimalApi★ 400same 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
- LeanMeanCleanApps/CleanWebApi★ 4same name
- CodeWithBehnam/cc-docs★ 2same name
5 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
- lambda-emulatorSkill
- mapping-with-mapperlySkill
- mediatorSkill
- 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, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Put every optional input on the request with a default, and document the default.
- Distinctive: line 32
Add a test for each success and for each exception the use case can throw.
- Distinctive: line 36
Put a write behind the HTTP API without deciding how it's protected.
- Distinctive: line 40
Add authentication checks to the function.
“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 (Lambda function)
The rule
| Topic | Convention |
| Names | A verb and a plural noun for lists (GetMovies), a verb and a singular noun for one item (GetMovieById) |
| Input | One request record, deserialised from the invocation payload. Optional values have defaults, so {} is a valid request |
| Output | One response record. Lists return Page<T>(Items, TotalCount, NextOffset), written as items, totalCount and nextOffset |
| Paging | offset and limit on the request (paging). nextOffset is the offset of the next page, or left out on the last page |
| Search | A query property on the list request, not a separate function |
| Errors | Application exceptions are not caught. Lambda returns them as a function error whose errorType is the exception name (ValidationException, NotFoundException) and whose errorMessage is its message |
| HTTP | Lists that callers also want over HTTP get an Http-prefixed twin on an API Gateway HTTP API, the lower-cost API Gateway choice AWS recommends when REST API-only features aren't needed. GET /movies, /authors and /reviews, inputs from the query string, 200 with the same Page<T> JSON, 400 with application/problem+json (title, status, errors by property). Other failures fail the invocation and API Gateway answers 500 |
| Auth | None in the function. API Gateway or the caller's IAM permissions decide who can invoke it (optional-token-auth) |
| JSON | Property names read in any case, written in camelCase, nulls left out (json-serialization) |
| Nested items | A review holds its movie and its author, each without counts or averages. Callers get those from GetMovies and GetAuthors |
Callers, such as Step Functions or another service, match on errorType to tell bad input from a missing item and from a fault.
Steps
- Name the function from the table and give it its own request record unless an existing one fits exactly (
ListRequestserves movies and authors). - Put every optional input on the request with a default, and document the default.
- Return a record designed for the caller, not the Application entity.
- Add a test for each success and for each exception the use case can throw.
Don't
- Put a write behind the HTTP API without deciding how it's protected. The routes are open until a JWT or IAM authorizer is added.
- Return an error inside a successful response, or
nullfor not found. Let the exception reach Lambda. - Wrap exceptions in a generic one. The exception name is part of the contract.
- Return an unbounded list.
- Add authentication checks to the function.
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.

