claude-code-power-config: Skill for Claude Code

.claude/skills/new-api-endpoint/SKILL.md

new-api-endpoint is a skill for Claude Code from AlexisBalayre/claude-code-power-config. It costs 52 tokens per session (425 once invoked), scanned A, original, MIT.

A coding workflow for adding a web API endpoint, including input and output definitions, business logic, request handling, registration, and tests. It follows the project's required backend layers.

In plain words
What is it for?
Use it when creating an API route or endpoint for a domain such as users, sessions, or messages.
Why use it?
It reduces omissions and keeps validation, application logic, formatting, and HTTP handling separated in a consistent way.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

This is AlexisBalayre/claude-code-power-config's own configuration. It tells Claude Code how to work on claude-code-power-config 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 claude-code-power-config configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AlexisBalayre/claude-code-power-config. 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/AlexisBalayre/claude-code-power-config/main/.claude/skills/new-api-endpoint/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AlexisBalayre/claude-code-power-config

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexisbalayre/claude-code-power-config/new-api-endpoint"><img src="https://agentmods.dev/badge/skills/alexisbalayre/claude-code-power-config/new-api-endpoint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 425 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.00052 $0.00425
Opus 5 $0.00026 $0.00212
Sonnet 5 $0.00010 $0.00085
Haiku 4.5 $0.00005 $0.00042

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

Security

Grade A, and why

new-api-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 10d 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.

.claude/skills/new-api-endpoint/SKILL.md · 21 lines

What it actually says

Scaffold a new API endpoint. The per-layer obligations (schema error shapes, service signatures, serializer and handler rules) live in docs/conventions/backend.md - read it first and follow it exactly. This skill fixes only the file set and order of operations.

Execution Steps

  1. Determine Domain & Context: Identify the domain (e.g., sessions, messages). Read 2-3 existing examples in routes/, schemas/, services/, and serializers/ before writing code.
  2. Schema - src/schemas/<domain>.schemas.ts with @hono/zod-openapi (createRoute, z): entity, request body, and param schemas, per backend.md §Schemas.
  3. Service - src/services/<domain>.service.ts, per backend.md §Services.
  4. Serializer - src/serializers/<domain>.serializer.ts, per backend.md §Layering.
  5. Route - src/routes/<domain>.routes.ts: export factory create<Domain>V1Routes(deps: <Domain>V1Deps) with a deps interface (db, env, auth, etc.); handlers stay thin (Validate -> Service -> Serialize -> Respond), per backend.md §Routes.
  6. Register: Add the route factory to registerRoutes in src/routes/index.ts.
  7. Tests - test/unit/routes/<domain>-routes.test.ts, per docs/conventions/testing.md. (Logger is globally suppressed in API tests; mock only to assert.)
  8. Verify:
    • pnpm typecheck
    • pnpm --filter @acme/acme-api test
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. 10d ago First seen · 21 lines · 52 tokens per session scan A 22fa5e572d1f

Subscribe to this mod's changes

new-api-endpoint is a skill published in the GitHub repository AlexisBalayre/claude-code-power-config (2 stars, last pushed 29d ago), licensed MIT. It adds 52 tokens to every session and 425 once invoked, about $0.0003 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-design

REST API contract designer and reviewer. ALWAYS use when designing new endpoints, reviewing existing API contracts, planning API versioning, or standardizing error models. Covers resource modeling (URL/naming), HTTP method semantics, status code selection, error model consistency, pagination/filtering/sorting…

johnqtcg/awesome-skills · 123 tokens

kafka-event-driven-design

Kafka event-driven architecture designer and reviewer, at the application/client layer. ALWAYS use when designing, reviewing, or troubleshooting how a service produces or consumes Kafka events — topic and partition-key design, producer and consumer client configuration, consumer group topology, event schema definition…

johnqtcg/awesome-skills · 191 tokens

thirdparty-api-integration-test

Create and run gated Go integration tests for third-party APIs with real external calls, strict configuration gates, bounded timeouts, and safe runtime controls. Use for vendor/client contract verification and failure triage.

johnqtcg/awesome-skills · 47 tokens

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

cqrs-implementation

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

wshobson/agents · 35 tokens

workflow-orchestration-patterns

Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.

wshobson/agents · 49 tokens