Agent skill

API Endpoint

by openathleteorg in openathleteorg/openathlete

Add or change an OpenAthlete API endpoint end to end, from the shared Zod schema to the NestJS controller and service, the web API client, the React Query hook and the UI, with tests.

AGPL-3.0Auto-check passedBackend & APIs

Install API Endpoint

skills CLI
$ npx skills add openathleteorg/openathlete --skill api-endpoint -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openathleteorg/openathlete api-endpoint --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openathleteorg/openathlete.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/api-endpoint .claude/skills/api-endpoint && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-endpoint
GitHub stars
100
Token cost
~682 tokens
SKILL.md length
289 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Add or change an OpenAthlete API endpoint end to end, from the shared Zod schema to the NestJS controller and service, the web API client, the React Query hook and the UI, with tests.

  • Works in 4 steps: Contract in libs/shared → API in apps/api → Web in apps/web → …
  • Any feature that needs new data from
  • SKILL.md covers 1. Contract in libs/shared, 2. API in apps/api, 3. Web in apps/web and 4. Verify
  • Calls pnpm

What it does

API Endpoint is an agent skill from openathleteorg/openathlete. Add or change an OpenAthlete API endpoint end to end, from the shared Zod schema to the NestJS controller and service, the web API client, the React Query hook and the UI, with tests. Use for any feature that needs new data from or to the API.

Its SKILL.md is about 680 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering REST APIs. It works with NestJS, TanStack and Zod. The repository describes itself as: The open-source European alternative to TrainingPeaks. Self-hostable endurance training platform. Your data stays yours. The licence is AGPL-3.0.

When your agent uses it

  • Any feature that needs new data from
  • Tasks that involve REST APIs

Example prompts

  • “/api-endpoint”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Contract in libs/shared
  2. API in apps/api
  3. Web in apps/web
  4. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit e5d83a0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Endpoint loads about 682 tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 289 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~682

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from openathleteorg/openathlete at commit e5d83a0, republished under its AGPL-3.0 licence (© openathleteorg). 289 words, ~682 tokens.

