ln-733-env-configurator
Configures environment variables and secrets protection
- License 许可
- MIT
- 最近更新
- 2026-05-02
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- ln-733-env-configurator
- license
- MIT
- description
- Configures environment variables and secrets protection
02 资源文件 16
- 参考文档references/catalog-and-sprint-scope.md1.4 KB
- 参考文档references/clif-guardrails.md1.7 KB
- 参考文档references/compliance-report.md5.2 KB
- 参考文档references/env_development.template1.6 KB
- 参考文档references/env_example.template3.8 KB
- 参考文档references/env_production.template1.5 KB
- 参考文档references/gitignore_secrets.template2.0 KB
- 参考文档references/phi-environment.md7.4 KB
- 参考文档references/r-ci-patterns.md6.6 KB
- 参考文档references/sap-tracking.md8.7 KB
- 参考文档references/scaffolding-templates.md15.4 KB
- 参考文档references/shipping-workflow.md9.1 KB
- 参考文档references/subagent-execution.md5.1 KB
- 参考文档references/testing-checks.md2.5 KB
- 参考文档references/tracker-defer.md13.3 KB
- 脚本scripts/schema-peek.py24.0 KB
03 SKILL.md 正文
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.
ln-733-env-configurator
Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-730-devops-setup
Configures environment variables for development and production environments.
Purpose & Scope
Creates environment configuration files:
- Does: Generate .env files, update .gitignore for secrets protection
- Does NOT: Store secrets, manage external secrets managers, configure CI/CD secrets
Inputs
| 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 |
Outputs
| 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) |
Secrets protection | gitignore_secrets.template |
Workflow
Phase 1: Environment Discovery
Scan project for existing environment usage:
- Check for existing .env files
- Search code for
process.env,os.environ,Configuration[] - Identify which variables are secrets vs configuration
Output: List of required environment variables with types
Phase 2: Variable Classification
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 |
Phase 3: Template Generation
Generate environment files from templates:
- Apply variable substitution
- Include all discovered variables
- Add comments for undocumented variables
Phase 4: Gitignore Update
Append secrets protection to .gitignore:
- Read existing .gitignore (if exists)
- Check if secrets patterns already present
- Append missing patterns from template
- Preserve existing entries
Generated File Structure
.env.example
Documented template with all variables:
- Section headers (Database, Backend, Frontend, Security, External)
- Descriptive comments for each variable
- Safe placeholder values (never real secrets)
- Optional variables commented out
.env.development
Ready-to-use development configuration:
- Pre-filled values that work with docker-compose
- Development-only secrets (clearly marked)
- Debug-level logging enabled
.env.production
Production placeholder file:
${VARIABLE}syntax for deployment substitution- Comments indicating required secrets
- Production-appropriate defaults (Warning log level)
Security Best Practices
| 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 |
Security Notes
Generated files include these security reminders:
- Never commit real secrets - .gitignore prevents accidental commits
- Use secrets manager - GitHub Secrets, AWS Secrets Manager for production
- Rotate secrets regularly - Especially JWT secrets
- Strong JWT secrets - Minimum 256 bits (32 bytes)
- Restrict CORS - Only allow necessary origins in production
Quality Criteria
Generated files must:
- [ ] .env.example contains all required variables
- [ ] No real secrets or passwords in any file
- [ ] .gitignore updated with secrets patterns
- [ ] .env.development works with docker-compose
- [ ] .env.production uses placeholder syntax
Critical Notes
- Template-based: Use templates from references/. Do NOT hardcode file contents.
- Idempotent: Check file existence. Append to .gitignore, don't overwrite.
- No Real Secrets: Never generate files with actual passwords or API keys.
- Development Safety: Development defaults should work out-of-box with docker-compose.
Reference Files
| 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
04 同仓库更多 Skills
zarr-python
Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.
zabbix
Zabbix monitoring system automation via API and Python. Use when: (1) Managing hosts, templates, items, triggers, or host groups, (2) Automating monitoring configuration, (3) Sending data via Zabbix trapper/sender, (4) Querying historical data or events, (5) Bulk operations on Zabbix objects, (6) Maintenance window management, (7) User/permission management
x-twitter-growth
X/Twitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X/Twitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.
what-if-oracle
Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like "what if...", "what would happen if...", "what are the possibilities", "explore scenarios", "scenario analysis", "possibility space", "what could go wrong", "best case / worst case", "risk analysis", "contingency planning", "strategic options", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
venue-templates
Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.