api-conventions
Skill1 starsChanged 6 days agoMITView on GitHub
How this MCP server's tools, resources and prompts are named and shaped - snake_case noun_verb tool names, titles and annotations, structured results with nextOffset paging, error results versus protocol errors, and keeping the server instructions current. Use when naming or changing a tool, resource or prompt, deciding what a tool returns, or changing how errors reach the model.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- willdady/platypustheir own version, first seen Nov 8, 2026
- leroyguillaume/claudetheir own version, first seen Oct 30, 2026
- mx-space/coretheir own version, first seen Oct 30, 2026
- DataChuLee/Claude-Code-Settingtheir own version, first seen Oct 29, 2026
- Talkif-ai/skillstheir own version, first seen Sep 13, 2026
- TheDecipherist/claude-code-mastery-project-starter-kittheir own version, first seen Jun 26, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- mx-space/core★ 567same name
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- willdady/platypus★ 130same name
- maxyeh0817/Forge★ 34same 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
- DataChuLee/Claude-Code-Setting★ 1same name
1 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
- mcp-inspectorSkill
- 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
7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Before adding a tool, check whether an argument on an existing one does the job (reviews_list takes reviewId, reviews_write creates or …
- Distinctive: line 41
Write descriptions that steer: name the tool to call first, and warn when a call can't be undone or shouldn't be retried.
- Very specific: line 42
When a tool, resource or prompt is added, renamed or changes behaviour, update ServerInstructions in the same change.
- Very specific: line 43
Test the annotations in ToolListTests and each error message in the tool's integration tests (test-design).
- Very specific: line 51
Every tool, prompt and resource sets IconSource to a constant in ItemIcons, which points at a pinned brand release like the server's icon.
- Very specific: line 72
Leave ServerInstructions describing tools that changed.
- Distinctive: line 73
Put internal detail (stack traces, SQL) in an error message.
“Common” is measured: kept by at least 6 in 10 of the 7 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 (MCP)
The rule
The server is designed for a model to use well, not to mirror the Application layer. Six tools cover the jobs: movies_search, movies_get, authors_search, reviews_list, reviews_write and reviews_delete.
| Thing | Convention |
| Tool name | <plural noun>_<verb> in snake_case: reviews_write |
| Title | Sentence case for people: "Write review" |
| Annotations | Every tool sets ReadOnly, Idempotent and OpenWorld = false; writes also set Destructive |
| Results | UseStructuredContent = true, returning a record from Models/; lists return ResultPage<T> with Items, TotalCount and NextOffset (null on the last page) |
| Paging | offset and limit arguments, default 10, at most 50, the shared paging rules |
| Resource URIs | <plural noun>://{id} for a thing, server://version for the server; JSON only |
| Prompt names | snake_case verbs: summarise_movie_reception |
| Descriptions | Say what it returns, when to use it, and which tool finds the ids it needs |
Errors reach the model in two ways, both from src/Presentation/Errors/:
| Where | Filter | Shape |
| Tools | ToolErrorFilter | A normal result with IsError = true and a message the model can act on: Validation Failed: ... or Not Found: ..., ending with what to do next |
| Resources and prompts | ProtocolErrorFilter | An McpProtocolException: ResourceNotFound for not found, InvalidParams for validation |
Anything else is unexpected. ToolErrorFilter logs it as Error and returns Error: An error occurred while processing your request., because the model only sees a tool error and nothing else would log it. ProtocolErrorFilter lets it through, and the MCP SDK logs it and sends an internal error (serilog).
ServerInstructions in WebApplicationBuilderExtensions is the model's first read. It names the tools, how they connect and the rules (paging with nextOffset, confirm before deleting).
Steps
- Before adding a tool, check whether an argument on an existing one does the job (
reviews_listtakesreviewId,reviews_writecreates or updates). - Set every annotation honestly. A tool that can overwrite data is
Destructive; one that's safe to repeat isIdempotent. - Return the smallest useful result. Expensive detail is opt-in (
includeReviews). - Write descriptions that steer: name the tool to call first, and warn when a call can't be undone or shouldn't be retried.
- When a tool, resource or prompt is added, renamed or changes behaviour, update
ServerInstructionsin the same change. - Test the annotations in
ToolListTestsand each error message in the tool's integration tests (test-design).
Resource links
Every tool that returns a movie, author or review also returns a resource_link block for it, as well as its structured content. The link's URI is the matching resource template, its name is the item's title or name, and its mime type is application/json. ResourceLinkFilter adds them, because a tool that returns a typed result has no way to add a content block itself. It takes the scheme from the start of the tool's name, so a new tool only has to follow the movies_get naming and return an id.
Icons
Every tool, prompt and resource sets IconSource to a constant in ItemIcons, which points at a pinned brand release like the server's icon. Use the icon for what the item is about, not what it does. A new item needs one, or EveryItem_ShouldHave_AnIcon fails.
Example
// src/Presentation/Tools/ReviewTools.cs
[McpServerTool(Name = "reviews_delete", Title = "Delete review", ReadOnly = false, Destructive = true, Idempotent = true, OpenWorld = false, UseStructuredContent = true)]
public static async partial Task<DeletedReview> DeleteReview(// src/Presentation/Errors/ToolErrorFilter.cs
NotFoundException => $"Not Found: {exception.Message} Check the ids: movies_search, authors_search and reviews_list return valid ones.",Don't
- Throw from a tool to report a problem the model can fix. Let the filter return an error result.
- Return an unbounded list.
- Build a
CallToolResultby hand in a tool to add a link.ResourceLinkFilterdoes that for every tool. - Name tools after Application classes (
GetMovieByIdQuery) or use camelCase or dashes. - Leave
ServerInstructionsdescribing tools that changed. - Put internal detail (stack traces, SQL) in an error message.
Check
dotnet test --filter "FullyQualifiedName~ToolListTests|FullyQualifiedName~Errors"
docker compose up -d --build # then try it in the MCP Inspector (mcp-inspector)Does 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.

