agentsclimarketplace

Env validation

Skill stevekinney/lesson-plan-adapter/.claude/skills/env-validation

Install
npx -y skills add stevekinney/lesson-plan-adapter --skill env-validation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.5 KB, as published. Nobody here has run it

Skill: Environment Variable Validation

Patterns for managing environment variables with @t3-oss/env-core.

Per-Package Ownership

Each package owns its environment variables in its own src/env.ts:

PackageVariables
packages/databaseDATABASE_URL, DATABASE_URL_UNPOOLED
packages/mcpMCP_TOKEN_TTL_SECONDS
applications/webBETTER_AUTH_URL, BETTER_AUTH_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET

Adding a New Variable

  1. Determine which package owns the variable
  2. Add to that package's src/env.ts:
    server: {
      MY_NEW_VAR: z.string().min(1),
    },
    runtimeEnv: {
      MY_NEW_VAR: process.env.MY_NEW_VAR,
    },
    
  3. Add to root .env.example with a comment
  4. Add to .env.local for local development
  5. Set on Railway: railway variable set MY_NEW_VAR=value
  6. If needed in CI, add as a GitHub secret

Rules

  • Never read process.env directly — always go through env.ts
  • Never use SvelteKit's $env/static/private or $env/dynamic/private
  • Always set emptyStringAsUndefined: true
  • Use skipValidation: process.env.SKIP_ENV_VALIDATION === 'true' for CI
  • Client variables must be prefixed with PUBLIC_

Keep looking

Skills are one crate of 608,475. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.