About serverpod-modules
A Serverpod skill for adding reusable modules that can include server, client, and optional Flutter packages in separate namespaces. It also explains creating custom modules and referencing their types in models.
Key features
- 01Add server and client packages
- 02Optional Flutter package support
- 03Configure module nicknames
- 04Reference module types in models
- 05Create custom module packages
Use cases
- 01Integrate a reusable Serverpod module
- 02Use module types in application models
- 03Scaffold a custom module
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ serverpod/ serverpod --skill serverpod-modulesAfter installing, type/serverpod-modulesin Claude Code to confirm it loaded.
Details
From the project READMEServerpod Modules
Modules are reusable Serverpod packages with server, client, and optionally Flutter code in their own endpoint/model namespaces.
Adding a module
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.
Referencing module types in models
class: MyClass
fields:
userInfo: module:serverpod_auth_core:AuthUser
# Or with nickname:
userInfo: module:auth:AuthUser
Run serverpod generate after changes.
Creating a custom module
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.