add-setting-env

Configure server-side environment variables for default user settings across domains.

30|10|Updated Aug 5, 2024
One-click install
npx skills add https://github.com/find-xposed-magisk/lobe-chat --skill add-setting-env-find-xposed-magisk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-setting-env
Source: https://github.com/find-xposed-magisk/lobe-chat/tree/main/.agents/skills/add-setting-env
Command: npx skills add https://github.com/find-xposed-magisk/lobe-chat --skill add-setting-env-find-xposed-magisk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps developers configure server-side environment variables that control default user settings, ensuring consistent behavior across deployments.

Core Features & Use Cases

  • Define environment variables for user settings across domains.
  • Type-safely expose config via TypeScript helpers and merge with user stores.
  • Provide a repeatable pattern for updating docs and .env.example as domains evolve.

Quick Start

Create an env module for a domain under src/envs and wire it into the server global config to apply default user settings.

Frequently Asked Questions about add-setting-env

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set default user settings using environment variables in a TypeScript backend?

You can configure default user settings by creating env modules under src/envs and wiring them into the global server config. This pattern ensures type-safe environment variable exposure and consistent merging of defaults into user stores across deployments.

What is the best way to type-safely wire environment variables into a server config?

Type-safe wiring of environment variables is achieved by creating TypeScript helper modules in src/envs that parse and validate configuration values. These modules integrate with the global server config to enforce type safety before merging defaults into user stores.

How do I merge environment variable defaults into existing user stores?

Merging environment variable defaults into user stores involves wiring src/envs modules into the backend-to-frontend data flow. This applies server-side defaults across domain-specific configurations, ensuring consistent behavior without overwriting existing user preferences.

Do I need to update .env.example when adding new domain-specific configurations?

Updating .env.example is required when adding new domain-specific configurations. This Skill enforces a repeatable pattern of documenting environment variables in .env.example as domains evolve, ensuring deployment configurations remain transparent and consistent.

Can I apply server-side environment variables across multiple different configuration domains?

Server-side environment variables can be applied across multiple configuration domains by creating individual src/envs modules for each domain. This allows backend-to-frontend data flow to handle env var creation and type-safe wiring universally across the application.