{"owner":"Flagsmith","repo":"flagsmith","hasSkills":true,"totalSkillsCount":19,"totalTokensCount":4307,"categories":["claude-rule","root-instruction","command-prompt"],"hasMcp":false,"mcpConfig":null,"found":["frontend/CLAUDE.md","AGENTS.md","frontend/.claude/commands/api.md","frontend/.claude/commands/backend.md","frontend/.claude/commands/check-staged.md","frontend/.claude/commands/e2e.md","frontend/.claude/commands/context.md","frontend/.claude/commands/e2e-ee.md","frontend/.claude/commands/e2e-create.md","frontend/.claude/commands/check.md","CLAUDE.md","frontend/AGENTS.md","frontend/.claude/commands/e2e-oss.md","frontend/.claude/commands/feature-flag.md","frontend/.claude/commands/find-usages.md","frontend/.claude/commands/pr-review.md","frontend/.claude/commands/ui-patterns.md","frontend/.claude/commands/unit-test.md","frontend/.claude/commands/visual-regression.md"],"skills":{"frontend/CLAUDE.md":"# CLAUDE.md\n\n## Commands\n- `npm run dev` - Start dev server\n- `npm run typecheck` - Type checking\n\n## Structure\n- `/common` - Shared Redux/API (no web/mobile code)\n- `/web/components` - React components (includes `/web/components/pages/` for all page components)\n- `/web/components/pages/` - **All page components** (e.g., `FeaturesPage.js`, `ProjectSettingsPage.js`)\n- `/common/types/` - `requests.ts` and `responses.ts` for API types\n- Ignore: `ios/`, `android/`, `.net/`, `*.md.draft`\n\n## Rules\n1. **API Integration**: Use `npx ssg` CLI + check `../api` backend\n2. **Imports**: Use the `common/`, `components/`, `project/` aliases when the relative path would go up (`../`); use a relative path for same-folder or descendant imports. This is enforced by `@dword-design/import-alias/prefer-alias`, and `eslint --fix` will rewrite an alias back to relative inside its own alias root (e.g. `components/base/forms/X` becomes `./base/forms/X` in a file under `web/components/`).\n3. **State**: Redux Toolkit + RTK Query, store in `common/store.ts`\n4. **Feature Flags**: When user says \"create a feature flag\", you MUST: (1) Create it in Flagsmith using MCP tools (`mcp__flagsmith__create_feature`), (2) Implement code with `useFlags` hook. See `.claude/context/feature-flags/` for details\n5. **Linting**: ALWAYS run `npx eslint --fix <file>` on any files you modify\n6. **Type Enums**: Extract inline union types to named types (e.g., `type Status = 'A' | 'B'` instead of inline)\n7. **NO FETCH**: NEVER use `fetch()` directly - ALWAYS use RTK Query mutations/queries (inject endpoints into services in `common/services/`), see api-integration context\n8. **Component structure**: A component with nothing to keep beside it is a single `ComponentName.tsx`. It gets a folder once it has a co-located `ComponentName.scss`, sub-components, tests or hooks: `ComponentName/ComponentName.tsx` plus an `index.ts` re-exporting the default (and public types). Import via `components/.../ComponentName` either way, never the inner file, so promoting a file to a folder changes no imports. Keep files focused (~100 lines as a target); split by concern, not to hit a number. Data tables/constant maps are exempt.\n\n## Key Files\n- Store: `common/store.ts`\n- Base service: `common/service.ts`\n\n## Context Files\n\nThe `.claude/context/` directory contains **required patterns and standards** for this codebase. These are not optional suggestions - they document how things must be done in this project.\n\nFor detailed guidance on specific topics:\n- **Quick Start**: `.claude/context/quick-reference.md` - Common tasks, commands, patterns\n- **API Integration**: `.claude/context/api-integration.md` - Adding endpoints, RTK Query (required reading for API work)\n- **Backend**: `.claude/context/backend-integration.md` - Finding endpoints, backend structure\n- **UI Patterns**: `.claude/context/ui-patterns.md` - Tables, tabs, modals, confirmations (required reading for UI work)\n- **Feature Flags**: `.claude/context/feature-flags/` - Using Flagsmith flags (optional, only when requested)\n- **Code Patterns**: `.claude/context/patterns/` - Complete examples, best practices\n\n**Tip:** Start with `quick-reference.md` for common tasks and checklists.\n","AGENTS.md":"Prioritise @AGENTS.local.md, if present.\n\nUse British English.\n\n# Tasks\n\nInstall Git hooks: `make install-hooks`\nFor backend code, read @api/README.md\nFor frontend code, read @frontend/README.md\nFor docs.flagsmith.com source, read @docs/README.md\nFor MCP code, read @mcp/README.md\n","frontend/.claude/commands/api.md":"---\ndescription: Generate a new RTK Query API service\n---\n\n<!-- TODO: Update /api-types-sync once OpenAPI schema is ready -->\n\nGenerate a new API service. Follow these steps:\n\n1. Go through the process mentioned in `.claude/context/api-integration.md`\n2. If I haven't specified, attempt to find where I'd want to create this component in the frontend\n\nContext file: `.claude/context/api-integration.md`\n","frontend/.claude/commands/backend.md":"---\ndescription: Search the backend codebase for endpoint details\n---\n\nSearch the `../api` codebase for the requested endpoint.\n\nLook for:\n1. Route definitions (URL path)\n2. HTTP method (GET, POST, PUT, DELETE)\n3. Request validation schema (request body/params types)\n4. Response structure (what data is returned)\n5. Authentication/authorization requirements\n\nIf the endpoint isn't found, check swagger docs: https://staging.flagsmith.com/api/v1/docs/\n","frontend/.claude/commands/check-staged.md":"---\ndescription: Run type checking and linting on staged files\n---\n\nRun TypeScript checking and linting on all currently staged files, similar to pre-commit hooks. Steps:\n1. Run `npm run check:staged` to typecheck and lint only staged files\n2. Report any type errors or linting issues found\n3. If errors exist, offer to fix them\n","frontend/.claude/commands/e2e.md":"# E2E Test Runner (All Tests)\n\nRun all E2E tests (both OSS and enterprise) and report results.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Run tests once (default)\n- `$ARGUMENTS` = \"5\" → Run tests 5 times, stopping on first failure\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, failure analysis workflows, and fix patterns.\n\n## Run Command\n\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=5 npm run test -- --grep \"@oss|@enterprise\" --quiet\n```\n\n## Workflow\n\n1. Run tests (one iteration at a time if multiple requested)\n2. On failure: follow the failure analysis workflow in context/e2e.md\n3. Report results with pass/fail counts for OSS and enterprise tests\n","frontend/.claude/commands/context.md":"---\ndescription: Load detailed context files for specific topics\n---\n\nAvailable context files in `.claude/context/`:\n\n1. **api-integration.md** - API integration workflow, Redux setup, cross-platform patterns\n2. **architecture.md** - Environment config, tech stack, additional rules\n3. **feature-flags/** - Flagsmith feature flags (usage + MCP workflows)\n4. **patterns/** - Code patterns (API, mobile)\n\nWhich context would you like to explore?\n","frontend/.claude/commands/e2e-ee.md":"# E2E Enterprise Test Runner\n\nRun enterprise E2E tests (tagged with @enterprise) and report results.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Run tests once (default)\n- `$ARGUMENTS` = \"5\" → Run tests 5 times, stopping on first failure\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, failure analysis workflows, and fix patterns.\n\n## Run Command\n\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=5 npm run test -- --grep @enterprise --quiet\n```\n\n## Re-running Failed Enterprise Tests\n\nWhen re-running specific failed tests, include the grep flag:\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=1 npm run test -- tests/specific-test.pw.ts --grep @enterprise\n```\n\n## Workflow\n\n1. Run tests (one iteration at a time if multiple requested)\n2. On failure: follow the failure analysis workflow in context/e2e.md\n3. Report results\n","frontend/.claude/commands/e2e-create.md":"# E2E Test Creator\n\nCreate a new E2E test following the existing patterns in the codebase.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Ask the user what to test\n- `$ARGUMENTS` = \"segment creation flow\" → Create a test for that feature\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, test structure, and debugging guides.\n\n## Workflow\n\n1. **Determine what to test:**\n   - If `$ARGUMENTS` is provided, use that as the test description\n   - Otherwise, ask the user what feature/page/flow to test\n\n2. **Determine if OSS or Enterprise:**\n   - Check if the feature exists in enterprise-only code paths\n   - Tag the test with `@oss` or `@enterprise` accordingly\n\n3. **Review existing patterns:**\n   - Read 2-3 similar test files from `frontend/e2e/tests/`\n   - Read `frontend/e2e/helpers.playwright.ts` for available utilities\n\n4. **Scan application code:**\n   - Find components being tested in `frontend/web/components/` or `frontend/common/`\n   - Add `data-test` attributes if missing\n\n5. **Create the test file:**\n   - Follow naming convention: `*-test.pw.ts` or `*-tests.pw.ts`\n   - Use helper functions from `helpers.playwright.ts`\n\n6. **Verify the test works:**\n   ```bash\n   SKIP_BUNDLE=1 E2E_CONCURRENCY=1 npm run test -- tests/new-test.pw.ts --quiet\n   ```\n   Run twice to check for flakiness. On failure, follow the analysis workflow in context/e2e.md.\n\n7. **Report what was created:**\n   - Test file path\n   - Any `data-test` attributes added\n   - Test stability results\n\n## Important Notes\n\n- Always use `data-test` attributes for selectors\n- Use existing helper functions instead of raw Playwright APIs\n- Tests should be independent and not rely on execution order\n","frontend/.claude/commands/check.md":"---\ndescription: Run type checking and linting\n---\n\nRun the following checks on the codebase:\n\n1. `npx lint-staged --allow-empty` - Fix linting issues on staged files only (same as git hook)\n\nReport any errors found and offer to fix them.\n","CLAUDE.md":"Read @AGENTS.md","frontend/AGENTS.md":"Read @CLAUDE.md\n","frontend/.claude/commands/e2e-oss.md":"# Command: /e2e-oss\n\nPath: `frontend/.claude/commands/e2e-oss.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/e2e-oss.md)","frontend/.claude/commands/feature-flag.md":"# Command: /feature-flag\n\nPath: `frontend/.claude/commands/feature-flag.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/feature-flag.md)","frontend/.claude/commands/find-usages.md":"# Command: /find-usages\n\nPath: `frontend/.claude/commands/find-usages.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/find-usages.md)","frontend/.claude/commands/pr-review.md":"# Command: /pr-review\n\nPath: `frontend/.claude/commands/pr-review.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/pr-review.md)","frontend/.claude/commands/ui-patterns.md":"# Command: /ui-patterns\n\nPath: `frontend/.claude/commands/ui-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/ui-patterns.md)","frontend/.claude/commands/unit-test.md":"# Command: /unit-test\n\nPath: `frontend/.claude/commands/unit-test.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/unit-test.md)","frontend/.claude/commands/visual-regression.md":"# Command: /visual-regression\n\nPath: `frontend/.claude/commands/visual-regression.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/visual-regression.md)"},"files":{"frontend/CLAUDE.md":"# CLAUDE.md\n\n## Commands\n- `npm run dev` - Start dev server\n- `npm run typecheck` - Type checking\n\n## Structure\n- `/common` - Shared Redux/API (no web/mobile code)\n- `/web/components` - React components (includes `/web/components/pages/` for all page components)\n- `/web/components/pages/` - **All page components** (e.g., `FeaturesPage.js`, `ProjectSettingsPage.js`)\n- `/common/types/` - `requests.ts` and `responses.ts` for API types\n- Ignore: `ios/`, `android/`, `.net/`, `*.md.draft`\n\n## Rules\n1. **API Integration**: Use `npx ssg` CLI + check `../api` backend\n2. **Imports**: Use the `common/`, `components/`, `project/` aliases when the relative path would go up (`../`); use a relative path for same-folder or descendant imports. This is enforced by `@dword-design/import-alias/prefer-alias`, and `eslint --fix` will rewrite an alias back to relative inside its own alias root (e.g. `components/base/forms/X` becomes `./base/forms/X` in a file under `web/components/`).\n3. **State**: Redux Toolkit + RTK Query, store in `common/store.ts`\n4. **Feature Flags**: When user says \"create a feature flag\", you MUST: (1) Create it in Flagsmith using MCP tools (`mcp__flagsmith__create_feature`), (2) Implement code with `useFlags` hook. See `.claude/context/feature-flags/` for details\n5. **Linting**: ALWAYS run `npx eslint --fix <file>` on any files you modify\n6. **Type Enums**: Extract inline union types to named types (e.g., `type Status = 'A' | 'B'` instead of inline)\n7. **NO FETCH**: NEVER use `fetch()` directly - ALWAYS use RTK Query mutations/queries (inject endpoints into services in `common/services/`), see api-integration context\n8. **Component structure**: A component with nothing to keep beside it is a single `ComponentName.tsx`. It gets a folder once it has a co-located `ComponentName.scss`, sub-components, tests or hooks: `ComponentName/ComponentName.tsx` plus an `index.ts` re-exporting the default (and public types). Import via `components/.../ComponentName` either way, never the inner file, so promoting a file to a folder changes no imports. Keep files focused (~100 lines as a target); split by concern, not to hit a number. Data tables/constant maps are exempt.\n\n## Key Files\n- Store: `common/store.ts`\n- Base service: `common/service.ts`\n\n## Context Files\n\nThe `.claude/context/` directory contains **required patterns and standards** for this codebase. These are not optional suggestions - they document how things must be done in this project.\n\nFor detailed guidance on specific topics:\n- **Quick Start**: `.claude/context/quick-reference.md` - Common tasks, commands, patterns\n- **API Integration**: `.claude/context/api-integration.md` - Adding endpoints, RTK Query (required reading for API work)\n- **Backend**: `.claude/context/backend-integration.md` - Finding endpoints, backend structure\n- **UI Patterns**: `.claude/context/ui-patterns.md` - Tables, tabs, modals, confirmations (required reading for UI work)\n- **Feature Flags**: `.claude/context/feature-flags/` - Using Flagsmith flags (optional, only when requested)\n- **Code Patterns**: `.claude/context/patterns/` - Complete examples, best practices\n\n**Tip:** Start with `quick-reference.md` for common tasks and checklists.\n","AGENTS.md":"Prioritise @AGENTS.local.md, if present.\n\nUse British English.\n\n# Tasks\n\nInstall Git hooks: `make install-hooks`\nFor backend code, read @api/README.md\nFor frontend code, read @frontend/README.md\nFor docs.flagsmith.com source, read @docs/README.md\nFor MCP code, read @mcp/README.md\n","frontend/.claude/commands/api.md":"---\ndescription: Generate a new RTK Query API service\n---\n\n<!-- TODO: Update /api-types-sync once OpenAPI schema is ready -->\n\nGenerate a new API service. Follow these steps:\n\n1. Go through the process mentioned in `.claude/context/api-integration.md`\n2. If I haven't specified, attempt to find where I'd want to create this component in the frontend\n\nContext file: `.claude/context/api-integration.md`\n","frontend/.claude/commands/backend.md":"---\ndescription: Search the backend codebase for endpoint details\n---\n\nSearch the `../api` codebase for the requested endpoint.\n\nLook for:\n1. Route definitions (URL path)\n2. HTTP method (GET, POST, PUT, DELETE)\n3. Request validation schema (request body/params types)\n4. Response structure (what data is returned)\n5. Authentication/authorization requirements\n\nIf the endpoint isn't found, check swagger docs: https://staging.flagsmith.com/api/v1/docs/\n","frontend/.claude/commands/check-staged.md":"---\ndescription: Run type checking and linting on staged files\n---\n\nRun TypeScript checking and linting on all currently staged files, similar to pre-commit hooks. Steps:\n1. Run `npm run check:staged` to typecheck and lint only staged files\n2. Report any type errors or linting issues found\n3. If errors exist, offer to fix them\n","frontend/.claude/commands/e2e.md":"# E2E Test Runner (All Tests)\n\nRun all E2E tests (both OSS and enterprise) and report results.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Run tests once (default)\n- `$ARGUMENTS` = \"5\" → Run tests 5 times, stopping on first failure\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, failure analysis workflows, and fix patterns.\n\n## Run Command\n\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=5 npm run test -- --grep \"@oss|@enterprise\" --quiet\n```\n\n## Workflow\n\n1. Run tests (one iteration at a time if multiple requested)\n2. On failure: follow the failure analysis workflow in context/e2e.md\n3. Report results with pass/fail counts for OSS and enterprise tests\n","frontend/.claude/commands/context.md":"---\ndescription: Load detailed context files for specific topics\n---\n\nAvailable context files in `.claude/context/`:\n\n1. **api-integration.md** - API integration workflow, Redux setup, cross-platform patterns\n2. **architecture.md** - Environment config, tech stack, additional rules\n3. **feature-flags/** - Flagsmith feature flags (usage + MCP workflows)\n4. **patterns/** - Code patterns (API, mobile)\n\nWhich context would you like to explore?\n","frontend/.claude/commands/e2e-ee.md":"# E2E Enterprise Test Runner\n\nRun enterprise E2E tests (tagged with @enterprise) and report results.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Run tests once (default)\n- `$ARGUMENTS` = \"5\" → Run tests 5 times, stopping on first failure\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, failure analysis workflows, and fix patterns.\n\n## Run Command\n\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=5 npm run test -- --grep @enterprise --quiet\n```\n\n## Re-running Failed Enterprise Tests\n\nWhen re-running specific failed tests, include the grep flag:\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=1 npm run test -- tests/specific-test.pw.ts --grep @enterprise\n```\n\n## Workflow\n\n1. Run tests (one iteration at a time if multiple requested)\n2. On failure: follow the failure analysis workflow in context/e2e.md\n3. Report results\n","frontend/.claude/commands/e2e-create.md":"# E2E Test Creator\n\nCreate a new E2E test following the existing patterns in the codebase.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Ask the user what to test\n- `$ARGUMENTS` = \"segment creation flow\" → Create a test for that feature\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, test structure, and debugging guides.\n\n## Workflow\n\n1. **Determine what to test:**\n   - If `$ARGUMENTS` is provided, use that as the test description\n   - Otherwise, ask the user what feature/page/flow to test\n\n2. **Determine if OSS or Enterprise:**\n   - Check if the feature exists in enterprise-only code paths\n   - Tag the test with `@oss` or `@enterprise` accordingly\n\n3. **Review existing patterns:**\n   - Read 2-3 similar test files from `frontend/e2e/tests/`\n   - Read `frontend/e2e/helpers.playwright.ts` for available utilities\n\n4. **Scan application code:**\n   - Find components being tested in `frontend/web/components/` or `frontend/common/`\n   - Add `data-test` attributes if missing\n\n5. **Create the test file:**\n   - Follow naming convention: `*-test.pw.ts` or `*-tests.pw.ts`\n   - Use helper functions from `helpers.playwright.ts`\n\n6. **Verify the test works:**\n   ```bash\n   SKIP_BUNDLE=1 E2E_CONCURRENCY=1 npm run test -- tests/new-test.pw.ts --quiet\n   ```\n   Run twice to check for flakiness. On failure, follow the analysis workflow in context/e2e.md.\n\n7. **Report what was created:**\n   - Test file path\n   - Any `data-test` attributes added\n   - Test stability results\n\n## Important Notes\n\n- Always use `data-test` attributes for selectors\n- Use existing helper functions instead of raw Playwright APIs\n- Tests should be independent and not rely on execution order\n","frontend/.claude/commands/check.md":"---\ndescription: Run type checking and linting\n---\n\nRun the following checks on the codebase:\n\n1. `npx lint-staged --allow-empty` - Fix linting issues on staged files only (same as git hook)\n\nReport any errors found and offer to fix them.\n","CLAUDE.md":"Read @AGENTS.md","frontend/AGENTS.md":"Read @CLAUDE.md\n","frontend/.claude/commands/e2e-oss.md":"# Command: /e2e-oss\n\nPath: `frontend/.claude/commands/e2e-oss.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/e2e-oss.md)","frontend/.claude/commands/feature-flag.md":"# Command: /feature-flag\n\nPath: `frontend/.claude/commands/feature-flag.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/feature-flag.md)","frontend/.claude/commands/find-usages.md":"# Command: /find-usages\n\nPath: `frontend/.claude/commands/find-usages.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/find-usages.md)","frontend/.claude/commands/pr-review.md":"# Command: /pr-review\n\nPath: `frontend/.claude/commands/pr-review.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/pr-review.md)","frontend/.claude/commands/ui-patterns.md":"# Command: /ui-patterns\n\nPath: `frontend/.claude/commands/ui-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/ui-patterns.md)","frontend/.claude/commands/unit-test.md":"# Command: /unit-test\n\nPath: `frontend/.claude/commands/unit-test.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/unit-test.md)","frontend/.claude/commands/visual-regression.md":"# Command: /visual-regression\n\nPath: `frontend/.claude/commands/visual-regression.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/visual-regression.md)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"Prioritise @AGENTS.local.md, if present.\n\nUse British English.\n\n# Tasks\n\nInstall Git hooks: `make install-hooks`\nFor backend code, read @api/README.md\nFor frontend code, read @frontend/README.md\nFor docs.flagsmith.com source, read @docs/README.md\nFor MCP code, read @mcp/README.md\n","isInternal":false,"tokens":76,"sizeBytes":281},{"name":"AGENTS.md","path":"frontend/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/AGENTS.md","title":"frontend - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"Read @CLAUDE.md\n","isInternal":false,"tokens":7,"sizeBytes":16},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"Read @AGENTS.md","isInternal":false,"tokens":5,"sizeBytes":15},{"name":"CLAUDE.md","path":"frontend/CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/CLAUDE.md","title":"frontend - Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# CLAUDE.md\n\n## Commands\n- `npm run dev` - Start dev server\n- `npm run typecheck` - Type checking\n\n## Structure\n- `/common` - Shared Redux/API (no web/mobile code)\n- `/web/components` - React components (includes `/web/components/pages/` for all page components)\n- `/web/components/pages/` - **All page components** (e.g., `FeaturesPage.js`, `ProjectSettingsPage.js`)\n- `/common/types/` - `requests.ts` and `responses.ts` for API types\n- Ignore: `ios/`, `android/`, `.net/`, `*.md.draft`\n\n## Rules\n1. **API Integration**: Use `npx ssg` CLI + check `../api` backend\n2. **Imports**: Use the `common/`, `components/`, `project/` aliases when the relative path would go up (`../`); use a relative path for same-folder or descendant imports. This is enforced by `@dword-design/import-alias/prefer-alias`, and `eslint --fix` will rewrite an alias back to relative inside its own alias root (e.g. `components/base/forms/X` becomes `./base/forms/X` in a file under `web/components/`).\n3. **State**: Redux Toolkit + RTK Query, store in `common/store.ts`\n4. **Feature Flags**: When user says \"create a feature flag\", you MUST: (1) Create it in Flagsmith using MCP tools (`mcp__flagsmith__create_feature`), (2) Implement code with `useFlags` hook. See `.claude/context/feature-flags/` for details\n5. **Linting**: ALWAYS run `npx eslint --fix <file>` on any files you modify\n6. **Type Enums**: Extract inline union types to named types (e.g., `type Status = 'A' | 'B'` instead of inline)\n7. **NO FETCH**: NEVER use `fetch()` directly - ALWAYS use RTK Query mutations/queries (inject endpoints into services in `common/services/`), see api-integration context\n8. **Component structure**: A component with nothing to keep beside it is a single `ComponentName.tsx`. It gets a folder once it has a co-located `ComponentName.scss`, sub-components, tests or hooks: `ComponentName/ComponentName.tsx` plus an `index.ts` re-exporting the default (and public types). Import via `components/.../ComponentName` either way, never the inner file, so promoting a file to a folder changes no imports. Keep files focused (~100 lines as a target); split by concern, not to hit a number. Data tables/constant maps are exempt.\n\n## Key Files\n- Store: `common/store.ts`\n- Base service: `common/service.ts`\n\n## Context Files\n\nThe `.claude/context/` directory contains **required patterns and standards** for this codebase. These are not optional suggestions - they document how things must be done in this project.\n\nFor detailed guidance on specific topics:\n- **Quick Start**: `.claude/context/quick-reference.md` - Common tasks, commands, patterns\n- **API Integration**: `.claude/context/api-integration.md` - Adding endpoints, RTK Query (required reading for API work)\n- **Backend**: `.claude/context/backend-integration.md` - Finding endpoints, backend structure\n- **UI Patterns**: `.claude/context/ui-patterns.md` - Tables, tabs, modals, confirmations (required reading for UI work)\n- **Feature Flags**: `.claude/context/feature-flags/` - Using Flagsmith flags (optional, only when requested)\n- **Code Patterns**: `.claude/context/patterns/` - Complete examples, best practices\n\n**Tip:** Start with `quick-reference.md` for common tasks and checklists.\n","isInternal":false,"tokens":810,"sizeBytes":3222},{"name":"api.md","path":"frontend/.claude/commands/api.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/api.md","title":"Command: /api","category":"command-prompt","format":"markdown","content":"---\ndescription: Generate a new RTK Query API service\n---\n\n<!-- TODO: Update /api-types-sync once OpenAPI schema is ready -->\n\nGenerate a new API service. Follow these steps:\n\n1. Go through the process mentioned in `.claude/context/api-integration.md`\n2. If I haven't specified, attempt to find where I'd want to create this component in the frontend\n\nContext file: `.claude/context/api-integration.md`\n","frontmatter":{"description":"Generate a new RTK Query API service"},"isInternal":false,"tokens":90,"sizeBytes":403},{"name":"backend.md","path":"frontend/.claude/commands/backend.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/backend.md","title":"Command: /backend","category":"command-prompt","format":"markdown","content":"---\ndescription: Search the backend codebase for endpoint details\n---\n\nSearch the `../api` codebase for the requested endpoint.\n\nLook for:\n1. Route definitions (URL path)\n2. HTTP method (GET, POST, PUT, DELETE)\n3. Request validation schema (request body/params types)\n4. Response structure (what data is returned)\n5. Authentication/authorization requirements\n\nIf the endpoint isn't found, check swagger docs: https://staging.flagsmith.com/api/v1/docs/\n","frontmatter":{"description":"Search the backend codebase for endpoint details"},"isInternal":false,"tokens":102,"sizeBytes":452},{"name":"check-staged.md","path":"frontend/.claude/commands/check-staged.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/check-staged.md","title":"Command: /check-staged","category":"command-prompt","format":"markdown","content":"---\ndescription: Run type checking and linting on staged files\n---\n\nRun TypeScript checking and linting on all currently staged files, similar to pre-commit hooks. Steps:\n1. Run `npm run check:staged` to typecheck and lint only staged files\n2. Report any type errors or linting issues found\n3. If errors exist, offer to fix them\n","frontmatter":{"description":"Run type checking and linting on staged files"},"isInternal":false,"tokens":77,"sizeBytes":329},{"name":"check.md","path":"frontend/.claude/commands/check.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/check.md","title":"Command: /check","category":"command-prompt","format":"markdown","content":"---\ndescription: Run type checking and linting\n---\n\nRun the following checks on the codebase:\n\n1. `npx lint-staged --allow-empty` - Fix linting issues on staged files only (same as git hook)\n\nReport any errors found and offer to fix them.\n","frontmatter":{"description":"Run type checking and linting"},"isInternal":false,"tokens":57,"sizeBytes":239},{"name":"context.md","path":"frontend/.claude/commands/context.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/context.md","title":"Command: /context","category":"command-prompt","format":"markdown","content":"---\ndescription: Load detailed context files for specific topics\n---\n\nAvailable context files in `.claude/context/`:\n\n1. **api-integration.md** - API integration workflow, Redux setup, cross-platform patterns\n2. **architecture.md** - Environment config, tech stack, additional rules\n3. **feature-flags/** - Flagsmith feature flags (usage + MCP workflows)\n4. **patterns/** - Code patterns (API, mobile)\n\nWhich context would you like to explore?\n","frontmatter":{"description":"Load detailed context files for specific topics"},"isInternal":false,"tokens":98,"sizeBytes":444},{"name":"e2e-create.md","path":"frontend/.claude/commands/e2e-create.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/e2e-create.md","title":"Command: /e2e-create","category":"command-prompt","format":"markdown","content":"# E2E Test Creator\n\nCreate a new E2E test following the existing patterns in the codebase.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Ask the user what to test\n- `$ARGUMENTS` = \"segment creation flow\" → Create a test for that feature\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, test structure, and debugging guides.\n\n## Workflow\n\n1. **Determine what to test:**\n   - If `$ARGUMENTS` is provided, use that as the test description\n   - Otherwise, ask the user what feature/page/flow to test\n\n2. **Determine if OSS or Enterprise:**\n   - Check if the feature exists in enterprise-only code paths\n   - Tag the test with `@oss` or `@enterprise` accordingly\n\n3. **Review existing patterns:**\n   - Read 2-3 similar test files from `frontend/e2e/tests/`\n   - Read `frontend/e2e/helpers.playwright.ts` for available utilities\n\n4. **Scan application code:**\n   - Find components being tested in `frontend/web/components/` or `frontend/common/`\n   - Add `data-test` attributes if missing\n\n5. **Create the test file:**\n   - Follow naming convention: `*-test.pw.ts` or `*-tests.pw.ts`\n   - Use helper functions from `helpers.playwright.ts`\n\n6. **Verify the test works:**\n   ```bash\n   SKIP_BUNDLE=1 E2E_CONCURRENCY=1 npm run test -- tests/new-test.pw.ts --quiet\n   ```\n   Run twice to check for flakiness. On failure, follow the analysis workflow in context/e2e.md.\n\n7. **Report what was created:**\n   - Test file path\n   - Any `data-test` attributes added\n   - Test stability results\n\n## Important Notes\n\n- Always use `data-test` attributes for selectors\n- Use existing helper functions instead of raw Playwright APIs\n- Tests should be independent and not rely on execution order\n","isInternal":false,"tokens":446,"sizeBytes":1753},{"name":"e2e-ee.md","path":"frontend/.claude/commands/e2e-ee.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/e2e-ee.md","title":"Command: /e2e-ee","category":"command-prompt","format":"markdown","content":"# E2E Enterprise Test Runner\n\nRun enterprise E2E tests (tagged with @enterprise) and report results.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Run tests once (default)\n- `$ARGUMENTS` = \"5\" → Run tests 5 times, stopping on first failure\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, failure analysis workflows, and fix patterns.\n\n## Run Command\n\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=5 npm run test -- --grep @enterprise --quiet\n```\n\n## Re-running Failed Enterprise Tests\n\nWhen re-running specific failed tests, include the grep flag:\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=1 npm run test -- tests/specific-test.pw.ts --grep @enterprise\n```\n\n## Workflow\n\n1. Run tests (one iteration at a time if multiple requested)\n2. On failure: follow the failure analysis workflow in context/e2e.md\n3. Report results\n","isInternal":false,"tokens":242,"sizeBytes":916},{"name":"e2e-oss.md","path":"frontend/.claude/commands/e2e-oss.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/e2e-oss.md","title":"Command: /e2e-oss","category":"command-prompt","format":"markdown","content":"# Command: /e2e-oss\n\nPath: `frontend/.claude/commands/e2e-oss.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/e2e-oss.md)","tokens":300,"sizeBytes":192},{"name":"e2e.md","path":"frontend/.claude/commands/e2e.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/e2e.md","title":"Command: /e2e","category":"command-prompt","format":"markdown","content":"# E2E Test Runner (All Tests)\n\nRun all E2E tests (both OSS and enterprise) and report results.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Run tests once (default)\n- `$ARGUMENTS` = \"5\" → Run tests 5 times, stopping on first failure\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, failure analysis workflows, and fix patterns.\n\n## Run Command\n\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=5 npm run test -- --grep \"@oss|@enterprise\" --quiet\n```\n\n## Workflow\n\n1. Run tests (one iteration at a time if multiple requested)\n2. On failure: follow the failure analysis workflow in context/e2e.md\n3. Report results with pass/fail counts for OSS and enterprise tests\n","isInternal":false,"tokens":197,"sizeBytes":747},{"name":"feature-flag.md","path":"frontend/.claude/commands/feature-flag.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/feature-flag.md","title":"Command: /feature-flag","category":"command-prompt","format":"markdown","content":"# Command: /feature-flag\n\nPath: `frontend/.claude/commands/feature-flag.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/feature-flag.md)","tokens":300,"sizeBytes":207},{"name":"find-usages.md","path":"frontend/.claude/commands/find-usages.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/find-usages.md","title":"Command: /find-usages","category":"command-prompt","format":"markdown","content":"# Command: /find-usages\n\nPath: `frontend/.claude/commands/find-usages.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/find-usages.md)","tokens":300,"sizeBytes":204},{"name":"pr-review.md","path":"frontend/.claude/commands/pr-review.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/pr-review.md","title":"Command: /pr-review","category":"command-prompt","format":"markdown","content":"# Command: /pr-review\n\nPath: `frontend/.claude/commands/pr-review.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/pr-review.md)","tokens":300,"sizeBytes":198},{"name":"ui-patterns.md","path":"frontend/.claude/commands/ui-patterns.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/ui-patterns.md","title":"Command: /ui-patterns","category":"command-prompt","format":"markdown","content":"# Command: /ui-patterns\n\nPath: `frontend/.claude/commands/ui-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/ui-patterns.md)","tokens":300,"sizeBytes":204},{"name":"unit-test.md","path":"frontend/.claude/commands/unit-test.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/unit-test.md","title":"Command: /unit-test","category":"command-prompt","format":"markdown","content":"# Command: /unit-test\n\nPath: `frontend/.claude/commands/unit-test.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/unit-test.md)","tokens":300,"sizeBytes":198},{"name":"visual-regression.md","path":"frontend/.claude/commands/visual-regression.md","rawUrl":"https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/visual-regression.md","title":"Command: /visual-regression","category":"command-prompt","format":"markdown","content":"# Command: /visual-regression\n\nPath: `frontend/.claude/commands/visual-regression.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/visual-regression.md)","tokens":300,"sizeBytes":222}],"systemPromptSnippet":"<yakaai_skills repo=\"Flagsmith/flagsmith\">\n<!-- File: AGENTS.md (Tokens: ~76 | Category: root-instruction) -->\nPrioritise @AGENTS.local.md, if present.\n\nUse British English.\n\n# Tasks\n\nInstall Git hooks: `make install-hooks`\nFor backend code, read @api/README.md\nFor frontend code, read @frontend/README.md\nFor docs.flagsmith.com source, read @docs/README.md\nFor MCP code, read @mcp/README.md\n\n<!-- File: frontend/AGENTS.md (Tokens: ~7 | Category: root-instruction) -->\nRead @CLAUDE.md\n\n<!-- File: CLAUDE.md (Tokens: ~5 | Category: claude-rule) -->\nRead @AGENTS.md\n\n<!-- File: frontend/CLAUDE.md (Tokens: ~810 | Category: claude-rule) -->\n# CLAUDE.md\n\n## Commands\n- `npm run dev` - Start dev server\n- `npm run typecheck` - Type checking\n\n## Structure\n- `/common` - Shared Redux/API (no web/mobile code)\n- `/web/components` - React components (includes `/web/components/pages/` for all page components)\n- `/web/components/pages/` - **All page components** (e.g., `FeaturesPage.js`, `ProjectSettingsPage.js`)\n- `/common/types/` - `requests.ts` and `responses.ts` for API types\n- Ignore: `ios/`, `android/`, `.net/`, `*.md.draft`\n\n## Rules\n1. **API Integration**: Use `npx ssg` CLI + check `../api` backend\n2. **Imports**: Use the `common/`, `components/`, `project/` aliases when the relative path would go up (`../`); use a relative path for same-folder or descendant imports. This is enforced by `@dword-design/import-alias/prefer-alias`, and `eslint --fix` will rewrite an alias back to relative inside its own alias root (e.g. `components/base/forms/X` becomes `./base/forms/X` in a file under `web/components/`).\n3. **State**: Redux Toolkit + RTK Query, store in `common/store.ts`\n4. **Feature Flags**: When user says \"create a feature flag\", you MUST: (1) Create it in Flagsmith using MCP tools (`mcp__flagsmith__create_feature`), (2) Implement code with `useFlags` hook. See `.claude/context/feature-flags/` for details\n5. **Linting**: ALWAYS run `npx eslint --fix <file>` on any files you modify\n6. **Type Enums**: Extract inline union types to named types (e.g., `type Status = 'A' | 'B'` instead of inline)\n7. **NO FETCH**: NEVER use `fetch()` directly - ALWAYS use RTK Query mutations/queries (inject endpoints into services in `common/services/`), see api-integration context\n8. **Component structure**: A component with nothing to keep beside it is a single `ComponentName.tsx`. It gets a folder once it has a co-located `ComponentName.scss`, sub-components, tests or hooks: `ComponentName/ComponentName.tsx` plus an `index.ts` re-exporting the default (and public types). Import via `components/.../ComponentName` either way, never the inner file, so promoting a file to a folder changes no imports. Keep files focused (~100 lines as a target); split by concern, not to hit a number. Data tables/constant maps are exempt.\n\n## Key Files\n- Store: `common/store.ts`\n- Base service: `common/service.ts`\n\n## Context Files\n\nThe `.claude/context/` directory contains **required patterns and standards** for this codebase. These are not optional suggestions - they document how things must be done in this project.\n\nFor detailed guidance on specific topics:\n- **Quick Start**: `.claude/context/quick-reference.md` - Common tasks, commands, patterns\n- **API Integration**: `.claude/context/api-integration.md` - Adding endpoints, RTK Query (required reading for API work)\n- **Backend**: `.claude/context/backend-integration.md` - Finding endpoints, backend structure\n- **UI Patterns**: `.claude/context/ui-patterns.md` - Tables, tabs, modals, confirmations (required reading for UI work)\n- **Feature Flags**: `.claude/context/feature-flags/` - Using Flagsmith flags (optional, only when requested)\n- **Code Patterns**: `.claude/context/patterns/` - Complete examples, best practices\n\n**Tip:** Start with `quick-reference.md` for common tasks and checklists.\n\n<!-- File: frontend/.claude/commands/api.md (Tokens: ~90 | Category: command-prompt) -->\n---\ndescription: Generate a new RTK Query API service\n---\n\n<!-- TODO: Update /api-types-sync once OpenAPI schema is ready -->\n\nGenerate a new API service. Follow these steps:\n\n1. Go through the process mentioned in `.claude/context/api-integration.md`\n2. If I haven't specified, attempt to find where I'd want to create this component in the frontend\n\nContext file: `.claude/context/api-integration.md`\n\n<!-- File: frontend/.claude/commands/backend.md (Tokens: ~102 | Category: command-prompt) -->\n---\ndescription: Search the backend codebase for endpoint details\n---\n\nSearch the `../api` codebase for the requested endpoint.\n\nLook for:\n1. Route definitions (URL path)\n2. HTTP method (GET, POST, PUT, DELETE)\n3. Request validation schema (request body/params types)\n4. Response structure (what data is returned)\n5. Authentication/authorization requirements\n\nIf the endpoint isn't found, check swagger docs: https://staging.flagsmith.com/api/v1/docs/\n\n<!-- File: frontend/.claude/commands/check-staged.md (Tokens: ~77 | Category: command-prompt) -->\n---\ndescription: Run type checking and linting on staged files\n---\n\nRun TypeScript checking and linting on all currently staged files, similar to pre-commit hooks. Steps:\n1. Run `npm run check:staged` to typecheck and lint only staged files\n2. Report any type errors or linting issues found\n3. If errors exist, offer to fix them\n\n<!-- File: frontend/.claude/commands/check.md (Tokens: ~57 | Category: command-prompt) -->\n---\ndescription: Run type checking and linting\n---\n\nRun the following checks on the codebase:\n\n1. `npx lint-staged --allow-empty` - Fix linting issues on staged files only (same as git hook)\n\nReport any errors found and offer to fix them.\n\n<!-- File: frontend/.claude/commands/context.md (Tokens: ~98 | Category: command-prompt) -->\n---\ndescription: Load detailed context files for specific topics\n---\n\nAvailable context files in `.claude/context/`:\n\n1. **api-integration.md** - API integration workflow, Redux setup, cross-platform patterns\n2. **architecture.md** - Environment config, tech stack, additional rules\n3. **feature-flags/** - Flagsmith feature flags (usage + MCP workflows)\n4. **patterns/** - Code patterns (API, mobile)\n\nWhich context would you like to explore?\n\n<!-- File: frontend/.claude/commands/e2e-create.md (Tokens: ~446 | Category: command-prompt) -->\n# E2E Test Creator\n\nCreate a new E2E test following the existing patterns in the codebase.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Ask the user what to test\n- `$ARGUMENTS` = \"segment creation flow\" → Create a test for that feature\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, test structure, and debugging guides.\n\n## Workflow\n\n1. **Determine what to test:**\n   - If `$ARGUMENTS` is provided, use that as the test description\n   - Otherwise, ask the user what feature/page/flow to test\n\n2. **Determine if OSS or Enterprise:**\n   - Check if the feature exists in enterprise-only code paths\n   - Tag the test with `@oss` or `@enterprise` accordingly\n\n3. **Review existing patterns:**\n   - Read 2-3 similar test files from `frontend/e2e/tests/`\n   - Read `frontend/e2e/helpers.playwright.ts` for available utilities\n\n4. **Scan application code:**\n   - Find components being tested in `frontend/web/components/` or `frontend/common/`\n   - Add `data-test` attributes if missing\n\n5. **Create the test file:**\n   - Follow naming convention: `*-test.pw.ts` or `*-tests.pw.ts`\n   - Use helper functions from `helpers.playwright.ts`\n\n6. **Verify the test works:**\n   ```bash\n   SKIP_BUNDLE=1 E2E_CONCURRENCY=1 npm run test -- tests/new-test.pw.ts --quiet\n   ```\n   Run twice to check for flakiness. On failure, follow the analysis workflow in context/e2e.md.\n\n7. **Report what was created:**\n   - Test file path\n   - Any `data-test` attributes added\n   - Test stability results\n\n## Important Notes\n\n- Always use `data-test` attributes for selectors\n- Use existing helper functions instead of raw Playwright APIs\n- Tests should be independent and not rely on execution order\n\n<!-- File: frontend/.claude/commands/e2e-ee.md (Tokens: ~242 | Category: command-prompt) -->\n# E2E Enterprise Test Runner\n\nRun enterprise E2E tests (tagged with @enterprise) and report results.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Run tests once (default)\n- `$ARGUMENTS` = \"5\" → Run tests 5 times, stopping on first failure\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, failure analysis workflows, and fix patterns.\n\n## Run Command\n\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=5 npm run test -- --grep @enterprise --quiet\n```\n\n## Re-running Failed Enterprise Tests\n\nWhen re-running specific failed tests, include the grep flag:\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=1 npm run test -- tests/specific-test.pw.ts --grep @enterprise\n```\n\n## Workflow\n\n1. Run tests (one iteration at a time if multiple requested)\n2. On failure: follow the failure analysis workflow in context/e2e.md\n3. Report results\n\n<!-- File: frontend/.claude/commands/e2e-oss.md (Tokens: ~300 | Category: command-prompt) -->\n# Command: /e2e-oss\n\nPath: `frontend/.claude/commands/e2e-oss.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/e2e-oss.md)\n\n<!-- File: frontend/.claude/commands/e2e.md (Tokens: ~197 | Category: command-prompt) -->\n# E2E Test Runner (All Tests)\n\nRun all E2E tests (both OSS and enterprise) and report results.\n\n## Arguments\n\n- `$ARGUMENTS` = \"\" → Run tests once (default)\n- `$ARGUMENTS` = \"5\" → Run tests 5 times, stopping on first failure\n\n## CRITICAL: Read Context First\n\n**You MUST read `.claude/context/e2e.md` before proceeding.** It contains essential configuration, failure analysis workflows, and fix patterns.\n\n## Run Command\n\n```bash\nE2E_RETRIES=0 SKIP_BUNDLE=1 E2E_CONCURRENCY=5 npm run test -- --grep \"@oss|@enterprise\" --quiet\n```\n\n## Workflow\n\n1. Run tests (one iteration at a time if multiple requested)\n2. On failure: follow the failure analysis workflow in context/e2e.md\n3. Report results with pass/fail counts for OSS and enterprise tests\n\n<!-- File: frontend/.claude/commands/feature-flag.md (Tokens: ~300 | Category: command-prompt) -->\n# Command: /feature-flag\n\nPath: `frontend/.claude/commands/feature-flag.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/feature-flag.md)\n\n<!-- File: frontend/.claude/commands/find-usages.md (Tokens: ~300 | Category: command-prompt) -->\n# Command: /find-usages\n\nPath: `frontend/.claude/commands/find-usages.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/find-usages.md)\n\n<!-- File: frontend/.claude/commands/pr-review.md (Tokens: ~300 | Category: command-prompt) -->\n# Command: /pr-review\n\nPath: `frontend/.claude/commands/pr-review.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/pr-review.md)\n\n<!-- File: frontend/.claude/commands/ui-patterns.md (Tokens: ~300 | Category: command-prompt) -->\n# Command: /ui-patterns\n\nPath: `frontend/.claude/commands/ui-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/ui-patterns.md)\n\n<!-- File: frontend/.claude/commands/unit-test.md (Tokens: ~300 | Category: command-prompt) -->\n# Command: /unit-test\n\nPath: `frontend/.claude/commands/unit-test.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/unit-test.md)\n\n<!-- File: frontend/.claude/commands/visual-regression.md (Tokens: ~300 | Category: command-prompt) -->\n# Command: /visual-regression\n\nPath: `frontend/.claude/commands/visual-regression.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Flagsmith/flagsmith/HEAD/frontend/.claude/commands/visual-regression.md)\n</yakaai_skills>"}