config
Skill222 starsChanged 4 months agoMITView on GitHub
Configuration and environment variable conventions for the Playwright scaffold — env file layout (env/.env.*), dotenv loading via playwright.config.ts and the ENVIRONMENT variable, config objects in config/app.ts and config/util/util.ts, and the rules for adding new env-driven values. Use when adding a new environment variable, a new config property, a new environment file, a new utility-service URL, or when a test/fixture needs to consume APP_URL / API_URL / APP_EMAIL / APP_PASSWORD / UTILITY_URL. This skill owns URLs, credentials, and env-driven settings — for endpoint paths and route constants use the enums skill, and for process.env.* typing (non-null assertion vs fallback) use the type-safety skill.
- Reads credentials
15 other projects use a version of this.
Adopted by
Most recently taken up by
- sachingulati/claude-statuslinetheir own version, first seen Sep 30, 2026
- patforna/auto-tasktheir own version, first seen Sep 4, 2026
- tmck-code/yet-another-statuslinetheir own version, first seen Jul 30, 2026
- dungnotnull/black-garlic-fermentation-optimization-agent-skilltheir own version, first seen Jul 30, 2026
- dungnotnull/standalone-solar-deep-station-agent-skilltheir own version, first seen Jul 30, 2026
- ruali-dev/Riven-Analysttheir own version, first seen Jul 22, 2026
Used with
Projects with it also use uninstall, status and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkilluninstall
Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.
Also in 3 projects that use this
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 4 projects that use this
VercelSkillsetup
Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- tmck-code/yet-another-statusline★ 242same name
- genkovich/sdd★ 170same name
- patforna/auto-task★ 10same name
- ThisisYoYoDev/claude-rag★ 9same name
- JeremieSamson/green-code★ 7same name
- dungnotnull/black-garlic-fermentation-optimization-agent-skill★ 5same name
- dungnotnull/standalone-solar-deep-station-agent-skill★ 5same name
- Bangs00/claude-media-control★ 4same name
- ruali-dev/Riven-Analyst★ 3same name
- geronimo-iia/llm-wiki-skills★ 2same name
5 more not listed
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 repository37 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/rules.mdcCursor rule
- ai-native-workflowSkill
- api-testingSkill
- common-tasksSkill
- configSkill
- data-strategySkill
- debuggingSkill
- enumsSkill
- fixturesSkill
- helpersSkill
- page-objectsSkill
- playwright-cliSkill
- pr-reviewerSkill
- refactor-valuesSkill
- selectorsSkill
- skill-creatorSkill
- test-standardsSkill
- type-safetySkill
- ai-native-workflowSkill
- api-testingSkill
- common-tasksSkill
- data-strategySkill
- debuggingSkill
- enumsSkill
- fixturesSkill
- helpersSkill
- page-objectsSkill
- playwright-cliSkill
- pr-reviewerSkill
- refactor-valuesSkill
- selectorsSkill
- skill-creatorSkill
- test-standardsSkill
- type-safetySkill
- skill-creatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 6 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
7
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
- Very specific: line 13
ALWAYS: add every new env variable to env/.env.example with a safe placeholder — no real secrets, no production URLs.
- Distinctive: line 14
ALWAYS: add a JSDoc comment on every config property describing the value and the backing env var.
- Very specific: line 15
ALWAYS: keep app-facing URLs/settings in config/app.ts and utility/third-party services in config/util/util.ts.
- Very specific: line 16
NEVER: commit env/.env.dev, env/.env.staging, or any other real env file containing credentials.
- Very specific: line 41
Default environment is dev (file env/.env.dev).
- Distinctive: line 48
Use this decision table before adding anything:
- Distinctive: line 60
If the value fits none of the rows above, stop and ask — do not invent a new config file.
- Distinctive: line 64
Every env var the scaffold relies on must appear in the tracked template with a safe placeholder:
- Distinctive: line 76
No real domains, no real tokens, no real passwords.
- Very specific: line 84
Not every env var gets a config-object slot.
- Distinctive: line 118
Every property requires a JSDoc comment naming the backing env var.
- Very specific: line 151
Create env/.env.staging locally (untracked) with the real staging URLs/credentials, using the same keys as env/.env.example.
- Very specific: line 152
Run ENVIRONMENT=staging npx playwright test to verify the file loads.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Configuration
Critical
- NEVER hardcode URLs, tokens, emails, or passwords anywhere in the scaffold. The only source of truth for env-driven values is
process.env.*, backed byenv/.env.${environment}. - NEVER hardcode endpoint paths or route strings in
config/. Paths belong inenums/{area}/*(see theenumsskill). - ALWAYS add every new env variable to
env/.env.examplewith a safe placeholder — no real secrets, no production URLs. - ALWAYS add a JSDoc comment on every config property describing the value and the backing env var.
- ALWAYS keep app-facing URLs/settings in
config/app.tsand utility/third-party services inconfig/util/util.ts. Do not create ad-hoc config files elsewhere. - NEVER commit
env/.env.dev,env/.env.staging, or any other real env file containing credentials. Onlyenv/.env.exampleis tracked.
File Locations
| Type | Directory | Purpose |
| App config | config/app.ts | URLs and settings for the main application |
| Utility config | config/util/util.ts | Utility / third-party service configuration |
| Env template | env/.env.example | Tracked template — safe placeholders only |
| Env (active) | env/.env.${ENVIRONMENT} | Real values, selected at runtime (.env.dev etc.) — untracked |
Instructions
Phase 1: Understand how env files are loaded
playwright.config.ts loads env values via dotenv at startup:
const environment = process.env.ENVIRONMENT ?? 'dev';
const environmentPath = `./env/.env.${environment}`;
dotenv.config({ path: environmentPath });Consequences:
- Default environment is
dev(fileenv/.env.dev). - Override with a shell variable:
ENVIRONMENT=staging npx playwright test. - The selected file must exist — missing files silently load nothing and every
process.env.*becomesundefined. ENVIRONMENTitself is set at the shell level; it is not declared in any.envfile.
Phase 2: Decide where the new value belongs
Use this decision table before adding anything:
| Value kind | Home |
| URL of the main app under test | env var + config/app.ts (appConfig.appUrl, apiUrl) |
| URL of a utility / third-party service | env var + config/util/util.ts (utilityConfig.*) |
| Credential (email, password, API key, token seed) | env var only — do not expose through a config object |
Endpoint path (e.g. /api/users) or route (e.g. /login) | enums/{area}/* — not config/ and not an env var |
| Storage-state file path | enums/{area}/* (e.g. StorageStatePaths) — not config/ |
| Timeout / retry / workers tuning | playwright.config.ts — not config/ unless reused outside Playwright |
Runtime selector (ENVIRONMENT, CI) | Shell-level env var only — not .env.example |
If the value fits none of the rows above, stop and ask — do not invent a new config file.
Phase 3: Add the env var to env/.env.example
Every env var the scaffold relies on must appear in the tracked template with a safe placeholder:
APP_URL=https://your-app-url.com
API_URL=https://your-api-url.com
APP_EMAIL=your-email@example.com
APP_PASSWORD=your-secure-password
UTILITY_URL=https://your-utility-service.comRules for the placeholder:
- No real domains, no real tokens, no real passwords.
- Same key name as the eventual
process.env.*lookup (exact case). - Group related variables under a short comment header (see existing groupings).
Then add the real value to your active env file (env/.env.dev or similar) — this file is untracked.
Phase 4: Add the config property (only if warranted) with JSDoc
Not every env var gets a config-object slot. Credentials (APP_EMAIL, APP_PASSWORD, tokens) stay env-only. URLs and infra settings that the scaffold wants to document do go into a config object.
config/app.ts — app-facing URLs and settings:
/**
* Application configuration object.
* Contains URL configuration for the main application.
*
* For route paths and API endpoints, use enums from `enums/app/app.ts`.
*/
export const appConfig = {
/** Frontend application URL loaded from APP_URL env variable */
appUrl: process.env.APP_URL,
/** Backend API URL loaded from API_URL env variable */
apiUrl: process.env.API_URL,
};config/util/util.ts — utility / third-party services:
/**
* Utility service configuration object.
* Contains URL configuration for utility/helper services.
*
* For API endpoints, use enums from `enums/` folder.
*/
export const utilityConfig = {
/** Utility service base URL */
baseUrl: process.env.UTILITY_URL,
};Every property requires a JSDoc comment naming the backing env var.
Phase 5: Consume the value from tests, fixtures, and helpers
Two equally valid access patterns exist in the scaffold today:
Direct
process.env.*access — the dominant pattern in tests, fixtures, and helpers:baseUrl: process.env.API_URL, headers: process.env.ACCESS_TOKEN, body: { email: process.env.APP_EMAIL, password: process.env.APP_PASSWORD },Config-object access — used when you want to import a documented, organized surface:
import { appConfig } from '../../config/app'; await page.goto(appConfig.appUrl!);
Pick whichever fits the call site; do not mix them inside a single file without reason. For how to satisfy the TypeScript string | undefined that process.env.* returns — non-null assertion (!) vs fallback default — see the type-safety skill.
Examples
Example 1: Add a new staging environment
User says: "Add a staging environment pointing at the staging cluster."
Actions:
- Phase 1 — Confirm
playwright.config.tsalready honorsENVIRONMENT; no code change needed. - Create
env/.env.staginglocally (untracked) with the real staging URLs/credentials, using the same keys asenv/.env.example. - Run
ENVIRONMENT=staging npx playwright testto verify the file loads. - Do not modify
env/.env.example(the key names haven't changed) and do not commit.env.staging.
Example 2: Add a new utility-service URL
User says: "Wire up the reporting service URL so helpers can post run results."
Actions:
- Phase 2 — It's a utility-service URL → belongs in
config/util/util.tsas a property ofutilityConfig; env varREPORTING_URL. Phase 3 — Add to
env/.env.example:# Optional: Additional service URLs UTILITY_URL=https://your-utility-service.com REPORTING_URL=https://your-reporting-service.comPhase 4 — Extend
config/util/util.ts:export const utilityConfig = { /** Utility service base URL */ baseUrl: process.env.UTILITY_URL, /** Reporting service base URL loaded from REPORTING_URL env variable */ reportingUrl: process.env.REPORTING_URL, };- Phase 5 — Import
utilityConfig.reportingUrlin the helper that posts results; follow thetype-safetyskill for!vs fallback handling.
Troubleshooting
process.env.X is undefined at runtime.
Cause: The key is missing from the active env file, or the active env file doesn't exist.
Fix: Confirm the key exists in env/.env.${ENVIRONMENT} (default env/.env.dev). If you renamed or added a key, also update env/.env.example.
Wrong environment is being loaded.
Cause: ENVIRONMENT is unset, misspelled, or points at a missing file.
Fix: playwright.config.ts defaults to dev. Set ENVIRONMENT=staging in the shell (not in an .env file) before running tests; confirm env/.env.staging exists.
I can't find ACCESS_TOKEN / ACCESS_TOKEN_ZERO in env/.env.example.
Cause: These tokens are populated dynamically by an auth-bootstrap helper, not committed.
Fix: In the scaffold's demo setup, an auth-bootstrap helper under helpers/{area}/ logs in and writes the token into process.env.ACCESS_TOKEN before the main suite runs. Do not add the token to env/.env.example. See the helpers skill (Phase 6) for the pattern.
TypeScript complains that process.env.X is string | undefined.
Cause: process.env values are always optional types in Node.
Fix: See the type-safety skill for the two sanctioned patterns (non-null assertion with ! for values guaranteed to exist at runtime; fallback default with ?? otherwise).
I want to put an endpoint path in a config file.
Cause: Wrong skill. Paths are source-controlled constants, not environment-driven settings.
Fix: Add the path to enums/{area}/* (see the enums skill). config/ is only for URLs, credentials, and infra settings.
My new config property has no JSDoc and the PR review is blocking.
Fix: Every config property requires a JSDoc comment naming the backing env var, e.g. /** Reporting service base URL loaded from REPORTING_URL env variable */.
I accidentally committed env/.env.dev.
Fix: Remove the file from the commit (git rm --cached env/.env.dev), verify it's covered by .gitignore, rotate any credentials that were exposed, and push the fix.
See Also
enumsskill — endpoint paths, route constants, and storage-state paths live there, not inconfig/.type-safetyskill — handlingstring | undefinedreturned byprocess.env.*(!vs fallback defaults).api-testingskill — which env vars tests consume (API_URL,ACCESS_TOKEN,ACCESS_TOKEN_ZERO,APP_EMAIL,APP_PASSWORD) and how.debuggingskill — whenprocess.env.Xisundefinedat runtime, when a CI run reads different env values than local, or when a navigation times out becauseAPP_URLis wrong.
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.

