add-env-var
Skill234 starsChanged 3 months agoMITView on GitHub
Add an environment variable to backend or frontend
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- blockscout/frontendtheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- blockscout/frontend★ 310same 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 repository29 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-aspire-depSkill
- add-background-jobSkill
- add-ci-areaSkill
- add-email-templateSkill
- add-options-classSkill
- add-permissionSkill
- add-rate-limitSkill
- address-reviewSkill
- add-testSkill
- backend-conventionsSkill
- create-issueSkill
- create-prSkill
- create-releaseSkill
- frontend-conventionsSkill
- gen-typesSkill
- infra-conventionsSkill
- init-verifySkill
- manage-file-storageSkill
- new-endpointSkill
- new-entitySkill
- new-featureSkill
- new-pageSkill
- polish-uiSkill
- review-dependabotSkill
- review-designSkill
- review-prSkill
- security-conventionsSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 0 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Add to appsettings.Development.json if it needs a dev-specific value (Aspire injects infrastructure connection strings automatically - only …
- Very specific: line 11
If it maps to an Options class: use Section:Key naming in appsettings (e.g., Authentication:Jwt:AccessTokenLifetime)
- Very specific: line 12
If it needs Aspire wiring for local dev: add via .WithEnvironment() in MyProject.AppHost/Program.cs
- Very specific: line 13
If it needs an Options class: use /add-options-class
- Very specific: line 17
Add to src/frontend/.env.example (documentation with placeholder)
- Very specific: line 18
Add to src/frontend/.env.test (valid test value for CI)
- Very specific: line 19
Add to src/frontend/src/lib/config/server.ts (server-only) or i18n.ts (client-safe)
- Very specific: line 20
Never export server config from the barrel ($lib/config/index.ts)
- Very specific: line 25
Add ARG + ENV to src/frontend/Dockerfile (before pnpm run build)
- Very specific: line 26
Add --build-arg to .github/workflows/docker.yml
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Adds an environment variable (backend or frontend).
Backend-consumed variable
- Add to
appsettings.Development.jsonif it needs a dev-specific value (Aspire injects infrastructure connection strings automatically - only add behavioral config here) - If it maps to an Options class: use
Section:Keynaming in appsettings (e.g.,Authentication:Jwt:AccessTokenLifetime) - If it needs Aspire wiring for local dev: add via
.WithEnvironment()inMyProject.AppHost/Program.cs - If it needs an Options class: use
/add-options-class
Frontend-consumed variable
- Add to
src/frontend/.env.example(documentation with placeholder) - Add to
src/frontend/.env.test(valid test value for CI) - Add to
src/frontend/src/lib/config/server.ts(server-only) ori18n.ts(client-safe) - Never export server config from the barrel (
$lib/config/index.ts)
Frontend PUBLIC_* variable (SvelteKit $env/static/public)
- Steps 1-2 above
- Add
ARG+ENVtosrc/frontend/Dockerfile(beforepnpm run build) - Add
--build-argto.github/workflows/docker.yml - Import:
import { PUBLIC_VAR } from '$env/static/public';
For secrets or keys that differ per environment (like Turnstile site keys), prefer runtime configuration via
$env/dynamic/privatewith SSR layout data instead of build-timePUBLIC_*args.
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.

