new-endpoint

new-endpoint is a skill for Claude Code from justnau1020/claude-os. It costs 28 tokens per session (476 once invoked), scanned A, original, Apache-2.0.

A REST API endpoint is a web address that accepts a request, such as GET or POST, and performs a defined operation. This add-on scaffolds a new endpoint using the project's existing patterns.

In plain words
What is it for?
Use it when adding functionality to a REST API. Provide an HTTP method, a route path, and optionally a description for the endpoint.
Why use it?
It reduces the manual work of choosing route files and setting up authentication, typed data, error handling, and async code consistently.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: positional $N argument.

Good fit Use it when adding functionality to a REST API. Provide an HTTP method, a route path, and optionally a description for the endpoint.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/justnau1020/claude-os/new-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.

Any agent
npx skills add justnau1020/claude-os --skill new-endpoint
Clone the repo
git clone --depth 1 https://github.com/justnau1020/claude-os

Made for: Claude Code.

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 new-endpoint

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/justnau1020/claude-os/new-endpoint"><img src="https://agentmods.dev/badge/skills/justnau1020/claude-os/new-endpoint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 476 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.00028 $0.00476
Opus 5 $0.00014 $0.00238
Sonnet 5 $0.00006 $0.00095
Haiku 4.5 $0.00003 $0.00048

Measured 11d ago against content hash a05cc9587474, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

new-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 11d 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.

skills/development/new-endpoint/SKILL.md · 67 lines

What it actually says

Create a New API Endpoint

Scaffold a new REST API endpoint following the project's existing conventions.

Arguments

  • $0 -- HTTP method (GET, POST, PUT, DELETE)
  • $1 -- Route path (e.g., /users/{user_id}/settings)
  • $2 -- Optional description of what the endpoint does

Steps

1. Determine route file

Check if an existing route file covers this domain (read the API directory for existing route files). If this fits an existing domain, add to that file. Otherwise, create a new route file.

2. Create the endpoint

Follow patterns from existing routes in the project. Example (FastAPI):

from fastapi import APIRouter, Depends, HTTPException

router = APIRouter(prefix="/resource", tags=["domain"])

@router.$0("$1")
async def endpoint_name(
    resource_id: str,
    user=Depends(get_current_user),
):
    ...

3. Conventions (NON-NEGOTIABLE)

  • Authentication: Use the project's auth dependency injection pattern
  • Typed models: Request/response bodies use typed models, not raw dicts
  • Error responses: Use specific HTTP status codes (422, 404, 429, 503) with actionable messages
  • Async only: All endpoint functions must be async def
  • Type hints: Full type annotations on all parameters and return types

4. Register the router

If you created a new route file, register it in the app's router registration (e.g., app.include_router()).

5. Write tests

Create or extend tests for the new endpoint:

  • Test successful request with valid auth
  • Test unauthorized access (missing/invalid credentials)
  • Test ownership enforcement (if applicable)
  • Test validation errors (bad input)
  • Test edge cases specific to this endpoint

6. Verify

pytest tests/ -v -k "test_<domain>"
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. 11d ago First seen · 67 lines · 28 tokens per session scan A a05cc9587474

Subscribe to this mod's changes

new-endpoint is a skill published in the GitHub repository justnau1020/claude-os (3 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 28 tokens to every session and 476 once invoked, about $0.0001 per session on Opus 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-31.

Related

Other skills, from other repositories

api-tester

A tool for creating and checking API tests from the real API contract and implementation. An API is the agreed way that software sends requests and receives responses.

laolaoshiren/claude-code-skills-zh · 86 tokens

apidesign

Design stable, hard-to-misuse interfaces - REST/GraphQL endpoints, module boundaries, type contracts, component props, anything where one piece of code talks to another. Use at design time, before implementing the surface. Triggers: 'design this API', 'API contract', 'endpoint design', 'module boundary', 'interface…

vanducng/skills · 89 tokens

fastreact

Scaffold and build a full-stack web app: FastAPI backend (Python, uv, SQLModel, Postgres, Alembic, JWT + Google OAuth, boto3/S3) + React frontend (Vite, TypeScript, shadcn/ui + Tailwind, TanStack Router/Query/Table, Zod, Axios), wired with Docker Compose. Use this skill whenever the user wants to spin up, bootstrap…

vanducng/skills · 214 tokens

dag-factory

Author Airflow DAGs from dag-factory YAML. Use when creating or editing YAML DAG configs, loaders, callbacks, custom operators in YAML, dynamic mapping, datasets, or validating dag-factory files. Covers both map-style tasks (taskid as YAML key) used by in-repo plugins and the PyPI dag-factory v1 list format. Not for…

vanducng/skills · 103 tokens

py2go

Migrate Python projects to idiomatic Go end-to-end. Branches into 6 project-type playbooks (CLI, TUI, HTTP backend, data pipeline, async worker, library) with the right stack defaults (Gin, pgx, sqlc, slog, etc.) and pinned library versions. Default strategy: LLM module-by-module rewrite with golden-file parity tests…

vanducng/skills · 141 tokens

php-form-mailer

Wire any HTML form to a two-email PHP system. Generates a complete PHP handler that sends a structured notification email to the site owner and a branded HTML confirmation to the person who submitted, updates the form action and JS handler with a mailto fallback, then tests the live endpoint with curl. Works on any…

jqaisystems/jqai-ai-skills · 86 tokens