本文へスキップ
Kitbay
スキル

add-setting-env

NOASSERTION2026年11月11日 更新84,974GitHubスター

A maintainer skill in the LobeHub repository, run only when called, for adding a server-side environment variable that sets the default for a user setting.

スキルの内容

A maintainer skill in the LobeHub repository, run only when called, for adding a server-side environment variable that sets the default for a user setting. A user's own choice still wins, then the server variable, then the built-in default. The steps define the variable with a Zod schema in the env package, and for a new settings domain also extend the server config type, map the variable in the global server config and merge it into the user store. The variable is then documented in .env.example and in the English and Chinese self-hosting docs. A worked example adds a variable for the default number of generated images, allowed from 1 to 20.

できること

  • Define a typed server environment variable
  • Feed it into default user settings
  • Document it in .env.example and self-hosting docs