latitude-llm: Skill for Claude Code

.agents/skills/api-endpoints/SKILL.md

api-endpoints is a skill for Claude Code, Codex from latitude-dev/latitude-llm. It costs 78 tokens per session (6,180 once invoked), scanned A, original, MIT.

Guidance for adding an API operation from one shared definition so it can be exposed through HTTP, documentation, developer libraries, command-line tools, and agent tools.

In plain words
What is it for?
Use it when adding or changing API operations, deciding where shared logic belongs, or checking why generated API descriptions and SDKs are out of date.
Why use it?
It keeps the different API surfaces synchronized and encourages reuse of existing application logic instead of duplicating it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is latitude-dev/latitude-llm's own configuration. It tells Claude Code and Codex how to work on latitude-llm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything latitude-llm configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { defineOperation } from "../core/define-operation.ts".

About the project

Latitude is an open-source platform for monitoring AI agents by collecting execution traces, grouping failures, dispatching coding agents to make fixes, and replaying failures to verify them. Teams use it to observe agent behavior, investigate errors, and monitor whether fixes prevent regressions. The catalogue entries include skills, instructions, and an MCP server for working with Latitude.

latitude-dev/latitude-llm · 4,734 stars · on GitHub · latitude.so

Reuse

Borrowing it

Nothing to install: this file belongs to latitude-dev/latitude-llm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/latitude-dev/latitude-llm/development/.agents/skills/api-endpoints/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/latitude-dev/latitude-llm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-endpoints

README.md
[![agentmods](https://agentmods.dev/badge/skills/latitude-dev/latitude-llm/api-endpoints/github.svg)](https://agentmods.dev/skills/latitude-dev/latitude-llm/api-endpoints)
Your own site
<a href="https://agentmods.dev/skills/latitude-dev/latitude-llm/api-endpoints"><img src="https://agentmods.dev/badge/skills/latitude-dev/latitude-llm/api-endpoints/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-endpoints

Your own site · 80×15
<a href="https://agentmods.dev/skills/latitude-dev/latitude-llm/api-endpoints"><img src="https://agentmods.dev/badge/skills/latitude-dev/latitude-llm/api-endpoints.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,180 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 212
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.06180
Opus 5.5 $0.00031 $0.02472
Sonnet 5.5 $0.00016 $0.01236
Haiku 4.5 $0.00008 $0.00618

Measured 24d ago against content hash 119cc007550e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-endpoints scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 24d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| HTTP route (Hono) | `route.method` + `route.path` + `execute`/`handler` | curl, internal services — mounted by `apps/api` |
.agents/skills/api-endpoints/SKILL.md · 318 lines

How it starts

The opening of the file, as written. The whole thing — 318 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Adding API operations

When to use: Adding a new operation to the public API, changing an existing one, or wondering why mcp.json / openapi.json / the SDK aren't in sync.

Before you start — reuse the UI's logic via the domain layer

When you add a new operation, check whether the same action or read is already available in the web UI. The goal isn't full surface parity, it's not duplicating logic that the web already implements.

For each new operation, open apps/web/src/domains/<entity>/<entity>.functions.ts. Three cases:

  • The web's server fn already calls a domain use-case (imports *UseCase from @domain/*): reuse that use-case in the operation. Don't reimplement the logic.
  • The web's server fn has the logic inline (raw repository calls, validation, side effects in the server fn body itself): extract it into a new domain use-case first, then have both the web server fn AND your operation call it. The domain use-case becomes the shared seam.
  • The web's server fn delegates to a third-party API like getBetterAuth().api.*: the API process can't reach the same in-process instance. Write a domain use-case that replicates that behavior (carefully — read the third-party source so your use-case matches its rules), then point both the web and the operation at the use-case. Adds parity tests so the migration doesn't silently drift.

The domain use-case is the shared seam between web and API. Duplicating logic in both surfaces creates drift — one gets a bug fix the other doesn't.

If the entity doesn't have a .functions.ts because the UI doesn't expose this action yet, you're designing fresh. That's fine; just don't lose the option to share later — put the business logic in a @domain/* use-case from the start rather than inline in the operation.

What you're really doing

Every operation in packages/operations is one declaration that fans out into every generated surface:

Surface Generated from Consumed by
HTTP route (Hono) route.method + route.path + execute/handler curl, internal services — mounted by apps/api
OpenAPI operation route.name (→ operationId), route.description, request/response schemas apps/api/openapi.json — the source Fern reads for the SDKs + CLI
MCP tool route.name, route.description, flattened input + 2xx-JSON output schema apps/api/mcp.json, runtime /v1/mcp transport
TS + Python SDK methods Fern reads openapi.json; group/sdkMethod name the method end-user TypeScript (@latitude-data/sdk) and Python (latitude-sdk) code
latitude CLI command Fern reads openapi.json shell users + AI agents (latitude <resource> <verb>, --help, --schema)
In-process agent tool defineToolset({ groups }) selection over execute-form operations internal AI agents (e.g. the signal-creation agent) — no HTTP, no tokens

Read the full file on GitHub · 318 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 24d ago Changed 119cc007550e
  2. 1mo ago First seen · 318 lines · 78 tokens per session scan A 8b752eac4f81

Subscribe to this mod's changes

api-endpoints is a skill published in the GitHub repository latitude-dev/latitude-llm (4,734 stars, last pushed yesterday), licensed MIT. It adds 78 tokens to every session and 6,180 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.