bff-entry-points
БесплатноБез исполняемых скриптовНе проверенDesign and protect browser-facing BFF and backend HTTP entry points: an explicit public/protected access classification for every production route, a…
от citypaul★ 764 звезды на GitHubОб этом скилле
BFF Entry Points
A BFF is a driving host: it owns the browser-facing HTTP boundary and invokes application operations on behalf of one user experience. This skill owns the behavioral security model of that boundary — who may call each entry point, how that is enforced by construction, and how the application stays safe when a caller is not a browser. It follows the IETF's BCP-track guidance for browser-based apps: tokens stay server-side, the browser holds only a session cookie (draft-ietf-oauth-browser-based-apps §6.1 — BCP-track, in the RFC Editor queue at the time of writing; RFC 9700 / BCP 240 is the published OAuth security baseline).
Load bff-design for the pattern-level decisions this skill assumes are settled — whether to have a BFF at all, how many, aggregation and partial-failure design, and mediating user identity toward upstream services. Load structure-codebase for the physical endpoints/ tree, route catalog files, and dev-only routing; this skill defines what each endpoint leaf must declare and how registration enforces it. Load hexagonal-architecture for ports and adapters; this skill deepens its rule that authentication is adapter work and authorization is application policy. Load api-design for REST conventions, error body shape (RFC 9457), rate limiting, and versioning. Load secure-oauth-oidc for the OAuth/OIDC flows behind login; this skill owns the application session that results. Load codebase-design when shaping the registrar's contract — it is a deliberately deep module.
Read the relevant reference before implementing:
- Read
references/endpoint-protection.mdfor the endpoint contract shape, session cookie profile, Origin/Fetch Metadata/CSRF/content-type policy, and the derived entry catalog. - Read
references/hexagonal-auth-boundaries.mdforAuthenticatedPrincipal, in-application authorization, actor mapping, and row-level security as containment. - Read
references/realtime-entry-points.mdfor protected SSE streams and the protected WebSocket upgrade registrar. - Read
references/browser-session-coordination.mdfor the single browser-side authentication coordinator. - Read
references/enforcement-and-testing.mdfor the automated gates, positive controls, and hostile test matrix. - Read
references/hono-example.mdfor a concrete Hono registrar; the model is framework-neutral and maps to Fastify, Express, and Fetch-based routers.
Core Model: Explicit Access Classification
Every production entry point declares its access classification. There is no implicit default — an unclassified route is a build failure, not "protected by whatever middleware happens to run first" (OWASP API5:2023 mandates deny-by-default with explicit grants; CWE-306 names the missing check, not the broken check, as the vulnerability).
Minimum classification for browser-facing HTTP endpoints:
| Classification | Meaning | Registrar installs |
|---|---|---|
public |
Intentionally callable without an application session | Validation, abuse controls, explicitly unauthenticated docs |
protected-read |
Safe method for an authenticated user | Session resolution → 401 → in-application authorization |
protected-browser-mutation |
State change initiated by a browser | Origin/Fetch Metadata/content-type policy → session → CSRF → authorization |
// Canonical definition — references restate it only by pointer.
type EndpointAccess =
| { readonly kind: 'public'; readonly justification: string }
| { readonly kind: 'protected-read' }
| { readonly kind: 'protected-browser-mutation' }
| { readonly kind: 'protected-upgrade' }; // raw WebSocket upgrades — realtime reference
A project may extend the discriminated union — service credentials, signed webhooks, administrative operations — but every entry point still makes one explicit, exhaustive declaration, and each added kind defines its own verification chain in the registrar. Non-browser driving adapters (CLIs, job runners, queue consumers) are not exempt: each authenticates by its own mode and constructs its own caller principal (see the hexagonal reference's system-caller section).
Public is a claim about callers, not about trust. A public endpoint is still validated, rate-limited, monitored, and free of secrets — it is not network-private and not exempt from abuse controls. Health probes are the canonical example: public, but verdict-only (no dependency names, versions, or stack traces). The public set is an application decision; keep it small, snapshot it in a reviewed allowlist test, and treat any diff as a security review.
Source of Truth and the Derived Catalog
Endpoint contracts stay feature-local: route, validation sch
Установить bff-entry-points в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bff-entry-points?
Design and protect browser-facing BFF and backend HTTP entry points: an explicit public/protected access classification for every production route, a composition-prepared endpoint registrar that installs session, Origin, Fetch Metadata, CSRF, and content-type policy by construction, provider-free authorization inside the application, protected SSE and WebSocket registration, browser session coordination, and automated enforcement gates. Use when adding or reviewing HTTP endpoints, when a tenant or customer can see another's data through a route or any authorization bug is reported on an endpoint, authentication middleware, session cookies, CSRF or Origin policy, realtime streams, login/logout flows, or auditing which routes are public. For whether to adopt a BFF, granularity, aggregation, and upstream identity mediation use bff-design; for physical BFF route layout use structure-codebase; for REST semantics, pagination, and versioning use api-design; for OAuth/OIDC protocol flows use secure-oauth-oidc; for ports-and-adapters implementation use hexagonal-architecture.
Как установить скилл bff-entry-points?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bff-entry-points запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic