Frameworki

Web components and Lit

Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component.

fe-web-componentslit, webc9 regułładowane zawsze: 76 tokenów; przy użyciu: 1077 tokenów; w referencjach na żądanie: 1699 tokenów.

Instalacja

init instaluje ten skill, gdy projekt używa: lit, webc. Wybierz agenta, aby zobaczyć, gdzie trafią jego pliki.

Agent
npx github:dawidolko/frontend-skills init

Bez --agents polecenie init rozpoznaje agentów po tym, co projekt już ma, a gdy nie znajdzie żadnego, pyta:

Po czym init rozpoznaje każdego z agentów (17)
AgentRozpoznawany po
Claude CodeCLAUDE.md .claude CLAUDE.local.md
OpenAI Codex.codex AGENTS.override.md
Cursor.cursor .cursorrules
GitHub Copilot.github/copilot-instructions.md .github/instructions .github/skills .github/prompts
Gemini CLIGEMINI.md .gemini
Antigravity CLI.agents/rules .agent/rules
Devin / Windsurf.devin .windsurf .windsurfrules
OpenCodeopencode.json opencode.jsonc .opencode
Cline.clinerules .cline
Zed.rules .zed
JetBrains Junie.junie
Kiro.kiro
Augment.augment .augment-guidelines
Trae.trae
Continue.continue
Amazon Q Developer.amazonq
Aider.aider.conf.yml CONVENTIONS.md

Gdzie trafia fe-web-components dla: Claude Code

  • .claude/skills/fe-web-components/SKILL.mdskill
  • .claude/skills/fe-web-components/references/web-components.mdskill
  • .claude/rules/fe-web-components.mdplik reguł
  • CLAUDE.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.claude/rules/fe-web-components.md
---
paths:
  - "**/*.js"
  - "**/*.ts"
  - "**/*.css"
  - "**/*.html"
---

# Web components and Lit (frontend-skills)

Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component.

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.claude/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: OpenAI Codex

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

OpenAI Codex nie ma plików reguł zawężonych do typów plików; czyta skille i blok instrukcji.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

AGENTS.md
## Front-end work (frontend-skills)

- Before front-end work, read `.frontend-skills/profile.json` (the stack) and `.frontend-skills/lessons.md` (confirmed conventions of this project; they win over any skill).
- Use the installed `fe-*` skill that matches the files you edit.
- After changing UI code, run `npx github:dawidolko/frontend-skills audit --changed --json` and fix findings at `serious` and above; `explain <rule id>` gives the reason, the source and the fix.
- Name rule ids (such as `a11y/img-alt`) in reviews and commit messages.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Cursor

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • .cursor/rules/fe-web-components.mdcplik reguł
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.cursor/rules/fe-web-components.mdc
---
description: Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component.
globs: **/*.js, **/*.ts, **/*.css, **/*.html
alwaysApply: false
---

# Web components and Lit (frontend-skills)

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.agents/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: GitHub Copilot

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • .github/instructions/fe-web-components.instructions.mdplik reguł
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.github/instructions/fe-web-components.instructions.md
---
applyTo: "**/*.js,**/*.ts,**/*.css,**/*.html"
description: "Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component."
---

# Web components and Lit (frontend-skills)

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.agents/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Gemini CLI

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • GEMINI.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Gemini CLI: Gemini CLI was replaced by Antigravity CLI for unpaid tiers on 2026-06-18; choose "antigravity" too if you use it.

Gemini CLI nie ma plików reguł zawężonych do typów plików; czyta skille i blok instrukcji.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

GEMINI.md
## Front-end work (frontend-skills)

- Before front-end work, read `.frontend-skills/profile.json` (the stack) and `.frontend-skills/lessons.md` (confirmed conventions of this project; they win over any skill).
- Use the installed `fe-*` skill that matches the files you edit.
- After changing UI code, run `npx github:dawidolko/frontend-skills audit --changed --json` and fix findings at `serious` and above; `explain <rule id>` gives the reason, the source and the fix.
- Name rule ids (such as `a11y/img-alt`) in reviews and commit messages.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Antigravity CLI

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • .agents/rules/fe-web-components.mdplik reguł
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.agents/rules/fe-web-components.md
---
trigger: glob
globs: "**/*.js, **/*.ts, **/*.css, **/*.html"
description: "Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component."
---

# Web components and Lit (frontend-skills)

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.agents/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Devin / Windsurf

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • .devin/rules/fe-web-components.mdplik reguł
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Devin / Windsurf: Devin CLI also reads .cursor/rules; with Cursor chosen too, the CLI sees both rule files of a skill.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.devin/rules/fe-web-components.md
---
trigger: glob
globs: "**/*.js,**/*.ts,**/*.css,**/*.html"
---

# Web components and Lit (frontend-skills)

Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component.

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.agents/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: OpenCode

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

