packages/serverpod/skills/serverpod-modules/SKILL.md
Create and use Serverpod modules — adding modules, generator.yaml nicknames, model references, creating custom modules. Use when working with modules or shared server/client code.
npx skillsauth add serverpod/serverpod serverpod-modulesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Modules are reusable Serverpod packages with server, client, and optionally Flutter code in their own endpoint/model namespaces.
Server: Add module server package to pubspec.yaml (e.g. serverpod_auth_idp_server: <serverpod-version>). Optionally declare in config/generator.yaml:
modules:
serverpod_auth_idp:
nickname: auth
Then dart pub get, serverpod generate. If the module adds tables and database generation is enabled, follow ../serverpod-migrations/SKILL.md.
Client: Add module client package (e.g. serverpod_auth_idp_client: <serverpod-version>).
Flutter: Add module Flutter package if provided (e.g. serverpod_auth_idp_flutter: <serverpod-version>).
Keep Serverpod and module versions aligned.
class: MyClass
fields:
userInfo: module:serverpod_auth_core:AuthUser
# Or with nickname:
userInfo: module:auth:AuthUser
Run serverpod generate after changes.
serverpod create --template module my_module
Creates server + client packages. Add Flutter package if needed: flutter create --template package my_module_flutter. Set type: module in config/generator.yaml. Prefix table names (e.g. my_module_orders) to avoid clashes.
development
Build highly distinctive, production-ready Flutter interfaces with exceptional design fidelity. Include this skill whenever a user requests Flutter widgets, screens, or full apps.
testing
Serverpod Authentication — Signing in users, verify if they are authenticated, assinging scopes (e.g., admin). Use when adding features that require the user to be signed in.
development
Serverpod web server (Relic) — REST APIs, webhooks, middleware, static files, server-rendered HTML, SPAs, Flutter web. Use when adding HTTP routes, serving web pages or web apps, intercepting requests, or working with the Relic web server.
tools
Serverpod overview — what it is, project structure, how to work with. Always use at least once when working with projects that use Serverpod.