
Description
add-setting-env is an agent skill from the LobeHub repository for adding server-side environment variables that set the default values of user settings. It explains the priority order the app uses: a value the user sets in their own settings wins, then a server environment variable, then the hardcoded default. The skill then gives the steps for adding a variable. The first step is to define it in packages/env/src/<domain>.ts using createEnv from @t3-oss/env-core and a zod schema, noting that the import path stays @/envs/<domain> because the tsconfig maps packages/env/src first. It is for contributors who want a server-side default to be configurable without editing code for each user. The skill is a set of conventions for this one kind of change. It passes Gen Agent Trust Hub, Socket and Snyk on skills.sh. Install it with npx skills add https://github.com/lobehub/lobehub --skill add-setting-env.…
Highlights
- Adds server environment variables for user setting defaults
- Explains the priority: user value, then server variable, then default
- Defines variables with createEnv and zod
- Keeps the @/envs/<domain> import path working
Ratings & Reviews
No ratings yet
Be the first to rate add-setting-env.
People also visit
add-setting-env FAQ
What do environment variables control here?
The default values of user settings, which a user can still override in their own settings.
What is the priority order?
A user's own custom setting first, then the server environment variable, then the hardcoded default.
Where are the variables defined?
In packages/env/src/<domain>.ts, using createEnv from @t3-oss/env-core and a zod schema.
How do I install it?
Run npx skills add https://github.com/lobehub/lobehub --skill add-setting-env.
Which security audits does it have?
On skills.sh, Gen Agent Trust Hub, Socket and Snyk all pass.
What are the best add-setting-env alternatives?
Popular alternatives to add-setting-env include add-provider-doc, hotkey and debug. See all add-setting-env alternatives







