Skip to content

Commit f1c6d07

Browse files
iamzifeiclaude
andcommitted
feat: add .env.example rules to org standards
- Every repo must have .env.example listing all required env vars - Rename .env.sample to .env.example if it exists - Must update .env.example when adding/removing env vars in code - CI build workflow uses .env.example for dummy vars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6fabdc2 commit f1c6d07

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

sync/.claude/org-rules.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,31 @@ Never use these words/phrases that signal low-quality AI-generated content:
142142

143143
---
144144

145+
## Environment Variables
146+
147+
- Every repo MUST have a `.env.example` at the root listing ALL required environment
148+
variables with placeholder values. This file is used by CI to provide dummy env vars
149+
during builds.
150+
- If a `.env.sample` file exists, **rename it to `.env.example`** and use that instead.
151+
Do not keep both files.
152+
- When adding, removing, or renaming an env var in code, **update `.env.example`** in
153+
the same commit. Do not leave `.env.example` out of sync with the actual code.
154+
- Format: one `KEY=placeholder_value` per line. Use comments to group related vars:
155+
```
156+
# Supabase
157+
SUPABASE_URL=https://your-project.supabase.co
158+
SUPABASE_ANON_KEY=your-anon-key
159+
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
160+
161+
# Stripe
162+
STRIPE_SECRET_KEY=sk_test_xxx
163+
```
164+
- Never put real secret values in `.env.example` — only descriptive placeholders.
165+
- `.env.example` MUST be committed to git. `.env`, `.env.local`, and `.env.production`
166+
MUST be in `.gitignore` and never committed.
167+
168+
---
169+
145170
## Security Requirements
146171

147172
- **No new vulnerabilities**: `npm audit` / `pnpm audit` must not introduce new

0 commit comments

Comments
 (0)