OpenCode nie ma plików reguł zawężonych do typów plików; czyta skille i blok instrukcji.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

AGENTS.md
## Front-end work (frontend-skills)

- Before front-end work, read `.frontend-skills/profile.json` (the stack) and `.frontend-skills/lessons.md` (confirmed conventions of this project; they win over any skill).
- Use the installed `fe-*` skill that matches the files you edit.
- After changing UI code, run `npx github:dawidolko/frontend-skills audit --changed --json` and fix findings at `serious` and above; `explain <rule id>` gives the reason, the source and the fix.
- Name rule ids (such as `a11y/img-alt`) in reviews and commit messages.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Cline

  • .claude/skills/fe-web-components/SKILL.mdskill
  • .claude/skills/fe-web-components/references/web-components.mdskill
  • .clinerules/fe-web-components.mdplik reguł
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Cline: If .clinerules is a single file rather than a folder, Cline rule files are not written; skills still are.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.clinerules/fe-web-components.md
---
paths:
  - "**/*.js"
  - "**/*.ts"
  - "**/*.css"
  - "**/*.html"
---

# Web components and Lit (frontend-skills)

Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component.

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.claude/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Zed

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • CLAUDE.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Zed: Zed reads only the first instruction file of its list; the block is placed in that file.

Zed nie ma plików reguł zawężonych do typów plików; czyta skille i blok instrukcji.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

CLAUDE.md
## Front-end work (frontend-skills)

- Before front-end work, read `.frontend-skills/profile.json` (the stack) and `.frontend-skills/lessons.md` (confirmed conventions of this project; they win over any skill).
- Use the installed `fe-*` skill that matches the files you edit.
- After changing UI code, run `npx github:dawidolko/frontend-skills audit --changed --json` and fix findings at `serious` and above; `explain <rule id>` gives the reason, the source and the fix.
- Name rule ids (such as `a11y/img-alt`) in reviews and commit messages.
Prawdziwy plik

Gdzie trafia fe-web-components dla: JetBrains Junie

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

JetBrains Junie: Junie reads .agents/skills only in a trusted project.

JetBrains Junie nie ma plików reguł zawężonych do typów plików; czyta skille i blok instrukcji.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

AGENTS.md
## Front-end work (frontend-skills)

- Before front-end work, read `.frontend-skills/profile.json` (the stack) and `.frontend-skills/lessons.md` (confirmed conventions of this project; they win over any skill).
- Use the installed `fe-*` skill that matches the files you edit.
- After changing UI code, run `npx github:dawidolko/frontend-skills audit --changed --json` and fix findings at `serious` and above; `explain <rule id>` gives the reason, the source and the fix.
- Name rule ids (such as `a11y/img-alt`) in reviews and commit messages.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Kiro

  • .kiro/skills/fe-web-components/SKILL.mdskill
  • .kiro/skills/fe-web-components/references/web-components.mdskill
  • .kiro/steering/fe-web-components.mdplik reguł
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.kiro/steering/fe-web-components.md
---
inclusion: fileMatch
fileMatchPattern: ["**/*.js", "**/*.ts", "**/*.css", "**/*.html"]
---

# Web components and Lit (frontend-skills)

Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component.

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.kiro/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Augment

  • .agents/skills/fe-web-components/SKILL.mdskill
  • .agents/skills/fe-web-components/references/web-components.mdskill
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Augment nie ma plików reguł zawężonych do typów plików; czyta skille i blok instrukcji.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

AGENTS.md
## Front-end work (frontend-skills)

- Before front-end work, read `.frontend-skills/profile.json` (the stack) and `.frontend-skills/lessons.md` (confirmed conventions of this project; they win over any skill).
- Use the installed `fe-*` skill that matches the files you edit.
- After changing UI code, run `npx github:dawidolko/frontend-skills audit --changed --json` and fix findings at `serious` and above; `explain <rule id>` gives the reason, the source and the fix.
- Name rule ids (such as `a11y/img-alt`) in reviews and commit messages.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Trae

  • .trae/skills/fe-web-components/SKILL.mdskill
  • .trae/skills/fe-web-components/references/web-components.mdskill
  • .trae/rules/fe-web-components.mdplik reguł
  • AGENTS.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Trae: Trae reads AGENTS.md only after it is enabled in its settings.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.trae/rules/fe-web-components.md
---
description: "Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component."
globs: **/*.js,**/*.ts,**/*.css,**/*.html
alwaysApply: false
---

