
experience-lwc-rtl-validate
Use this skill to review a Lightning Web Component (.html, .js, .css files) for right-to-left (RTL) internationalization correctness, producing a finding list with code-level fixes covering CSS logical properties, bidirectional text handling, keyboard semantics, and RTL-aware SLDS class usage. TRIGGER when the user says "review this LWC for RTL", "audit i18n compliance", "fix bidirectional text rendering", "replace left/right CSS with logical properties", "check RTL layout issues", "verify SLDS RTL classes", "review my component for Arabic/Hebrew layout", "ensure this LWC works in RTL locales", or "check bidi text handling". DO NOT TRIGGER when the user is building a new LWC (use experience-lwc-generate), refactoring SLDS classes themselves (use design-systems-slds-apply or design-systems-slds2-migrate), or performing accessibility/security review.
- Installs
- 2.3K
- Last 24h
- +8
- Trending rank
- #9668
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/forcedotcom/sf-skills --skill experience-lwc-rtl-validate- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads experience-lwc-rtl-validate automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Reviewing LWC RTL
Run a structured right-to-left (RTL) internationalization compliance pass over a Lightning Web Component, producing a report of issues found and code-level fixes to bring the component into compliance with Salesforce RTL guidelines.
When to Use
- The user asks for an "RTL review", "i18n check", "RTL compliance pass", or "RTL audit" on a specific LWC.
- Preparing a component for release in RTL locales (Arabic, Hebrew, Farsi, Urdu).
- Investigating layout defects reported in RTL environments.
- Verifying SLDS class usage after a CSS refactor.
Do NOT use this skill for:
- Building new components (use
experience-lwc-generate). - Modifying SLDS classes themselves (use
design-systems-slds-applyordesign-systems-slds2-migrate). - Accessibility or security review — run those as separate passes with the relevant tooling.
- Gating a fix behind a feature flag (apply feature-flag gating after fixes land).
Prerequisites
- Component path (LWC bundle under
modules/…). - Access to the component's HTML templates, JS/TS, and CSS.
Knowledge Base
The reference is the source of truth. Do not summarize from memory — open the reference, apply the guidelines, and cite the specific section you used in the report.
- RTL internationalization: RTL Expert
Workflow
Step 1 — Scope the review
Collect the component path and identify the files to review: .html, .js/.ts, .css, and any child components owned by the same team that are invoked from the target.
Note any existing feature-flag gates (e.g., Aura.org.rtlPhase1FixEnabled) — findings that require code changes must respect them.
Step 2 — Read the knowledge base
Read RTL Expert top-to-bottom before judging. It enumerates the physical-to-logical property mappings, bidirectional text handling patterns, and — critically — the SLDS constraints that override generic RTL advice.
Step 3 — CSS inspection
Run the deterministic scanner over every .css file in the bundle. The scanner matches CSS declarations only — never SLDS class names in HTML class="…" attributes (see Step 5). Inline style="…" attributes must be scanned separately (either by extracting them into a temp file or by inspecting the HTML by hand and applying the same rules).
"<skill_dir>/scripts/scan-rtl-css.sh" <cssFile1> [<cssFile2> ...]
Each output line has the shape <file>:<line>: <property>: <value> -> <logical-property>: <logical-value>. The scanner tokenizes declarations (splits on ; inside {…}) so minified multi-declaration lines produce one finding per physical declaration and selector names are never rewritten. Translate each line into a Step 6 bullet (<file>:<line> — <pattern> → <logical property> plus a one-sentence Fix). Empty output IS a valid result — record it as "No issues found." in the report.
Scanner-recognised patterns (kept in sync with the script's regex — do not add rules here without also updating scan-rtl-css.sh):
left/right→inset-inline-start/inset-inline-endmargin-left/margin-right→margin-inline-start/margin-inline-endpadding-left/padding-right→padding-inline-start/padding-inline-endtext-align: left/right→text-align: start/endborder-left-*/border-right-*→border-inline-start-*/border-inline-end-*float: left/float: right→float: inline-start/float: inline-end(or remove and use flex/grid)transform: translateX(...)— flagged; sign-flip or use a logical alternative
border-radius with explicit corners is not scanned automatically — inspect corner shorthand by hand and translate to the logical corner variants.
Step 4 — HTML / JS inspection
Walk templates and JS for:
- Icon flipping hints — flag only icons with directional semantics that appear in plain HTML
<img>/ inline SVG / raw Unicode / background-image CSS. Do NOT flag<lightning-icon>in LWC templates (including directional utility names likeutility:chevronright,utility:chevronleft,utility:back,utility:forward);lightning-iconrenders through the Lightning icon service, which mirrors directional utility icons automatically in RTL locales. Treat it the same way you treat SLDS utility classes. dirattribute usage — confirm it's sourced from locale, not hardcoded.- Keyboard arrow-key semantics — Left/Right arrow handlers should swap in RTL where navigation is directional (tab bars, sliders, tree expand/collapse).
- Directional Unicode controls — ensure user-generated text is not stripped of RLM/LRM markers when rendered.
- Inline
style="…"with physical properties — same rules as Step 3.
Step 5 — SLDS constraints
SLDS class handling is the highest-priority RTL rule. When a rule below says "do NOT flag", that class must not appear as a finding in the report — not as an issue, not as a "fix", not as a rename suggestion.
- SLDS utility classes with
_left/_rightsuffixes are RTL-aware and MUST NOT be flagged. They already mirror automatically in RTL under the hood — this includesslds-text-align_right,slds-text-align_left,slds-m-left_*,slds-m-right_*,slds-p-left_*,slds-p-right_*,slds-float_left,slds-float_right,slds-border_left,slds-border_right, and the rest of the_left/_rightutility family. Leave them exactly as written. _start/_endvariants of SLDS classes DO NOT EXIST. Never renameslds-*_right→slds-*_endorslds-*_left→slds-*_start. There is no such class; the rename would break the stylesheet. If you are tempted to "fix" an SLDS utility class by adding_start/_end, STOP — the correct action is to leave the class alone (see rule 1).- Never modify, rename, or remove any
slds-*class. SLDS ships RTL-aware stylesheets; altering classes breaks the contract. - If custom CSS duplicates what an SLDS class already handles, the fix is removal — not conversion. Delete the redundant custom rule; leave the SLDS class alone. Do NOT convert the removed property to its logical equivalent, and do NOT offer removal + conversion as two alternatives; there is one fix, and it is deletion. Example:
float: rightin a.cssfile next toclass="slds-button__icon_right"in the template — delete the entire.custom-icon { float: right }rule. Do not "also suggestfloat: inline-end" — that would be wrong; the SLDS class already handles placement. - If an SLDS class has an RTL gap, add complementary custom CSS rather than altering the SLDS class.
Concrete negative example — a template with <span class="slds-text-align_right slds-m-right_small">…</span> alongside a custom padding-left: 4px in the component's CSS: the ONLY finding is the CSS padding-left (Step 3). The two slds-*_right classes are not findings and must not appear in the report.
Step 6 — Produce the report
Write <outputDir>/rtl-review.md in this exact shape (blank line after each ## heading; every summary sentence ends with a period):
## RTL
- <file>:<line> — <physical pattern> → <logical property / SLDS class>
Fix: <one-sentence explanation>; applied: yes/no
- <file>:<line> — <physical pattern> → <logical property / SLDS class>
Fix: <one-sentence explanation>; applied: yes/no
## Summary
- <n> issues found; <m> fixed; <k> deferred (with reason).
- <one-sentence overview of what was found and why the remaining items are correct or deferred>.
- Cite: RTL Expert — <section title>.
Populate the ## RTL bullets from the scan-rtl-css.sh output for CSS findings, and append hand-authored bullets in the same shape for the Step 4 HTML/JS findings. When there are no findings, emit the single bullet - No issues found. under ## RTL and a Summary that reports 0 issues found; 0 fixed; 0 deferred. plus a one-sentence overview and citation.
Step 7 — Apply fixes
For each accepted finding:
- Edit the component files (CSS, HTML, JS/TS) to apply the fix.
- Preserve existing correct behavior and existing feature-flag gates. If a gate is already configured (e.g.,
Aura.org.rtlPhase1FixEnabled), leave it untouched. Only when the caller has explicitly required a phased rollout for a new fix, wrap that fix behind a feature flag; otherwise apply the fix directly. - Do NOT remove or rename SLDS classes.
- Do NOT silently delete old code — preserve the original path where a gate is required.
Step 8 — Verify
- Re-run the review against the updated files; every fixed finding must no longer appear.
- Run Jest tests and any component-level RTL visual tests.
Cross-References
- Related skills:
design-systems-slds-apply— for SLDS class-level changes beyond custom CSS cleanup.design-systems-slds2-migrate— when RTL cleanup surfaces classes that need SLDS2 migration first.experience-lwc-generate— when the review surfaces a need to regenerate the component rather than patch it.- Accessibility (WCAG 2.2) and security (LWS + Product Security) reviews are separate passes — run them with the appropriate tooling for each, not this skill.
- Feature-flag gating is out of scope for this skill; apply it separately only when the caller has explicitly required a phased rollout (see Step 7).
Verification
- All RTL rules are green on the updated component (re-run
scripts/scan-rtl-css.shagainst every CSS file in the bundle — it must return empty for every fully-applied finding). - No SLDS class was modified, renamed, or removed.
- Every finding has either been applied or has an explicit deferred note with a reason.
- The
rtl-review.mdmatches the two-section shape defined in Step 6 (blank line after each##; period-terminated summary sentences).
FAQ
What does the experience-lwc-rtl-validate skill do?
Use this skill to review a Lightning Web Component (.html, .js, .css files) for right-to-left (RTL) internationalization correctness, producing a finding list with code-level fixes covering CSS logical properties, bidirectional text handling, keyboard semantics, and RTL-aware SLDS class usage. TRIGGER when the user says "review this LWC for RTL", "audit i18n compliance", "fix bidirectional text rendering", "replace left/right CSS with logical properties", "check RTL layout issues", "verify SLDS RTL classes", "review my component for Arabic/Hebrew layout", "ensure this LWC works in RTL locales", or "check bidi text handling". DO NOT TRIGGER when the user is building a new LWC (use experience-lwc-generate), refactoring SLDS classes themselves (use design-systems-slds-apply or design-systems-slds2-migrate), or performing accessibility/security review.
How do I install experience-lwc-rtl-validate?
Run npx skills add https://github.com/forcedotcom/sf-skills --skill experience-lwc-rtl-validate in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/experience-lwc-rtl-validate/ (personal) or .claude/skills/experience-lwc-rtl-validate/ (project).
Which AI agents can use experience-lwc-rtl-validate?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is experience-lwc-rtl-validate safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains experience-lwc-rtl-validate?
It is published by forcedotcom in forcedotcom/sf-skills. It has 2,318 recorded installs.
More from forcedotcom/sf-skills
platform-apex-generate
forcedotcom/sf-skills
Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex.
platform-apex-test-generate
forcedotcom/sf-skills
Use to generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking, assertions, and disciplined test-fix loops. Use when creating Apex test classes (for triggers, services, controllers, batch jobs, queueables, and callouts), improving coverage, debugging or fixing failing Apex tests, or running test/coverage analysis. Triggers on Test.cls files, sf apex run test, coverage reports. Do NOT trigger for production Apex (use platform-apex-generate) or Jest/LWC tests.
platform-apex-test-run
forcedotcom/sf-skills
Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user runs Apex tests, checks code coverage, fixes failing tests, or touches Test.cls / Test.cls files. DO NOT TRIGGER when writing Apex production code (use platform-apex-generate), Agentforce agent testing (use agentforce-test), or Jest/LWC tests (use experience-lwc-generate).
platform-apex-logs-debug
forcedotcom/sf-skills
Salesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use platform-apex-test-run), generating or fixing Apex code (use platform-apex-generate), or Agentforce session tracing (use agentforce-observe).
platform-soql-query
forcedotcom/sf-skills
Use when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan/selectivity analysis, and performance or safety improvements. TRIGGER when the user writes, optimizes, or debugs SOQL/SOSL, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER for bulk data operations (use platform-data-manage), Apex DML logic (use platform-apex-generate), or report/dashboard queries.
platform-metadata-deploy
forcedotcom/sf-skills
Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, validates a deploy or does a dry-run, deploys to a Production org, quick-deploys a validated job ID, ships/promotes to prod, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex code, building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate), deleting metadata from an org (use platform-destructive-deploy), or querying org data (use platform-data-manage).
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.