environment-variables
Skill311 starsChanged 9 days agoApache-2.0View on GitHub
Environment variable management patterns. CRITICAL use when adding new environment variables (secrets, API keys, config), debugging "X not defined" or missing env var errors, tests passing locally but failing in CI, Turborepo not passing env vars to tasks, or troubleshooting deployment configuration errors.
- Reads credentials
4 other projects use a version of this; 2 new projects in the last 4 weeks, against 0 the 4 before.
Adopted by
Surging: 2 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- obsessiondb/rudelword for word, first seen Nov 30, 2026
- evrendom/opalineword for word, first seen Nov 22, 2026
- elie222/inbox-zerotheir own version, first seen Oct 8, 2026
- HamzaSheikh768/Agents-Skills-Laptheir own version, first seen Feb 4, 2026
Other versions4 projects use a version of this.
Word for word · 2
- evrendom/opaline★ 311100% same
- obsessiondb/rudel★ 311100% same
Edited · 0
None found.
Wrote their own version · 2
- elie222/inbox-zero★ 13ksame name
- HamzaSheikh768/Agents-Skills-Lap★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/skills/clickhouse-architecture-advisor/AGENTS.mdAGENTS.md
- .claude/skills/clickhouse-best-practices/AGENTS.mdAGENTS.md
- api-testingSkill
- clickhouse-architecture-advisorSkill
- clickhouse-best-practicesSkill
- clickhouse-js-node-codingSkill
- clickhouse-js-node-troubleshootingSkill
- clickhouse-querySkill
- code-architectureSkill
- library-docsSkill
- opaline-designSkill
- pr-creationSkill
- testing-bunSkill
- typescript-standardsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 13
Never hardcode secrets or commit real values.
- Distinctive: line 20
When adding a new environment variable:
- Very specific: line 24
Add the variable with a safe placeholder and description to .env.example.
- Very specific: line 47
CRITICAL: Add to package-specific turbo.json, NOT root.
- Distinctive: line 78
Hosted deployments: ask the core team to verify the private secrets manager and deployment mapping
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Environment Variables Management
Source of Truth
.env.example documents the variables supported by the public repo. Contributors
put local values in an untracked .env file or export them in the current shell.
Never hardcode secrets or commit real values.
The core team injects hosted-service values through a private secrets manager. Hosted-service configuration and operations are intentionally outside this repo.
Four Integration Points
When adding a new environment variable:
1. Contributor Environment
Add the variable with a safe placeholder and description to .env.example.
Contributors set the real value in .env or their shell.
2. GitHub CI Workflow
Map from GitHub Secrets in .github/workflows/ci.yml:
jobs:
test:
env:
CLICKHOUSE_URL: ${{ secrets.CLICKHOUSE_URL }}
API_KEY: ${{ secrets.API_KEY }}Secrets must exist in repository settings → Secrets → Actions first.
3. Frontend VITE_* Variables
Frontend variables prefixed with VITE_ are baked into the UI by Vite when apps/desktop/ui is built (bun run build:selfhost builds it for the app). Set them in the environment of that build, and declare their types in apps/desktop/ui/src/vite-env.d.ts.
4. Package-Specific turbo.json
CRITICAL: Add to package-specific turbo.json, NOT root.
{
"extends": ["//"],
"tasks": {
"test": {
"passThroughEnv": ["CLICKHOUSE_URL", "API_KEY"]
}
}
}Checklist: Adding New Environment Variable
- Add a safe placeholder and description to
.env.example - Set the local value in an untracked
.envfile or the current shell - Add to GitHub Secrets (if used in CI)
- Add to
.github/workflows/ci.yml(if used in CI) - If
VITE_*: declare it inapps/desktop/ui/src/vite-env.d.ts - Add to package-specific
turbo.json→passThroughEnv - Validate tests pass locally and in CI
Debugging Missing Env Vars
Check in order:
- Local environment: confirm the variable is exported or present in the
untracked
.env - Package turbo.json:
cat packages/your-package/turbo.json | grep -A 10 passThroughEnv - GitHub Secrets: Repository settings → Secrets → Actions
- Hosted deployments: ask the core team to verify the private secrets manager and deployment mapping
Common Mistakes
❌ Adding to root turbo.json instead of package-specific
❌ Reading a VITE_* var at runtime: it is fixed when the UI is built
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
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.