# Web components and Lit (frontend-skills)

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.trae/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Continue

  • .frontend-skills/skills/fe-web-components/SKILL.mdskill
  • .frontend-skills/skills/fe-web-components/references/web-components.mdskill
  • .continue/rules/fe-web-components.mdplik reguł

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.continue/rules/fe-web-components.md
---
name: "Web components and Lit"
description: "Writes and reviews custom elements, plain or with Lit 3 - names, lifecycle, attributes and properties, shadow DOM styling, events, form-associated controls with ElementInternals, accessibility across the shadow boundary. Use when defining a custom element, writing a LitElement, wrapping a native control in shadow DOM, or asked to review a web component."
globs: ["**/*.js", "**/*.ts", "**/*.css", "**/*.html"]
alwaysApply: false
---

# Web components and Lit (frontend-skills)

- Name elements lowercase with a hyphen and a project prefix (`acme-date-picker`) (webc/valid-name).
- The constructor calls `super()` and never reads or adds attributes or children; do that in `connectedCallback` (webc/constructor-no-attributes).
- Next to `:host { display: … }` write `:host([hidden]) { display: none }` (webc/host-hidden).
- Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use `accessor` (webc/lit-class-fields).
- Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
- `unsafeHTML`, `unsafeSVG` and `unsafeStatic` only get constants or sanitized strings (webc/lit-unsafe-html).
- Build autonomous elements around native ones; no `is=` built-ins, which Safari lacks (webc/no-customized-builtins).
- Custom form controls are form-associated and report value and validity through `ElementInternals` (webc/form-associated).
- Keep `for` and `aria-*` id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
- Remove global listeners, timers and observers in `disconnectedCallback` (js/listener-cleanup).
- Inside the shadow root use real `<button>`, `<a>` and `<input>`, not `div` with `role` (a11y/no-click-on-static).