Download SKILL.mdSave it as .claude/skills/api-endpoint/SKILL.md (or your agent's skills folder).
name
api-endpoint
description
Add or change an OpenAthlete API endpoint end to end, from the shared Zod schema to the NestJS controller and service, the web API client, the React Query hook and the UI, with tests. Use for any feature that needs new data from or to the API.

Add an endpoint

Work from the contract outwards, in this order. Each step names the file to follow as an example.

1. Contract in libs/shared

  • Add the request schema next to related ones in libs/shared/src/types/dtos/<area>/, for example equipment.dto.ts: export const createXDtoSchema = z.object({...}) and export type CreateXDto = z.infer<typeof createXDtoSchema>.
  • Export it from the folder's index.ts. Response types come from entities/ or a *.response.dto.ts.
  • Constrain what the API must enforce (lengths, ranges, enums), because the web form reuses the schema.
  • Run pnpm shared build.

2. API in apps/api

  • Controller, in modules/<domain>/controllers/:

    • @UseGuards(AuthGuard('jwt'), UserTypeGuard) and @ApiBearerAuth();
    • @Body(new ZodValidationPipe(schema)) body: Dto;
    • ids through ParseIntPipe;
    • @ApiOperation and @ApiResponse describing the success case and each error status.

    Keep it thin and call one service method.

  • Service:

    • check access through CASL (this.abilities.getFor({ user }), then accessibleBy(ability, 'read' | 'update').<Model> in the Prisma where);
    • throw Nest HTTP exceptions;
    • use $transaction for several dependent writes.
  • Anything slow (provider calls, AI, bulk work) goes in a BullMQ job. See "Patterns" in apps/api/CLAUDE.md.

  • Unauthenticated public endpoints need a rate limit preset from common/security/rate-limits.ts.

  • Unit test the service logic (*.spec.ts), with Prisma mocked when the logic is not SQL. A query whose correctness depends on SQL gets an integration test (*.int-spec.ts).

3. Web in apps/web

  • src/utils/axios.ts: add the path to routes.<domain>, using functions for path parameters.
  • src/api/<domain>/<domain>.api.ts: a static method typed with the shared DTOs.
  • <domain>.keys.ts and <domain>.hooks.ts: a useXQuery or useXMutation. Mutations invalidate the keys whose data changed.
  • UI:
    • forms use React Hook Form with the shared schema and the RHF* fields;
    • success and error feedback through toast;
    • every string through Paraglide, in all four locales (i18n skill).

4. Verify

bash
scripts/verify.sh            # plus --integration if SQL changed, --e2e for a new user flow

For a new user-facing flow, add a Playwright test in e2e/tests/web/ (e2e skill). Open http://localhost:3000/docs to check the Swagger entry reads well.

© openathleteorg, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/api-endpoint of openathleteorg/openathlete.

Open the folder on GitHubat commit e5d83a0

Compare with similar skills

API Endpoint next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Endpoint compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Endpoint this skillopenathleteorg/openathlete100—~682Automated safety check: PassAGPL-3.0
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Pangolin CRUD Endpointsfosrl/pangolin23k—~461Automated safety check: PassCustom licence
Nestjs Trpctrycompai/crm11k—~2.8kAutomated safety check: PassMIT
Backend Dev Guidelineslangfuse/langfuse35k—~1.9kAutomated safety check: PassCustom licence
Backend Dev Guidelineslitefuse/litefuse1001 repos~5.8kAutomated safety check: PassCustom licence

Similar skills

  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Use whenever asked to add, create, or scaffold a CRUD endpoint, router, or entity in this repo's server (create/list/get/update/delete handlers, new…

    23k GitHub stars~461 tokensUpdated today
    Backend & APIsAuto-check passed
  • Nestjs Trpc

    trycompai/crm

    Build end-to-end type-safe tRPC APIs inside NestJS using the nestjs-trpc adapter — @Router/@Query/@Mutation/@Subscription decorators, TRPCModule.forRoot, injectable middlewares and context, Zod…

    11k GitHub stars~2.8k tokensUpdated 26 days ago
    Backend & APIsAuto-check passed
  • Backend Dev Guidelines

    langfuse/langfuse

    Build or review Langfuse backend code. An agent skill from langfuse/langfuse.

    35k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Backend Dev Guidelines

    litefuse/litefuse

    Comprehensive backend development guide for Litefuse's Next.js 14/tRPC/Express/TypeScript monorepo.

    100 GitHub starsUsed in 1 repo~5.8k tokens
    Backend & APIsAuto-check passed
  • Shadmin CLI

    ahaodev/shadmin

    A skill your agent uses when the user asks to query Shadmin admin platform resources (users, roles, menus, registered API resources) from a terminal — for example "list shadmin users", "show shadmin…

    174 GitHub stars~1.1k tokensUpdated 5 days ago
    Backend & APIsAuto-check: notes

More from openathleteorg/openathlete

All 8 skills in this repo
  • E2E

    openathleteorg/openathlete

    Run, debug or extend the OpenAthlete Playwright end-to-end tests, which exercise the production Docker images (API, worker, web, PostgreSQL, Redis) through the API and a real browser on desktop and…

    100 GitHub stars~675 tokensUpdated today
    Auto-check passed
  • I18n

    openathleteorg/openathlete

    Add or change user-facing text in OpenAthlete (web app Paraglide catalogs, API emails and push notifications, website) in every supported language.

    100 GitHub stars~512 tokensUpdated today
    Auto-check passed
  • Prisma Migration

    openathleteorg/openathlete

    Change the OpenAthlete database schema safely with Prisma, covering the migration SQL, production safety, account deletion coverage and tests.

    100 GitHub stars~575 tokensUpdated today
    Auto-check passed
  • Review PR

    openathleteorg/openathlete

    Review an external pull request on openathleteorg/openathlete, test it on top of current main, resolve trivial conflicts, and approve, request changes or merge with a clear, friendly review.

    100 GitHub stars~823 tokensUpdated today
    Auto-check passed
  • Triage Feedback

    openathleteorg/openathlete

    Gather OpenAthlete user feedback from GitHub (issues, PRs, discussions) and the local Discord export, deduplicate it, prioritize it, and draft replies.

    100 GitHub stars~552 tokensUpdated today
    Auto-check passed
  • Release

    openathleteorg/openathlete

    Cut and verify an OpenAthlete release, from choosing the version and running checks to the vX.Y.Z tag, GHCR images and GitHub release notes, including what self-hosters must know.

    100 GitHub stars~505 tokensUpdated today
    Auto-check passed

Categories

Questions about API Endpoint

What does API Endpoint do?

Add or change an OpenAthlete API endpoint end to end, from the shared Zod schema to the NestJS controller and service, the web API client, the React Query hook and the UI, with tests. API Endpoint is an agent skill from openathleteorg/openathlete. Add or change an OpenAthlete API endpoint end to end, from the shared Zod schema to the NestJS controller and service, the web API client, the React Query hook and the UI, with tests.

When should I use API Endpoint?

API Endpoint fits situations like: any feature that needs new data from; tasks that involve REST APIs.

How do I install API Endpoint in Claude Code?

Run `npx skills add openathleteorg/openathlete --skill api-endpoint -a claude-code`. Or copy the skill folder (.claude/skills/api-endpoint in openathleteorg/openathlete) into .claude/skills/api-endpoint in your project. Claude Code loads it when a task matches its description.

How do I install API Endpoint in Codex?

Run `npx skills add openathleteorg/openathlete --skill api-endpoint -a codex`. Or copy the skill folder (.claude/skills/api-endpoint in openathleteorg/openathlete) into .agents/skills/api-endpoint in your project. Codex loads it when a task matches its description.

Can I use API Endpoint in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openathleteorg/openathlete --skill api-endpoint -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-endpoint, .gemini/skills/api-endpoint, .github/skills/api-endpoint and .opencode/skills/api-endpoint in your project.

What does API Endpoint need to run?

Going by SKILL.md and its folder, API Endpoint needs the command-line tools its instructions call (pnpm).

Does API Endpoint access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Endpoint safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Endpoint use?

API Endpoint is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Endpoint use?

About 682 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Endpoint?

Skills that share tags, products or a category with API Endpoint: OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars), Pangolin CRUD Endpoints (fosrl/pangolin, 23k stars), Nestjs Trpc (trycompai/crm, 11k stars) and Backend Dev Guidelines (langfuse/langfuse, 35k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Endpoint?

openathleteorg (a GitHub organization) maintains it in openathleteorg/openathlete, which has 100 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 6, 2026.

Source: openathleteorg/openathlete on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.