loopback4

Guide LoopBack 4 REST API changes for the Juzmatch codebase.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/wadjakorn/agents-skills-loopback4 --skill loopback4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loopback4
Source: https://github.com/wadjakorn/agents-skills-loopback4/tree/main
Command: npx skills add https://github.com/wadjakorn/agents-skills-loopback4 --skill loopback4

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces friction when implementing and maintaining the Juzmatch LoopBack 4 API by codifying repository conventions, preserving startup behavior, and guiding safe changes to controllers, authentication, datasources, repositories, OpenAPI, and boot/startup wiring.

Core Features & Use Cases

  • Controller changes: Guidance for adding or updating REST endpoints in src/controllers following the repository's decorator and style conventions while keeping controller methods thin.
  • Authentication updates: Instructions for modifying API key or JWT behavior while preserving AuthenticationComponent, JWTAuthenticationComponent, and the custom ApiKeyAuthenticationStrategy and ensuring OpenAPI security alignment.
  • Boot, wiring, and data integration: Advice for maintaining BootMixin/ServiceMixin/RepositoryMixin composition, datasource and repository integration, and startup/index.ts behavior with minimal, behavior-preserving changes.
  • Verification & tooling: Recommends using the repository's fast verification commands (build, lint, and targeted tests) and cautions against broad refactors.

Quick Start

Add a protected GET endpoint in src/controllers using the apikey authentication strategy, update the OpenAPI security scheme if needed, and run the build and targeted tests to verify behavior.

Frequently Asked Questions about loopback4

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

FAQPage Schema
How do I add a new REST endpoint to a LoopBack 4 controller?

Adding a protected REST endpoint in LoopBack 4 requires defining the route in src/controllers with appropriate decorators. You must preserve the apikey authentication strategy binding and run build, lint, and targeted tests to verify behavior.

How do I update JWT or API key authentication in LoopBack 4?

Updating LoopBack 4 authentication involves modifying the custom ApiKeyAuthenticationStrategy or JWT behavior while preserving AuthenticationComponent bindings. You must also ensure OpenAPI security scheme alignment remains intact during the process.

Can I refactor BootMixin and ServiceMixin composition in LoopBack 4 startup?

You should avoid broad refactors of BootMixin, ServiceMixin, or RepositoryMixin composition in LoopBack 4. Maintain existing startup behavior with minimal, behavior-preserving changes to ensure the application boots correctly.

What is the best way to integrate a new datasource with LoopBack 4 repositories?

The best way to integrate a LoopBack 4 datasource is to wire it through the existing repository conventions while preserving RepositoryMixin composition. Apply minimal changes and verify integration using targeted tests and build commands.

Why does my OpenAPI security scheme misalign after changing LoopBack 4 authentication?

OpenAPI security misalignment in LoopBack 4 happens when authentication updates are made without adjusting the OpenAPI security scheme. You must align both the custom ApiKey strategy and OpenAPI definitions to resolve the mismatch.