api-endpoint-contract
Skill by trycompai
Sets the contract for new or modified NestJS endpoints in the trycompai API so they work in the OpenAPI spec, the MCP server and the ValidationPipe. Written for developers editing controllers under apps/api/src/.
Install api-endpoint-contract
Built from the published package, never by AI.
git clone --depth 1 https://github.com/trycompai/comp /tmp/comp && mkdir -p ~/.claude/skills && cp -r /tmp/comp/.claude/skills/api-endpoint-contract ~/.claude/skills/api-endpoint-contractRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/trycompai/comp /tmp/comp && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/comp/.claude/skills/api-endpoint-contract ~/.gemini/antigravity-cli/skills/api-endpoint-contractAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install api-endpoint-contract in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
API Endpoint Contract is an agent skill for developers working on the trycompai API in apps/api/src/. It sets out the rules every new or changed endpoint must follow so it is correct in the public OpenAPI spec, the @trycompai/mcp-server npm package, the global ValidationPipe, and the docs. The skill lists 11 rules and a workflow checklist for adding a body endpoint.
The rules cover DTO classes with both @ApiProperty and class-validator decorators, explicit @ApiBody, operation descriptions under 240 characters, MCP tool naming, guard choices, async polling for long jobs, and presigned S3 uploads instead of base64. The skill also covers regenerating packages/docs/openapi.json and checking the spec. It is aimed at contributors to that codebase.
Written from the project's SKILL.md and checked against it.
What it can do
- DTO classesRequires DTOs as classes, not interfaces, so the schema survives to runtime.
- Paired decoratorsPairs @ApiProperty with class-validator decorators on every DTO field.
- Explicit request bodyDeclares @ApiBody({ type }) so the OpenAPI request schema resolves correctly.
- Description lengthKeeps @ApiOperation descriptions at 240 characters or fewer.
- MCP tool namesOverrides auto-derived tool names with x-speakeasy-mcp, kebab-case, up to 52 characters.
- Guard rulesWarns against SessionOnlyGuard on endpoints that agents need to call.
- Async pollingReturns run handles for long jobs and documents the poll target in the description.
- File uploadsUses presigned URLs and s3Key instead of inline base64 file data.
- Sensitive pathsDeny-lists credential and secret endpoints from public docs and MCP.
- Summary and descriptionRequires a summary and description on every operation for CI checks and tool discovery.
What you need
- Access to the trycompai repository
- Bun, to run the API dev server
- NestJS codebase under apps/api/src/
Try asking
- Add a POST endpoint to apps/api that creates a connection, following the endpoint contract
- Check my new controller in apps/api for OpenAPI and MCP problems
- Shorten this operation description to 240 characters or fewer for the API
Good to know
- Written for the trycompai repository and its file paths.
- The 240-character limit and CI checks come from files in that repository.
- Some rules depend on the Speakeasy CI reading packages/docs/openapi.json.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/api-endpoint-contract/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to api-endpoint-contract
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
api-endpoint-contract: common questions
What does the API endpoint contract skill cover?
It covers DTO classes, validation decorators, OpenAPI metadata, MCP tool naming, guards, long-running work, and file uploads for endpoints in apps/api/src/.
Why do DTOs need both @ApiProperty and class-validator decorators?
The global ValidationPipe rejects fields that lack class-validator decorators, while missing @ApiProperty leaves the MCP schema empty.
What must be committed with an API change?
The regenerated packages/docs/openapi.json, because the daily Speakeasy CI reads from that file.
How do I install api-endpoint-contract?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is api-endpoint-contract free?
The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.
Is api-endpoint-contract safe to use?
It scores 79 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to api-endpoint-contract?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
