TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMINGSNAKECASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/)…

MITAuto-check passedTesting & QA

Install Enums

skills CLI
$ npx skills add idavidov13/agentic-playwright --skill enums -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install idavidov13/agentic-playwright enums --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/idavidov13/agentic-playwright.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/enums .claude/skills/enums && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
enums
GitHub stars
223
Token cost
~3k tokens
SKILL.md length
1,298 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMINGSNAKECASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/)…

  • Works in 6 steps: Decide if the value belongs in an enum → Pick the home — new file or extend… → Name the enum and its members → …
  • Adding a new API endpoint path
  • SKILL.md covers Critical, File Locations, Instructions and Examples, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Enums is an agent skill from idavidov13/agentic-playwright. TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMINGSNAKECASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/) constants, and the rules for adding or extending enums. Use when adding a new API endpoint path, UI message, role, storage-state path, route, or any repeated string constant defined by the application; when deciding whether a new value belongs in enums/, config/, or test-data/static/; or when extending an existing enum. For…

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering REST APIs, Browser testing and Test data and fixtures. It works with Playwright and TypeScript. The repository describes itself as: Production-grade Playwright + TypeScript Scaffold for Agentic Testing. Harness for all major AI coding agents baked in. The licence is MIT.

When your agent uses it

  • Adding a new API endpoint path
  • Storage-state path
  • Any repeated string constant defined by the application
  • Deciding whether a new value belongs in enums/

Example prompts

  • “/enums”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Decide if the value belongs in an enum
  2. Pick the home — new file or extend existing
  3. Name the enum and its members
  4. Verify message values against the real app
  5. Add JSDoc and export
  6. Editing existing enum values

What it can do on your machine

Read from SKILL.md and the folder at commit f6cbf35. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Enums loads about 3k tokens when it runs. Until then it costs about 173 tokens; SKILL.md has 1,298 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~173
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from idavidov13/agentic-playwright at commit f6cbf35, republished under its MIT licence (© idavidov13). 1,298 words, ~2,985 tokens.

Download SKILL.mdSave it as .claude/skills/enums/SKILL.md (or your agent's skills folder).
name
enums
description
TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMING_SNAKE_CASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/) constants, and the rules for adding or extending enums. Use when adding a new API endpoint path, UI message, role, storage-state path, route, or any repeated string constant defined by the application; when deciding whether a new value belongs in enums/, config/, or test-data/static/; or when extending an existing enum. For URLs and credentials use the config skill, for curated test input data use the data-strategy skill, and for editing existing enum values use the refactor-values skill.
author
Ivan Davidov

Enums

