Agent skill · software engineering · lobehub

add-setting-env

Add server-side environment variables that control default values for user settings.

Why this skill is useful

Adds specific TypeScript patterns and environment variable configurations that the AI wouldn't reliably generate on its own.

What it needs

About 1k tokens when loaded. Last updated 2026-08-07. 81,352 stars on the source repository.

What this skill does

Adding Environment Variable for User Settings Add server-side environment variables to configure default values for user settings. Priority: User Custom > Server Env Var > Hardcoded Default Steps 1. Define Environment Variable Create packages/env/src/<domain>.ts (import path stays @/envs/<domain> — tsconfig maps to packages/env/src/ first): 2. Update Type (if new domain) Add to packages/types/src/serverConfig.ts: Prefer reusing existing types from packages/types/src/user/settings. 3. Assemble Server Config (if new domain) In apps/server/src/globalConfig/index.ts: 4. Merge to User Store (if new domain) In src/store/user/slices/common/action.ts: 5. Update .env.example 6. Update Documentation docs/self-hosting/environment-variables/basic.mdx (EN) docs/self-hosting/environment-variables/basic.zh-CN.mdx (CN) Example: AI\IMAGE\DEFAULT\IMAGE\NUM

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills lobehub/add-setting-env

View the source on GitHub

Browse the @skills marketplace