public-endpoint-builder

Generate read-only GET endpoints for Express.js resources under /public.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/spuneiartur/claude-agent-specs --skill public-endpoint-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: public-endpoint-builder
Source: https://github.com/spuneiartur/claude-agent-specs/tree/main/express-js/skills/skills/public-endpoint-builder
Command: npx skills add https://github.com/spuneiartur/claude-agent-specs --skill public-endpoint-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Public APIs empower unauthed access to existing resources by exposing read-only endpoints, enabling storefronts, public catalogs, and article lists without writing custom routes from scratch.

Core Features & Use Cases

  • Create public (unauthenticated) read endpoints under /public for existing resources.
  • Generate list (get-) and detail (view-page-) endpoints using aggregation/pipelines with related data where needed.
  • Wire new endpoints into routes/public.js and export barrel in controllers/public/index.js to ensure discoverability.
  • Use cases: adding a product catalog public API, exposing reviews publicly, building a public articles API for a marketing site.

Quick Start

Generate the public endpoints and wire them into the public router, then test GET /public/get-{resources} and GET /public/view-page-{resources}.

Frequently Asked Questions about public-endpoint-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose unauthenticated public API endpoints in Express.js?

To expose unauthenticated public API endpoints in Express.js, you can generate GET-only controllers wired under the /public prefix. This enforces read-only operations for list and detail views without requiring custom route creation from scratch.

Can I use MongoDB aggregation pipelines for joined data in public API routes?

Yes, you can use MongoDB aggregation pipelines for joined data in public API routes. The generated GET endpoints support optional aggregation pipelines, enabling related data to be queried and returned within the public list and detail responses.

What is the best way to create a read-only storefront catalog API for existing resources?

The best way to create a read-only storefront catalog API is to generate public GET endpoints under a /public prefix for existing resources. This automatically wires list and detail controllers into the public router, ensuring discoverability without modifying original routes.

Does this public endpoint generation approach enforce read-only operations?

Yes, this approach enforces read-only operations by generating exclusively GET-only controllers for list and detail views. The endpoints are restricted to read operations under the /public prefix, preventing unauthenticated write access to existing resources.

How do I wire generated public controllers into an Express.js application?

You wire generated public controllers by placing them in the controllers/public directory and exporting them through a barrel file in controllers/public/index.js. The corresponding routes are then registered in routes/public.js to enable testing.

When should I not use unauthenticated public endpoints for my API resources?

You should not use unauthenticated public endpoints for resources requiring access control or write operations. This approach is limited to GET-only list and detail views intended for publicly accessible data like storefronts, article listings, and public catalogs.