Critical

  • Convention: TypeScript enum — the scaffold uses the language construct enum, not as const object literals. Stay consistent.
  • Enum name: PascalCase (e.g., Messages, ApiEndpoints, Roles, StorageStatePaths).
  • Enum member: SCREAMING_SNAKE_CASE (e.g., LOGIN_SUCCESS, CURRENT_USER, APP).
  • Location: app-defined strings go in enums/{area}/*.ts; cross-app constants go in enums/util/*.ts. Do not invent a new top-level folder.
  • JSDoc: every enum declaration must have a JSDoc comment describing what the enum groups.
  • No hardcoded repeat strings. Any string used in more than one place — endpoint paths, UI messages, roles, storage-state paths — must live in an enum and be imported.
  • Message values must match the real app. For enums that mirror UI text (error messages, success messages, validation text), the string must be captured via playwright-cli from the live app, not guessed.
  • Edits to existing enum values go through refactor-values. Renaming a key or changing a value cascades through tests, page objects, and schemas.

File Locations

{area} is a placeholder. Before creating or referencing any path below, run ls enums/ to discover the real subdirectory names in this repo (e.g., front-office, back-office) and use those instead.

TypeDirectoryNamingScaffold examples
App-specific enumsenums/{area}/[name].tsMessages, ApiEndpoints, StorageStatePaths (in enums/app/app.ts)
Shared / utility enumsenums/util/[name].tsRoles (in enums/util/roles.ts)

Instructions

Phase 1: Decide if the value belongs in an enum

Use this decision table. Each row points to the canonical home — use it to prevent enums/ from overlapping with config/ or test-data/static/.

Value kindHome
Endpoint path (/api/users/login), route (/login), storage-state pathenums/{area}/*
UI message the app defines (error, success, validation, label, page title)enums/{area}/* — verify text against the live app via playwright-cli
Role / permission name (admin, user, guest)enums/util/* (shared across apps)
HTTP status code, well-known cross-app constantenums/util/*
URL of the app or a utility service, credentials, tokensconfig/ + env var — not an enum (see the config skill)
Curated test inputs (invalid emails, weak passwords, out-of-range numbers)test-data/static/ — not an enum (see the data-strategy skill)
Timeouts, retries, workers, project-wide Playwright tuningplaywright.config.ts — not an enum
String literal used in exactly one place (single assertion, single setup)Inline in the consumer — do not promote to an enum

If the value fits none of these rows, stop and ask. Do not invent a new location.

Phase 2: Pick the home — new file or extend existing

Prefer extending an existing enum file within the same domain over creating a new file. The goal is to keep related constants together so consumers have one predictable import per domain.

  • If a value fits into an existing enum (e.g., a new error message belongs in Messages), add it there.
  • If the domain is genuinely new (e.g., a checkout domain that warrants its own file), create enums/{area}/checkout.ts and add one or more enums to it.
  • Shared constants that apply across all apps go in enums/util/*.ts.
Phase 3: Name the enum and its members
  • Enum name — PascalCase, singular or plural per readability (Messages, ApiEndpoints, Roles, StorageStatePaths).
  • Enum member key — SCREAMING_SNAKE_CASE.
  • Enum member value — the actual string used by the app (exact case, exact punctuation).

Correct:

typescript
export enum ApiEndpoints {
    LOGIN = '/api/users/login',
    CURRENT_USER = '/api/users/me',
}

Incorrect:

WrongProblemCorrect
export enum API_ENDPOINTS { ... }Enum name is SCREAMING_SNAKE instead of PascalCaseexport enum ApiEndpoints { ... }
export enum apiEndpoints { ... }Enum name is camelCase instead of PascalCaseexport enum ApiEndpoints { ... }
LOGIN_Success = '...'Member mixes casesLOGIN_SUCCESS = '...'
loginSuccess = '...'Member is camelCase instead of SCREAMING_SNAKE_CASELOGIN_SUCCESS = '...'
LOGIN = '/api/users/Login'Value case drifted from the real app path (/login)LOGIN = '/api/users/login'
Phase 4: Verify message values against the real app

When the enum mirrors UI text (error messages, success messages, validation text, button labels, page titles), the string value must come from observing the live application — not from assumptions, design specs, or guesses.

Workflow:

  1. Read the playwright-cli skill (.claude/skills/playwright-cli/SKILL.md).
  2. Run playwright-cli to trigger the relevant action in the app.
  3. Capture the exact rendered text (case, punctuation, whitespace).
  4. Encode it as the enum value.

If the app is unavailable, add the value with a // FIXME: unverified comment and flag it for confirmation once exploration is possible. Do not ship unverified message values.

Phase 5: Add JSDoc and export

Every enum declaration gets a JSDoc comment describing the group:

typescript
/** Common UI messages displayed to the user */
export enum Messages {
    LOGIN_SUCCESS = 'Successfully logged in',
    LOGIN_ERROR = 'Invalid email or password',
}

Re-use the pattern from enums/app/app.ts. The file itself may also carry a top-level JSDoc with an @example block (as the existing enums/app/app.ts does) when useful.

Phase 6: Editing existing enum values

When you need to change an enum member's string value or rename a member key, the change cascades through tests, page objects, API schemas, and data-driven loops.

Read the refactor-values skill (.claude/skills/refactor-values/SKILL.md) before touching an existing enum. It owns the impact-analysis and cascading-update workflow.

Examples

Show full SKILL.md (545 more words)Show less
Example 1: Add a new API endpoint path

User says: "Add tests for POST /api/products."

