Agent skill

Add Server Env Var for User Setting

by lobehub in lobehub/lobehub

Adds a server-side environment variable that sets the default for a user setting in LobeHub, wired from the env schema through server config to the user store and docs.

Custom licenceAuto-check passedDevelopment

Install Add Server Env Var for User Setting

skills CLI
$ npx skills add lobehub/lobehub --skill add-setting-env -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lobehub/lobehub add-setting-env --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lobehub/lobehub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-setting-env .claude/skills/add-setting-env && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-setting-env
GitHub stars
83k
Token cost
~644 tokens
SKILL.md length
87 words
Files
2
Skills in repo
50
Repo updated
First seen
Licence
Custom licence

At a glance

Adds a server-side environment variable that sets the default for a user setting in LobeHub, wired from the env schema through server config to the user store and docs.

  • Works in 6 steps: Define Environment Variable → Update Type (if new domain) → Assemble Server Config (if new domain) → …
  • Letting server admins set a default value for a user setting through an env var
  • SKILL.md covers Steps and Example:…
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill walks through making a user setting configurable from the server by an environment variable. Precedence is the user's own value first, then the server environment variable, then the hardcoded default. The agent defines the variable in a domain file under `packages/env/src/`, using `createEnv` from `@t3-oss/env-core` with zod validation.

For a new domain it also updates the `GlobalServerConfig` type in `packages/types/src/serverConfig.ts`, assembles the value in `apps/server/src/globalConfig/index.ts` and merges it into the user store in `src/store/user/slices/common/action.ts`. It then adds a commented entry to `.env.example` and documents the variable in the English and Chinese self-hosting environment variable pages, with `AI_IMAGE_DEFAULT_IMAGE_NUM` as the worked example. Reusing existing types from `packages/types/src/user/settings` is preferred.

When your agent uses it

  • Letting server admins set a default value for a user setting through an env var
  • Documenting a new environment variable for self-hosting
  • Checking that a default flows from the env schema to the user store

Example prompts

  • “Add an env var that sets the default number of generated images per request for all users.”
  • “Wire a new server-side default for the chat font size and document it in both languages.”
  • “Which files do I update when adding an env var that overrides a user setting default?”

Requirements

  • The LobeHub repository

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Define Environment Variable
  2. Update Type (if new domain)
  3. Assemble Server Config (if new domain)
  4. Merge to User Store (if new domain)
  5. Update .env.example
  6. Update Documentation

What it can do on your machine

Read from SKILL.md and the folder at commit 6aaeeee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Server Env Var for User Setting loads about 644 tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 87 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~644

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 87 words (~644 tokens).

“Add server-side environment variables to configure default values for user settings.”

— opening of SKILL.md by lobehub, Custom licence
name
add-setting-env
disable-model-invocation
true
argument-hint
[setting-name]

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file in .agents/skills/add-setting-env of lobehub/lobehub.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 6aaeeee

Compare with similar skills

Add Server Env Var for User Setting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Server Env Var for User Setting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Server Env Var for User Setting this skilllobehub/lobehub83k—~644Automated safety check: PassCustom licence
Typescript SecurityHoangNguyen0403/agent-skills-standard571—~817Automated safety check: NotesMIT
Typescript Styletjx666/vscode-mcp106—~961Automated safety check: PassCustom licence
Node Backend Development Guidelinesdiet103/claude-code-infrastructure-showcase10k2 repos~2kAutomated safety check: PassMIT
Twenty Syncable Entity Typestwentyhq/twenty58k—~2.8kAutomated safety check: PassCustom licence
evlog Framework Integrationevloghq/evlog1.9k—~5kAutomated safety check: NotesMIT

