ln-733-env-configurator by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-733-env-configurator路径说明: 文件路径(
shared/、references/、../ln-*)是相对于技能仓库根目录的。如果在当前工作目录下未找到,请定位此 SKILL.md 文件所在的目录,然后向上一级找到仓库根目录。如果缺少shared/目录,请通过 WebFetch 从https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}获取文件。
类型: L3 工作者 类别: 7XX 项目引导
为开发和生产环境配置环境变量。
创建环境配置文件:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 输入 | 来源 | 描述 |
|---|
| 项目名称 | 目录名称 | 用于数据库/服务命名 |
| 后端端口 | 取决于技术栈 | 5000 (.NET), 8000 (Python) |
| 前端端口 | 默认值 | 3000 |
| 数据库端口 | 默认值 | 5432 |
| 检测到的变量 | 代码分析 | 在代码中找到的环境变量 |
| 文件 | 用途 | 模板 |
|---|---|---|
.env.example | 带文档说明的模板 | env_example.template |
.env.development | 本地开发默认值 | env_development.template |
.env.production | 生产环境占位符 | env_production.template |
.gitignore (追加) | 密钥保护 | gitignore_secrets.template |
扫描项目以查找现有的环境变量使用情况:
process.env、os.environ、Configuration[]输出:所需环境变量及其类型的列表
对发现的变量进行分类:
| 类别 | 示例 | 处理方式 |
|---|---|---|
| 数据库 | DATABASE_URL, POSTGRES_* | 使用项目名称自动生成 |
| API 配置 | API_PORT, LOG_LEVEL | 使用检测到的值或默认值 |
| 安全 | JWT_SECRET, API_KEY | 带警告的占位符 |
| 外部 | REDIS_URL, SMTP_* | 注释掉,作为可选项 |
根据模板生成环境文件:
将密钥保护规则追加到 .gitignore:
包含所有变量的带文档说明的模板:
可直接使用的开发配置:
生产环境占位符文件:
${VARIABLE} 语法供部署时替换| 实践 | 实现方式 |
|---|---|
| 不包含真实密钥 | 模板中仅使用占位符值 |
| Gitignore 保护 | 除 .env.example 外,所有 .env 文件都忽略 |
| 开发环境警告 | 将开发密钥标记为不安全 |
| 生产环境指导 | 注释说明密钥管理器的使用 |
| 密钥轮换提醒 | 关于定期轮换密钥的说明 |
生成的文件包含以下安全提醒:
生成的文件必须满足:
| 文件 | 用途 |
|---|---|
| env_example.template | 带文档说明的 .env 模板 |
| env_development.template | 开发环境默认值 |
| env_production.template | 生产环境占位符 |
| gitignore_secrets.template | .gitignore 追加内容 |
版本: 1.1.0 最后更新: 2026-01-10
每周安装次数
151
仓库
GitHub 星标数
245
首次出现
2026年1月24日
安全审计
安装于
claude-code138
opencode135
gemini-cli134
codex134
cursor134
github-copilot128
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Type: L3 Worker Category: 7XX Project Bootstrap
Configures environment variables for development and production environments.
Creates environment configuration files:
| Input | Source | Description |
|---|---|---|
| Project Name | Directory name | Used for database/service naming |
| Backend Port | Stack-dependent | 5000 (.NET), 8000 (Python) |
| Frontend Port | Default | 3000 |
| Database Port | Default | 5432 |
| Detected Vars | Code analysis | Environment variables found in code |
| File | Purpose | Template |
|---|---|---|
.env.example | Documented template | env_example.template |
.env.development | Local development defaults | env_development.template |
.env.production | Production placeholders | env_production.template |
.gitignore (append) |
Scan project for existing environment usage:
process.env, os.environ, Configuration[]Output : List of required environment variables with types
Classify discovered variables:
| Category | Examples | Treatment |
|---|---|---|
| Database | DATABASE_URL, POSTGRES_* | Auto-generate with project name |
| API Config | API_PORT, LOG_LEVEL | Use detected or defaults |
| Security | JWT_SECRET, API_KEY | Placeholder with warning |
| External | REDIS_URL, SMTP_* | Comment out as optional |
Generate environment files from templates:
Append secrets protection to .gitignore:
Documented template with all variables:
Ready-to-use development configuration:
Production placeholder file:
${VARIABLE} syntax for deployment substitution| Practice | Implementation |
|---|---|
| No real secrets | Placeholder values only in templates |
| Gitignore protection | All .env files except .env.example |
| Development warnings | Mark dev secrets as insecure |
| Production guidance | Comments about secrets manager usage |
| Key rotation reminder | Note about regular secret rotation |
Generated files include these security reminders:
Generated files must:
| File | Purpose |
|---|---|
| env_example.template | Documented .env template |
| env_development.template | Development defaults |
| env_production.template | Production placeholders |
| gitignore_secrets.template | .gitignore additions |
Version: 1.1.0 Last Updated: 2026-01-10
Weekly Installs
151
Repository
GitHub Stars
245
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code138
opencode135
gemini-cli134
codex134
cursor134
github-copilot128
Azure RBAC 权限管理工具:查找最小角色、创建自定义角色与自动化分配
131,500 周安装
| Secrets protection |
| gitignore_secrets.template |