users-service

Community

Add secure Users API endpoints fast.

Authormattbutlerengineering
Version1.0.0
Installs0

System Documentation

What problem does it solve?

The users-service skill helps you safely extend the Users Service by adding Fastify routes, wiring authentication, implementing Prisma-backed business logic, and covering changes with tests and API docs.

Core Features & Use Cases

  • Route scaffolding for Fastify: Create new REST endpoints in services/users/src/routes/users.ts with consistent request/response typing and OpenAPI schema metadata.
  • Auth0-protected endpoints: Add preHandler: requireAuth and declare security: [{ bearerAuth: [] }] so endpoints correctly require JWTs and follow the repo’s error behavior.
  • Service-layer implementation with Prisma: Add business logic in services/users/src/services/user.ts, using mapPrismaUser() for consistent domain mapping and types.
  • Testing patterns for routes: Follow Vitest patterns that mock the service layer and validate responses via app.inject, including 401 cases for missing/invalid auth.

Quick Start

Ask the skill to add a protected endpoint in the Users Service that returns the current authenticated user profile, including the route code, the corresponding service method, the OpenAPI schema update, and the Vitest coverage for the happy path and the 401 case.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: users-service
Download link: https://github.com/mattbutlerengineering/mattbutlerengineering/archive/main.zip#users-service

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.