Skip to content
Back to skills

Config

ASecurity

Use when adding an environment variable, a config property, an environment file or a utility-service URL, or when a test, fixture or helper needs APP_URL, API_URL, APP_EMAIL, APP_PASSWORD or UTILITY_URL. Not for endpoint paths and routes (see `enums`) or the `!` versus `??` typing of a read (see `type-safety`).

  • 312 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 22, 2026
testingtypescriptshellapi

Works with

  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add idavidov13/agentic-playwright --skill config --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Config?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Config
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/idavidov13-config/badge)](https://www.skillsdirectory.com/skills/idavidov13-config)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: config
description: Use when adding an environment variable, a config property, an environment file or a utility-service URL, or when a test, fixture or helper needs APP_URL, API_URL, APP_EMAIL, APP_PASSWORD or UTILITY_URL. Not for endpoint paths and routes (see `enums`) or the `!` versus `??` typing of a read (see `type-safety`).
---

# Configuration

## Critical

- URLs, credentials and other environment-driven values come from `process.env.*`, backed by `env/.env.${ENVIRONMENT}` (default `env/.env.dev`), never from a literal in code.

    ```typescript
    // CORRECT
    baseUrl: process.env.API_URL,
    // WRONG
    baseUrl: 'https://api.example.com',
    ```

- Endpoint paths, routes and storage-state paths are enums (`enums`), never config properties or env vars.
- Every env var the scaffold reads is declared in `env/.env.example` with a safe placeholder (no real domain, token or password); the one exception is `ACCESS_TOKEN`, minted at runtime by the auth setup (`helpers`).
- A config property exists only for a URL or infrastructure setting worth a documented surface: app values in `config/app.ts`, utility services in `config/util/util.ts`, each with a JSDoc line naming its env var; credentials stay env-only.
- Only `env/.env.example` is tracked; a real env file is never committed.
- `ENVIRONMENT` and `CI` are shell variables, never written to an env file.

## Procedure

1. Classify the value: URL or infrastructure setting → env var (plus a config property); credential → env var only; path or message → `enums`; timeout, retries, workers → `playwright.config.ts`.
2. Add the key to `env/.env.example` under its comment group, then to the local `env/.env.<name>` file.
3. For a URL or infrastructure setting, add the property to `config/app.ts` or `config/util/util.ts` with its JSDoc line.
4. Read it where it is used, `!` or `?? fallback` per `type-safety`.
5. Run with `ENVIRONMENT=<name> npx playwright test <file>`; a missing env file loads nothing and leaves every value `undefined`, so confirm the value before blaming the test.

## References

- None. The live instances are `env/.env.example`, `config/app.ts` (`appConfig`), `config/util/util.ts` (`utilityConfig`) and the `dotenv` block at the top of `playwright.config.ts`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.