Before larger changes, read the full skill: `.frontend-skills/skills/fe-web-components/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Amazon Q Developer

  • .frontend-skills/skills/fe-web-components/SKILL.mdskill
  • .frontend-skills/skills/fe-web-components/references/web-components.mdskill
  • .amazonq/rules/frontend-skills.mdblok instrukcji

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Amazon Q Developer: Amazon Q Developer IDE plugins reach end of support on 2027-04-30; AWS points to Kiro.

Amazon Q Developer nie ma plików reguł zawężonych do typów plików; czyta skille i blok instrukcji.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

.amazonq/rules/frontend-skills.md
## Front-end work (frontend-skills)

- Before front-end work, read `.frontend-skills/profile.json` (the stack) and `.frontend-skills/lessons.md` (confirmed conventions of this project; they win over any skill).
- Use the installed `fe-*` skill that matches the files you edit.
- After changing UI code, run `npx github:dawidolko/frontend-skills audit --changed --json` and fix findings at `serious` and above; `explain <rule id>` gives the reason, the source and the fix.
- Name rule ids (such as `a11y/img-alt`) in reviews and commit messages.

### Skills

- `fe-web-components` (Web components and Lit): when editing `**/*.js`, `**/*.ts`, `**/*.css`, `**/*.html`, first read `.frontend-skills/skills/fe-web-components/SKILL.md`.
Prawdziwy plik

Gdzie trafia fe-web-components dla: Aider

  • .frontend-skills/skills/fe-web-components/SKILL.mdskill
  • .frontend-skills/skills/fe-web-components/references/web-components.mdskill
  • CONVENTIONS.mdblok instrukcji
  • .aider.conf.ymlkonfiguracja

Dla każdego agenta także: .frontend-skills/profile.json, .frontend-skills/lessons.md i .frontend-skills/install.json.

Aider nie ma plików reguł zawężonych do typów plików; czyta skille i blok instrukcji.

Zaplanowane przez sam instalator dla przykładowego projektu React z repozytorium.

CONVENTIONS.md
## Front-end work (frontend-skills)

- Before front-end work, read `.frontend-skills/profile.json` (the stack) and `.frontend-skills/lessons.md` (confirmed conventions of this project; they win over any skill).
- Use the installed `fe-*` skill that matches the files you edit.
- After changing UI code, run `npx github:dawidolko/frontend-skills audit --changed --json` and fix findings at `serious` and above; `explain <rule id>` gives the reason, the source and the fix.
- Name rule ids (such as `a11y/img-alt`) in reviews and commit messages.

### Skills

- `fe-web-components` (Web components and Lit): when editing `**/*.js`, `**/*.ts`, `**/*.css`, `**/*.html`, first read `.frontend-skills/skills/fe-web-components/SKILL.md`.
Prawdziwy plik

Jak go używać

Po instalacji agent sam ładuje skill, gdy zadanie pasuje do jego opisu. Możesz też poprosić o niego własnymi słowami, na przykład:

A żeby sprawdzić i poprawić pracę:

  • Użyj skilla fe-web-components na tym pliku.
  • Uruchom audyt front-endu na moich zmianach i popraw wszystko, co poważne.
  • Wyjaśnij webc/valid-name i popraw to tutaj.

Reguły, których uczy

  • webc/valid-name

    A custom element name is lowercase, starts with a letter, contains a hyphen and is not a reserved name, or define() throws.

    poważnastatyczne

  • webc/constructor-no-attributes

    A custom element constructor never reads or adds attributes or children; do that in connectedCallback.

    poważnastatyczne

  • webc/host-hidden

    Shadow styles that give :host a display also add :host([hidden]) { display none }, or the hidden attribute stops working.

    umiarkowanastatyczne

  • webc/lit-class-fields

    In JavaScript, a Lit reactive property is never also declared as a class field; the field hides Lit's accessor and updates stop.

    poważnastatyczne

  • webc/lit-immutable-updates

    A Lit reactive array is replaced, not mutated in place (push, splice, sort), unless requestUpdate() follows.

    umiarkowanastatyczne

  • webc/lit-unsafe-html

    Lit's unsafeHTML, unsafeSVG and unsafeStatic only receive strings the developer wrote or sanitized, never data.

    poważnastatyczne

  • webc/no-customized-builtins

    Build autonomous custom elements that wrap a native element; do not extend built-ins with is=, which Safari does not support.

    umiarkowanastatyczne

  • webc/form-associated

    A custom form control is form-associated (formAssociated and attachInternals) and reports its value and validity to the form.

    poważnaręczne

  • webc/aria-idrefs-same-tree

    id references (for, aria-labelledby, aria-describedby, aria-controls) point at an element in the same DOM tree, not across a shadow root.

    poważnaręczneWCAG 1.3.1, 4.1.2

Skrót reguł

Ta część jest kopiowana do zawężonego pliku reguł każdego agenta, więc musi być zrozumiała sama w sobie:

  • Name elements lowercase with a hyphen and a project prefix (acme-date-picker) (webc/valid-name).
  • The constructor calls super() and never reads or adds attributes or children; do that in connectedCallback (webc/constructor-no-attributes).
  • Next to :host { display: … } write :host([hidden]) { display: none } (webc/host-hidden).
  • Never declare a Lit reactive property as a JavaScript class field; set it in the constructor or use accessor (webc/lit-class-fields).
  • Replace reactive arrays and objects instead of mutating them (webc/lit-immutable-updates).
  • unsafeHTML, unsafeSVG and unsafeStatic only get constants or sanitized strings (webc/lit-unsafe-html).
  • Build autonomous elements around native ones; no is= built-ins, which Safari lacks (webc/no-customized-builtins).
  • Custom form controls are form-associated and report value and validity through ElementInternals (webc/form-associated).
  • Keep for and aria-* id references inside one tree; they do not cross a shadow root (webc/aria-idrefs-same-tree).
  • Remove global listeners, timers and observers in disconnectedCallback (js/listener-cleanup).
  • Inside the shadow root use real <button>, <a> and <input>, not div with role (a11y/no-click-on-static).

Kroki, które wykonuje agent

  1. Find how components are built: extends LitElement and lit in package.json, or extends HTMLElement with customElements.define. In TypeScript with Lit decorators check useDefineForClassFields: false in tsconfig.json, or use accessor on decorated fields (standard decorators).
  2. Attributes for strings, numbers and booleans (reflect only what styling needs); properties for objects and arrays, never reflected. List watched attributes in static observedAttributes.
  3. Set default semantics with this.internals = this.attachInternals(): internals.role, internals.ariaExpanded, custom states with internals.states.add('open') and :state(open), instead of adding attributes to the host.
  4. Dispatch events for changes the user caused: new CustomEvent('acme-change', { detail, bubbles: true, composed: true }) when listeners outside other shadow roots must hear them.
  5. Host wrapping one control: delegatesFocus: true (Lit: static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }).
  6. Content that must show before JavaScript (LCP, search) is server-rendered with declarative shadow DOM (<template shadowrootmode="open">); Lit SSR is still a Labs package.

Jak agent sprawdza swoją pracę

  • npx github:dawidolko/frontend-skills audit --changed reports invalid names, constructors that touch the host, :host without [hidden], Lit class-field shadowing, in-place array mutation, unsafeHTML with data and is= built-ins. Files in .ts are not read yet; review them by hand.
  • Run ESLint with eslint-plugin-lit and use the lit-plugin editor plugin for template type checks.
  • Create the element with document.createElement('acme-x') in a test (catches constructor errors), test the form with and without the element, and check the accessibility tree: tools do not follow references across shadow roots reliably.

Sprawdzane audytem

Testy statyczne tych reguł działają w audit; to prawdziwa sesja na przykładowym projekcie:

Nagranie terminala: audit wypisuje znaleziska według wagi z identyfikatorami reguł i miejscem plik:linia i kończy się błędem od progu serious.
audit: liczby według wagi, każda reguła z pierwszym miejscem, kod wyjścia.

Pliki referencyjne