agentleFS
lightpointventureslightpointventures/claude-code-starter/skills/env/SKILL.md

env

Skill36 starsChanged 8 months agoMITView on GitHub

当用户想管理环境变量、创建 .env 文件、配置 API Key 时使用 — 扫描项目生成 .env 模板和文档

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

配置环境变量

帮用户规范地管理项目的环境变量,防止密钥泄露。

步骤

1. 扫描项目

自动扫描项目中所有代码文件,找出使用的环境变量:

  • Python: os.environ、os.getenv
  • Node.js: process.env
  • 其他: .env 文件引用

列出所有发现的环境变量。

2. 生成 .env.example

创建 .env.example 文件,包含所有环境变量的模板:

# 数据库
DATABASE_URL=postgresql://user:password@localhost:5432/mydb

# API 密钥
STRIPE_SECRET_KEY=sk_test_xxx
STRIPE_PUBLISHABLE_KEY=pk_test_xxx

# 邮件
RESEND_API_KEY=re_xxx

每个变量都有注释说明用途,值使用示例格式(不是真实密钥)。

3. 检查 .gitignore

确保 .gitignore 包含:

  • .env
  • .env.local
  • .env.production

如果不包含,自动添加。

4. 生成说明

在终端输出环境变量列表和获取方式:

项目需要以下环境变量: (列出每个变量、用途、在哪里获取)

已生成 .env.example 模板。复制为 .env 并填入你的值: cp .env.example .env

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.