endpoint

endpoint is a command for Claude Code from justhamade/triadjs. It costs 33 tokens per session (865 once invoked), scanned A, original, MIT.

A command for adding a new HTTP endpoint, a URL that a program can call to request or change data, to an existing TriadJS router. It defines the request and response shapes, handler, authentication when needed, and behavior scenarios.

In plain words
What is it for?
Use it to add GET, POST, PUT, PATCH, or DELETE endpoints for resources such as pets, including parameters, request bodies, status responses, and calls to project services.
Why use it?
It removes the need to manually wire together routing, validation, responses, authentication, and basic behavior checks for each new endpoint.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the triadjs plugin — 10 skills, 8 commands shipped together

Good fit Use it to add GET, POST, PUT, PATCH, or DELETE endpoints for resources such as pets, including parameters, request bodies, status responses, and calls to project services.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/justhamade/triadjs/endpoint
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/justhamade/triadjs

Made for: Claude Code.

Or install triadjs, the plugin that ships this one along with the rest of its 10 skills, 8 commands.

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 endpoint

README.md
[![agentmods](https://agentmods.dev/badge/commands/justhamade/triadjs/endpoint/github.svg)](https://agentmods.dev/commands/justhamade/triadjs/endpoint)
Your own site
<a href="https://agentmods.dev/commands/justhamade/triadjs/endpoint"><img src="https://agentmods.dev/badge/commands/justhamade/triadjs/endpoint/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 endpoint

Your own site · 80×15
<a href="https://agentmods.dev/commands/justhamade/triadjs/endpoint"><img src="https://agentmods.dev/badge/commands/justhamade/triadjs/endpoint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 865 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00033 $0.00865
Opus 5.5 $0.00013 $0.00346
Sonnet 5.5 $0.00007 $0.00173
Haiku 4.5 $0.00003 $0.00086

Measured 2mo ago against content hash 65e8473adb34, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

endpoint scanned grade A with 0 findings 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 2mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/commands/endpoint.md · 52 lines

How it starts

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

Load the triad-endpoint skill for the endpoint() signature and patterns. Load triad-behaviors for the assertion phrase table. If the endpoint needs auth, load triad-schema for the ApiError pattern.

Add a new endpoint to the project based on the user's description ($ARGUMENTS).

Steps

  1. Identify the target file. Either src/endpoints/<resource>.ts (add a new export const) or create a new file if the resource is new.

  2. Define the endpoint() config:

    • name — unique across the whole router (used as operationId)
    • method — one of GET, POST, PUT, PATCH, DELETE
    • path — Express-style (/pets/:id)
    • summary — one-line human description
    • tags — ['<BoundedContext>']
    • request — body, params, query, headers as appropriate
    • responses — every status the handler can return, each with { schema, description }
    • handler — thin; parse ctx.body/params/query, call a repository on ctx.services, return ctx.respond[status](body)
    • behaviors — at least one happy-path scenario and ...scenario.auto()
  3. Request schemas — use inline shapes (params: { id: t.string() }) for one-off shapes, or named ModelSchemas when they should appear as OpenAPI components.

  4. Response schemas — reuse the existing Pet/ApiError/etc. Derive with .pick(...)/.partial() if needed. Every 4xx response uses the project-wide ApiError model.

  5. 204 No Content — use t.empty(), never t.unknown().optional(). Call ctx.respond[204]() with zero args.

  6. If auth is needed — use beforeHandler: requireAuth. Do NOT declare authorization in request.headers — the beforeHandler reads ctx.rawHeaders before validation. Make sure 401: { schema: ApiError, description: '...' } is in responses.

  7. Add at least one behavior that covers the happy path, plus ...scenario.auto() for boundary/missing/enum/type coverage for free. Every assertion string must come from the triad-behaviors phrase table. Strings use double quotes. null is not supported — let the response schema enforce nullability.

  8. Register the endpoint in src/app.ts:

    router.context('Pets', { ... }, (ctx) => ctx.add(createPet, getPet, listPets, /* newly added */ yourEndpoint));
    
  9. Verify:

    • triad validate --strict — catches duplicate names, missing responses, out-of-context models
    • triad test --filter yourEndpoint — runs just the new endpoint's behaviors

Read the full file on GitHub · 52 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. 2mo ago First seen · 52 lines · 33 tokens per session scan A 65e8473adb34

Subscribe to this mod's changes

endpoint is a command published in the GitHub repository justhamade/triadjs (24 stars, last pushed 6mo ago), licensed MIT. It adds 33 tokens to every session and 865 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

endpoint compared with commands from other repositories

endpoint next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
endpointjusthamade/triadjsCommand246mo agoMITA33Claude Code
initfcakyon/claude-codex-settingsCommand1.2ktodayApache-2.0A0Claude Code
http-serviceMadAppGang/magusCommand14todayMITA27Claude Code
buildAzure/ai-gatewayCommand511d agoMITA0Claude Code
api-contract-reviewMozurok/fhorja.devCommand1029d agoMITA64Claude Code
start-10-1minicoohei/ai-agent-campCommand3471mo agononeA2Claude Code
fastapimfmezger/ai_agent_dotfilesCommand73mo agoMITA84Claude Code, Gemini CLI