Similar skills

  • Typescript Security

    HoangNguyen0403/agent-skills-standard

    Secure server-side TypeScript input, auth tokens, and injection boundaries.

    571 GitHub stars~817 tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Typescript Style

    tjx666/vscode-mcp

    TypeScript code style and repo conventions for VSCode MCP — inference vs explicit types, ESM import suffixes, zod schema contracts, async VSCode/Node APIs, JSON-safe IPC results, JSDoc for public…

    106 GitHub stars~961 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Node Backend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Sets layered architecture and coding rules for Node.js, Express and TypeScript microservices, covering routes, controllers, services, repositories, Prisma, Sentry and Zod.

    10k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • Walks through the first of six steps for adding a syncable entity to Twenty's server: metadata name, TypeORM entity, flat types and central constants.

    58k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Walks a contributor through adding a new HTTP framework integration to the evlog logging package: middleware source, build entry, exports, tests, example app and docs.

    1.9k GitHub stars~5k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Readme Generate

    Juncai22/spring-ai-agent-learning

    Generates comprehensive README.md files for Spring Boot modules based on task specification requirements

    123 GitHub stars~2.2k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from lobehub/lobehub

All 50 skills in this repo
  • Builds single-file interactive HTML prototypes rendered with the real LobeHub UI components and written as production-style React, so they can later be split into files.

    83k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Verifies a delivery end to end by driving the real product on a CLI, web, desktop or iOS Simulator surface, capturing evidence and publishing a round with the lh CLI.

    83k GitHub stars~9.7k tokensUpdated today
    Auto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.

    83k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Guides building LobeHub builtin agent tools, from the manifest and execution runtime to executors, chat UI renders and registry wiring.

    83k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Explains how LobeHub client code fetches data through services, SWR store hooks and cache keys, and when to avoid useEffect fetching or duplicated state.

    83k GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Works with

Questions about Add Server Env Var for User Setting

What does Add Server Env Var for User Setting do?

Adds a server-side environment variable that sets the default for a user setting in LobeHub, wired from the env schema through server config to the user store and docs. This skill walks through making a user setting configurable from the server by an environment variable. Precedence is the user's own value first, then the server environment variable, then the hardcoded default.

When should I use Add Server Env Var for User Setting?

Add Server Env Var for User Setting fits situations like: letting server admins set a default value for a user setting through an env var; documenting a new environment variable for self-hosting; checking that a default flows from the env schema to the user store.

How do I install Add Server Env Var for User Setting in Claude Code?

Run `npx skills add lobehub/lobehub --skill add-setting-env -a claude-code`. Or copy the skill folder (.agents/skills/add-setting-env in lobehub/lobehub) into .claude/skills/add-setting-env in your project. Claude Code loads it when a task matches its description.

How do I install Add Server Env Var for User Setting in Codex?

Run `npx skills add lobehub/lobehub --skill add-setting-env -a codex`. Or copy the skill folder (.agents/skills/add-setting-env in lobehub/lobehub) into .agents/skills/add-setting-env in your project. Codex loads it when a task matches its description.

Can I use Add Server Env Var for User Setting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lobehub/lobehub --skill add-setting-env -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-setting-env, .gemini/skills/add-setting-env, .github/skills/add-setting-env and .opencode/skills/add-setting-env in your project.

What does Add Server Env Var for User Setting need to run?

SKILL.md names no scripts, command-line tools or credentials: Add Server Env Var for User Setting is instructions for the agent only. Our summary lists: The LobeHub repository.

Does Add Server Env Var for User Setting access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Server Env Var for User Setting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Server Env Var for User Setting use?

Add Server Env Var for User Setting has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Add Server Env Var for User Setting use?

About 644 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Server Env Var for User Setting?

Skills that share tags, products or a category with Add Server Env Var for User Setting: Typescript Security (HoangNguyen0403/agent-skills-standard, 571 stars), Typescript Style (tjx666/vscode-mcp, 106 stars), Node Backend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars) and Twenty Syncable Entity Types (twentyhq/twenty, 58k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Server Env Var for User Setting?

lobehub (a GitHub organization) maintains it in lobehub/lobehub, which has 83,044 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 8, 2026.

Source: lobehub/lobehub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.