Actions:

  1. Phase 1 — Endpoint path → enums/{area}/* (app-specific).
  2. Phase 2 — ApiEndpoints already exists in enums/app/app.ts → extend it, don't create a new file.
  3. Phase 3 — Add PRODUCTS = '/api/products' (PascalCase enum, SCREAMING_SNAKE_CASE member, exact path case).
  4. Phase 5 — The existing JSDoc on ApiEndpoints already covers the group; no extra JSDoc needed for a single new member.
  5. Consume in the API spec via ApiEndpoints.PRODUCTS (never hardcode /api/products).
Example 2: Add a new UI message

User says: "Assert the payment-failed message shows after a failed checkout."

Actions:

  1. Phase 1 — App-defined UI text → enums/{area}/*.
  2. Phase 2 — Messages already exists in enums/app/app.ts → extend it.
  3. Phase 4 — Run playwright-cli, trigger the failed-payment flow, capture the exact rendered text.
  4. Phase 3 — Add PAYMENT_FAILED = '<captured text>'.
  5. Consume in the test via await expect(page.getByText(Messages.PAYMENT_FAILED)).toBeVisible();.
Example 3: Add a new shared role

User says: "Support a moderator role in the test matrix."

Actions:

  1. Phase 1 — Role → shared constant → enums/util/*.
  2. Phase 2 — Roles already exists in enums/util/roles.ts → extend it.
  3. Phase 3 — Add MODERATOR = 'moderator' (value is the exact wire string the app uses).
  4. Consume wherever role checks or auth fixtures need it.

Troubleshooting

I'm about to hardcode /api/users/login in a test. Fix: Use ApiEndpoints.LOGIN from enums/app/app.ts. Any endpoint path used in more than one place must come from an enum.

I'm about to hardcode an error message like 'Invalid credentials' in an assertion. Fix: Use Messages.* from enums/app/app.ts. Verify the exact text via playwright-cli first (Phase 4); add a new member if needed.

My enum value doesn't match the real UI text and a test fails at expect(...).toBeVisible(). Fix: Re-run playwright-cli to capture the actual rendered string (case, punctuation, whitespace). Update via the refactor-values workflow — do not fix it with a local find-and-replace that misses other consumers.

I need to rename an enum member (e.g., LOGIN_FAILED → LOGIN_REJECTED). Fix: Stop. Read the refactor-values skill first. Use its impact-analysis workflow to find every consumer before renaming.

My new value is an array (e.g., [...invalid emails]). Fix: That's not an enum — enums are named string constants, not collections of data. Put it in test-data/static/{area}/*.ts as an as const export (see the data-strategy skill).

I want to put a URL like https://staging.example.com in an enum. Fix: URLs are environment-dependent and belong in config/ + process.env.* (see the config skill). Enums are for source-controlled app-defined values.

TypeScript complains about enum in my linter config. Cause: Some TS style guides discourage enum in favour of as const objects. Fix: The scaffold's convention is TypeScript enum. If the linter flags it, configure the lint rule to allow enum at the repo level rather than migrating one file.

See Also

  • config skill — where URLs, credentials, and env-driven settings live (not enums).
  • data-strategy skill — where curated arrays of test inputs live (not enums).
  • playwright-cli skill — how to capture the real UI text before encoding it as a message enum value.
  • refactor-values skill — impact analysis and cascading update workflow for enum renames and value changes.
  • api-testing skill — consumer of ApiEndpoints.* for all endpoint references.
  • debugging skill — when an assertion fails because Messages.X drifted from the live UI text, or when a test calls the wrong endpoint because ApiEndpoints.X is stale.

© idavidov13, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/enums of idavidov13/agentic-playwright.

Open the folder on GitHubat commit f6cbf35

Compare with similar skills

Enums next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Enums compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Enums this skillidavidov13/agentic-playwright223—~3kAutomated safety check: PassMIT
Playwright Page Objectsbartstc/vite-ts-react-template122—~1kAutomated safety check: NotesMIT
RStudio Selenium to Playwright Migrationrstudio/rstudio5.1k—~3.6kAutomated safety check: PassCustom licence
Playwright Coretestdino-hq/playwright-skill3861 repos~1.4kAutomated safety check: PassMIT
Svelte Testingspences10/sveltest113—~579Automated safety check: PassMIT
API Testingfugazi/test-automation-skills-agents247—~1.5kAutomated safety check: PassMIT

Similar skills

  • Playwright Page Objects

    bartstc/vite-ts-react-template

    A skill your agent uses when creating page objects or refactoring Playwright E2E tests for better maintainability with Page Object Model patterns.

    122 GitHub stars~1k tokensUpdated 2 days ago
    Testing & QAAuto-check: notes
  • Converts RStudio Python Selenium electron tests into TypeScript Playwright tests, checking each against a live RStudio before counting it as migrated.

    5.1k GitHub stars~3.6k tokensUpdated today
    Testing & QAAuto-check passed
  • Playwright Core

    testdino-hq/playwright-skill

    Battle-tested Playwright patterns for writing and debugging reliable E2E, API, component, visual, accessibility, and security tests.

    386 GitHub starsUsed in 1 repo~1.4k tokens
    Testing & QAAuto-check passed
  • Svelte Testing

    spences10/sveltest

    Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.

    113 GitHub stars~579 tokensUpdated today
    Testing & QAAuto-check passed
  • API Testing

    fugazi/test-automation-skills-agents

    Test REST and GraphQL endpoint contracts using Playwright request fixture (TypeScript) or REST Assured (Java).

    247 GitHub stars~1.5k tokensUpdated 5 days ago
    Testing & QAAuto-check passed
  • Playwright Login Flows

    andrewyng/context-hub

    Collects reusable Playwright patterns for logging in during end-to-end tests: password forms, OAuth redirects, saved browser state and TOTP two-factor codes.

    14k GitHub stars~715 tokensUpdated 4 mo ago
    Testing & QAAuto-check passed

More from idavidov13/agentic-playwright

All 13 skills in this repo
  • AI Native Workflow

    idavidov13/agentic-playwright

    Sole entry-point router for AI-assisted work on this Playwright scaffold — owns the 8-phase main workflow (classify → route → explore → plan+confidence → human gate → apply → verify → report), the…

    223 GitHub stars~3.5k tokensUpdated 7 days ago
    Auto-check passed
  • Common Tasks

    idavidov13/agentic-playwright

    Copy-paste AI prompt templates for common Playwright scaffold development tasks — adding page objects, functional/E2E/API tests, Zod schemas, factories, fixtures, and components.

    223 GitHub stars~2.5k tokensUpdated 7 days ago
    Auto-check passed
  • Data Strategy

    idavidov13/agentic-playwright

    Test data strategy for the Playwright scaffold — Faker + Zod factories for dynamic happy-path data, static TS files (.ts with as const exports — never .json) for domain-specific curated invalid…

    223 GitHub stars~3.4k tokensUpdated 7 days ago
    Auto-check passed
  • Page Objects

    idavidov13/agentic-playwright

    Page Object Model pattern for the Playwright scaffold — class structure, get-accessor locator pattern, action-method conventions, component composition, registration via the page-object fixture, and…

    223 GitHub stars~3.6k tokensUpdated 7 days ago
    Auto-check passed
  • Selectors

    idavidov13/agentic-playwright

    Selector strategy, exploration-first workflow, locator priority order (getByRole then getByLabel then getByPlaceholder then getByText then getByTestId), and feedback/validation-message selector…

    223 GitHub stars~2.7k tokensUpdated 7 days ago
    Auto-check passed
  • Test Standards

    idavidov13/agentic-playwright

    Spec file conventions for the Playwright scaffold — imports from test-options.ts, test file structure (describe / beforeEach / test / test.step), single-tag rule, functional vs E2E vs API vs setup…

    223 GitHub stars~3.9k tokensUpdated 7 days ago
    Auto-check passed

Categories

Questions about Enums

What does Enums do?

TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMINGSNAKECASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/)…. Enums is an agent skill from idavidov13/agentic-playwright. TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMINGSNAKECASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/) constants, and the rules for adding or extending enums.

When should I use Enums?

Enums fits situations like: adding a new API endpoint path; storage-state path; any repeated string constant defined by the application; deciding whether a new value belongs in enums/.

How do I install Enums in Claude Code?

Run `npx skills add idavidov13/agentic-playwright --skill enums -a claude-code`. Or copy the skill folder (.claude/skills/enums in idavidov13/agentic-playwright) into .claude/skills/enums in your project. Claude Code loads it when a task matches its description.

How do I install Enums in Codex?

Run `npx skills add idavidov13/agentic-playwright --skill enums -a codex`. Or copy the skill folder (.claude/skills/enums in idavidov13/agentic-playwright) into .agents/skills/enums in your project. Codex loads it when a task matches its description.

Can I use Enums in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add idavidov13/agentic-playwright --skill enums -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/enums, .gemini/skills/enums, .github/skills/enums and .opencode/skills/enums in your project.

What does Enums need to run?

SKILL.md names no scripts, command-line tools or credentials: Enums is instructions for the agent only.

Does Enums access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Enums safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Enums use?

Enums is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Enums use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Enums?

Skills that share tags, products or a category with Enums: Playwright Page Objects (bartstc/vite-ts-react-template, 122 stars), RStudio Selenium to Playwright Migration (rstudio/rstudio, 5.1k stars), Playwright Core (testdino-hq/playwright-skill, 386 stars) and Svelte Testing (spences10/sveltest, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Enums?

idavidov13 (a GitHub user) maintains it in idavidov13/agentic-playwright, which has 223 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 1, 2026.

Source: idavidov13/agentic-playwright on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.