环境变量管理器:扫描、校验、同步 .env 文件,生成安全配置模板
npx skills add https://github.com/laolaoshiren/claude-code-skills-zh --skill env-manager
当用户要求管理环境变量、.env 文件、配置同步、Secrets 检查时激活。
.env* 文件(.env / .env.local / .env.development / .env.production)process.env.XXX / os.environ['XXX'] / os.getenv('XXX')).env.example 模板(仅包含变量名和说明,不含真实值).env.schema.json(结构化校验规则)dotenv 加载配置(针对不同框架)# 应用配置
APP_NAME=my-app
APP_ENV=development # development | staging | production
APP_PORT=3000 # 服务端口 (1-65535)
APP_DEBUG=true # 调试模式
# 数据库
DB_HOST=localhost
DB_PORT=5432
DB_NAME=mydb
DB_USER= # 必填
DB_PASSWORD= # 必填,生产环境请使用 Secrets
# 第三方服务
REDIS_URL= # 必填,格式:redis://host:port
JWT_SECRET= # 必填,至少 32 位随机字符串
📋 环境变量分析报告
==================
✅ 定义且使用: 12 个
⚠️ 定义未使用: 2 个(S3_BUCKET, OLD_API_KEY)
❌ 使用未定义: 1 个(SENDGRID_API_KEY)
🔒 硬编码敏感信息: 1 处(src/auth.js:23)
建议:
1. 人工确认 S3_BUCKET 和 OLD_API_KEY 是否被 CI、部署脚本或动态代码引用,再决定是否删除
2. 在 .env 中添加 SENDGRID_API_KEY
3. 将 src/auth.js:23 的硬编码 token 迁移到环境变量
.env 已添加到 .gitignore.env.example 存在且与代码同步.env;先展示差异并取得用户确认。.env.example、Schema、日志、Issue 或聊天输出中。NEXT_PUBLIC_ 前缀的变量会暴露给客户端,后端专用变量不要加此前缀.env 中的变量必须以 REACT_APP_ 开头才会被注入VITE_ 前缀暴露变量给客户端.env 不会自动被子包读取,需要显式配置| 框架 | 客户端前缀 | 配置文件 | 加载方式 |
|------|-----------|---------|---------|
| Next.js | NEXT_PUBLIC_ | .env.local | 自动 |
| Vite | VITE_ | .env | 自动 |
| CRA | REACT_APP_ | .env | 自动 |
| Nuxt | NUXT_PUBLIC_ | .env | 自动 |
| Vue CLI | VUE_APP_ | .env | 自动 |
Expert in secure backend coding practices specializing in input validation, authentication, and API security. Use PROACTIVELY for backend security implementations or security code reviews.
This skill should be used when the user asks to "perform cloud penetration testing", "assess Azure or AWS or GCP security", "enumerate cloud resources", "exploit cloud misconfigurations", "test O365 security", "extract secrets from cloud environments", or "audit cloud infrastructure". It provides comprehensive techniques for security assessment across major cloud platforms.
You are a dependency security expert specializing in vulnerability scanning, license compliance, and supply chain security. Analyze project dependencies for known vulnerabilities, licensing issues, outdated packages, and provide actionable remediation strategies.
Comprehensive Flow Nexus platform management - authentication, sandboxes, app deployment, payments, and challenges
This skill should be used when the user asks to "escalate privileges on Linux", "find privesc vectors on Linux systems", "exploit sudo misconfigurations", "abuse SUID binaries", "exploit cron jobs for root access", "enumerate Linux systems for privilege escalation", or "gain root access from low-privilege shell". It provides comprehensive techniques for identifying and exploiting privilege escalation paths on Linux systems.
Expert malware analyst specializing in defensive malware research, threat intelligence, and incident response. Masters sandbox analysis, behavioral analysis, and malware family identification. Handles static/dynamic analysis, unpacking, and IOC extraction. Use PROACTIVELY for malware triage, threat hunting, incident response, or security research.
This skill should be used when the user asks to "use Metasploit for penetration testing", "exploit vulnerabilities with msfconsole", "create payloads with msfvenom", "perform post-exploitation", "use auxiliary modules for scanning", or "develop custom exploits". It provides comprehensive guidance for leveraging the Metasploit Framework in security assessments.
Expert in secure mobile coding practices specializing in input validation, WebView security, and mobile-specific security patterns. Use PROACTIVELY for mobile security implementations or mobile security code reviews.
Take laolaoshiren/env-manager from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.