.cursor/skills/lyx-infra-expert/SKILL.md
Expert on Lyx infrastructure: Docker, Nginx, AWS App Runner, ECR, S3, IAM, CI/CD pipeline, deployment scripts. Use when working with Docker, AWS, CI configuration, or deployment issues.
npx skillsauth add imenesesl/lyx lyx-infra-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Lyx uses a single resource model: local and production environments use the same cloud infrastructure. There are no local databases or storage services. Everything points to AWS S3 and MongoDB Atlas.
ALWAYS verify before any AWS command:
lyx aws status
If expired → lyx aws login
| File | Purpose | Auto-loaded |
|------|---------|-------------|
| ~/.lyx-aws | Local AWS credentials | Yes, by all Lyx scripts |
| ~/.lyxrc | CLI login (Admin API token, server URL, accountId) | Yes, by lyx CLI |
| GitHub Secrets | CI/CD credentials | Yes, by GitHub Actions |
| Action | AWS creds needed? | File used |
|--------|-------------------|-----------|
| lyx deploy (MFE upload) | No | ~/.lyxrc (Admin API token) |
| bash scripts/platform.sh up | Yes | ~/.lyx-aws (for S3 + MongoDB) |
| bash scripts/deploy-aws.sh | Yes | ~/.lyx-aws |
| bash scripts/ensure-infra.sh | Yes | ~/.lyx-aws |
| aws apprunner list-services | Yes | ~/.lyx-aws |
| CI deploys | Yes | GitHub Secrets |
platform/docker-compose.yml — 4 services (all using cloud resources):
Requirements to start:
lyx aws login — AWS credentials in ~/.lyx-awsMONGO_URI set in platform/.envStart: bash scripts/platform.sh up
| Path | Backend |
|------|---------|
| / | 302 → /admin/ |
| /api/ | admin-api:4000 |
| /storage/ | ssr:4002 (fetches from S3) |
| /_assets/ | ssr:4002 (immutable cache) |
| /{accountId}/{slug} | ssr:4002 (streaming, no buffering) |
| /admin/ | admin-ui:4001 (WebSocket support) |
3 App Runner services + S3 + ECR + IAM:
lyx-production-admin-api (4000, instance role for S3)lyx-production-admin-ui (4001, no instance role)lyx-production-ssr (4002, instance role for S3)@aws-sdk/client-s3 with GetObjectCommand — authenticates via instance role@aws-sdk/client-s3 with PutObjectCommand — uploads via instance roleensure-infra.sh configures bucket policy as fallback| Variable | Required | Description |
|----------|----------|-------------|
| MONGO_URI | Yes | MongoDB Atlas connection string |
| S3_BUCKET | Yes | S3 bucket name for MFE bundles |
| AWS_REGION | Yes | AWS region (default: us-west-2) |
| JWT_SECRET | Yes | JWT signing secret |
| PORT | No | Server port (default: 4000) |
| CORS_ORIGIN | No | CORS origin (default: *) |
ci.yml)build-and-test — always runs (build 8 framework packages, lint 6, test 2)detect-changes — checks: manual trigger? < 3 services? first commit? CI/scripts changed? specific paths?setup-infra — ensure-infra.sh (idempotent: ECR repos, IAM roles, S3 bucket with public access config)deploy-* — ensure-service.sh (create or update App Runner)show-urls — list all servicesplatform.sh: Start/stop local Docker services. Auto-loads ~/.lyx-aws. Requires MONGO_URI in platform/.env.ensure-infra.sh: Creates ECR, IAM roles (lyx-apprunner-ecr, lyx-apprunner-instance), S3. Disables Block Public Access and sets bucket policy on creation. Uses ::group:: for GH Actions.ensure-service.sh: 5 args (name, image, port, env_json, needs_instance_role). Creates or updates.deploy-aws.sh: Full deploy with secrets, IAM, S3, ECR, build, push, App Runner. Auto-loads ~/.lyx-aws. Modes: deploy, update, status.lyx aws status before AWS commands. If expired, run lyx aws login.jq -nc --arg for secrets in env vars — never string interpolationscripts/iam-policy.json covers ECR, App Runner, IAM roles, S3, STSlyx-bundles-{accountId}-productionlyx-production-{service-name}NEEDS_INSTANCE_ROLE=true for S3 accesspnpm install and commit pnpm-lock.yaml after renaming directoriesdocs/errors.mddevelopment
# Lyx Testing Expert ## When to Use Use this skill when: - Writing or modifying Playwright E2E tests - Writing or modifying k6 performance tests - Debugging test failures - Adding test coverage for new features - Running the test suite locally or in CI - Understanding the test architecture ## Test Architecture Overview ### Playwright E2E Tests **Location**: `tests/e2e/` **Configuration**: `playwright.config.ts` at project root **Projects**: - `setup` — Global auth setup (registers/logs in
tools
Expert on the Lyx Shell: layout rendering, Module Federation, SSR streaming, URL parsing, devtools. Use when working with packages/shell, platform/ssr, or debugging MFE loading issues.
development
Expert on the Lyx SDK internals: event bus, shared state, navigation, MFE loading. Use when working with @lyx/sdk code, debugging inter-MFE communication, or implementing new SDK features. Knows all edge cases and internal behaviors.
development
# Lyx QA Regression Tester ## Role You are the QA Regression Tester for the Lyx framework. Your job is to **catch every bug before the user does**. You run after every feature implementation, before any commit or push. You are the last gate — nothing ships without your sign-off. ## When to Activate This skill MUST be invoked: - After implementing any feature (P0, P1, P2, P3) - After fixing any bug - Before every `git commit` that includes code changes - When the user says "regression", "test