enums
Skill268 starsChanged 11 days agoMITView on GitHub
Use when adding or extending an enum under enums/** (endpoint path, UI message, role, route, storage-state path) or deciding whether a repeated string is an enum at all. Not for URLs and credentials (see `config`), curated test inputs (see `data-strategy`) or changing an existing member (see `refactor-values`).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- AnyOrgName/php-skillstheir own version, first seen Nov 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
- AnyOrgName/php-skills★ 4same 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 repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-native-workflowSkill
- api-testingSkill
- common-tasksSkill
- configSkill
- data-strategySkill
- debuggingSkill
- fixturesSkill
- helpersSkill
- page-objectsSkill
- playwright-cliSkill
- pr-reviewerSkill
- refactor-valuesSkill
- selectorsSkill
- skill-creatorSkill
- test-standardsSkill
- type-safetySkill
- 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
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Distinctive: line 23
Every enum declaration carries a JSDoc line naming what it groups.
- Very specific: line 40
Add the member, then replace every hardcoded copy with the import: grep -rn "<value>" tests pages fixtures helpers.
- Very specific: line 41
Run npx tsc --noEmit, npm run lint and the consuming tests.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Enums
Critical
A TypeScript
enum, never anas constobject: PascalCase name, SCREAMING_SNAKE_CASE members, the value exactly as the app uses it (case, punctuation, whitespace).// CORRECT export enum ApiEndpoints { LOGIN = '/users/login', } // WRONG export const API_ENDPOINTS = { login: '/users/Login' } as const;- Any app-defined string used in more than one place (endpoint path, UI message, role, route, storage-state path) lives in an enum and is imported;
ApiEndpointsmembers are the only source of endpoint paths. - App-specific enums in
enums/{area}/*.ts, cross-app constants inenums/util/*.ts; extend an existing enum before creating a file, never a new top-level folder. - Every enum declaration carries a JSDoc line naming what it groups.
- A UI message value is captured from the live app with
playwright-cli, never guessed; app unreachable: add it with// FIXME: unverifiedand say so in the report. - Changing or renaming an existing member goes through
refactor-valuesfirst.
Procedure
Classify the value;
ls enums/resolves{area}. URLs and credentials go toconfig, curated test inputs todata-strategy, Playwright tuning toplaywright.config.ts.Value Home Endpoint path, route, storage-state path enums/{area}/*(ApiEndpoints,AppRoutes,StorageStatePathsinenums/app/app.ts)UI message (error, success, validation, label, heading) enums/{area}/*(Messages), text captured liveRole or permission name enums/util/*(Rolesinenums/util/roles.ts)HTTP status code in an assertion inline literal, expect(status).toBe(200): the sanctioned carve-out from the magic-number rule- Extend the enum that already groups the value; a new domain gets
enums/{area}/<domain>.tswith its own JSDoc line. - UI text: open the page with
playwright-cli, trigger the state, copy the rendered string into the value. - Add the member, then replace every hardcoded copy with the import:
grep -rn "<value>" tests pages fixtures helpers. - Run
npx tsc --noEmit,npm run lintand the consuming tests.
References
- None. The live instances are
enums/app/app.ts(Messages,AppRoutes,ApiEndpoints,StorageStatePaths) andenums/util/roles.ts(Roles).
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.

