Jak to działa
Dwie rzeczy w jednym repozytorium: słownik (skille, które mówią agentowi, jak pisać kod front-endu, oraz reguły ze stałymi identyfikatorami) i polecenie, które dopasowuje słownik do konkretnego projektu.
init na przykładowym projekcie: wykryty stack, zaplanowane skille i pliki, pierwszy audyt.Profil projektu
init i learn czytają projekt w jednym przebiegu, bez sieci: pliki package.json (oraz workspace'y w monorepo), pliki lock, konfiguracje takie jak next.config.*, angular.json czy tailwind.config.* i zainstalowane wersje z node_modules. Folder bez package.json, w którym są pliki HTML, CSS i JavaScript, to zwykła strona. Wynikiem jest .frontend-skills/profile.json, commitowany razem z projektem:
{
"version": 1,
"packageManager": "pnpm",
"projects": [
{
"path": "apps/web",
"frameworks": { "next": "16.4.0", "react": "19.3.0" },
"typescript": "7.0.0",
"styling": ["tailwind"],
"testing": ["vitest", "playwright"]
}
],
"stack": ["web", "react", "next", "typescript", "tailwind", "vitest", "playwright"],
"helpers": {
"rem-function": { "name": "rem-calc", "call": "rem-calc(16px)", "file": "src/styles/_functions.scss" }
},
"agents": ["claude", "cursor"],
"skills": ["fe-html", "fe-react", "fe-a11y-forms"],
"audit": { "failOn": "serious", "ignore": [], "exclude": [] }
}stack decyduje, które skille zostaną zainstalowane: skill trafia do projektu, gdy profil ma choć jeden z wymaganych przez niego kluczy. Obiekt audit należy do Ciebie; learn i update go nie zmieniają.
Własne narzędzia Twojego projektu
Reguły trzymają się konwencji projektu, jeśli ją ma. Profil zapisuje takie narzędzia jak funkcja px→rem, generowane klasy ikon, sprite SVG, design tokeny albo zestaw zmiennych CSS, a reguły, które od nich zależą, podają Twoje narzędzie: „pisz rozmiary przez rem-calc(16px)” zamiast ogólnej wskazówki. Możesz poprawić albo dopisać narzędzie w profilu; Twoje wpisy przetrwają learn i update.
Pliki dla każdego agenta
Skill jest pisany raz, jako folder Agent Skills (SKILL.md, references/, scripts/). Każdy agent ma adapter, który wie, gdzie ten agent szuka plików i w jakim formacie. Nikt nie edytuje wygenerowanych plików; update zapisuje je od nowa, a uninstall usuwa.
| Agent | Czytane foldery skilli | Pliki reguł zawężone do typów plików | Instrukcje ładowane zawsze |
|---|---|---|---|
| Claude Code | .claude/skills/ | .claude/rules/<skill>.md | AGENTS.md * |
| OpenAI Codex | .agents/skills/ | — | AGENTS.md |
| Cursor | .agents/skills/ .cursor/skills/ .claude/skills/ .codex/skills/ | .cursor/rules/<skill>.mdc | AGENTS.md |
| GitHub Copilot | .agents/skills/ .github/skills/ .claude/skills/ | .github/instructions/<skill>.instructions.md | AGENTS.md * |
| Gemini CLI | .agents/skills/ .gemini/skills/ | — | GEMINI.md |
| Antigravity CLI | .agents/skills/ | .agents/rules/<skill>.md | AGENTS.md |
| Devin / Windsurf | .agents/skills/ .devin/skills/ .windsurf/skills/ .claude/skills/ .github/skills/ .kiro/skills/ .cursor/skills/ .codex/skills/ | .devin/rules/<skill>.md | AGENTS.md |
| OpenCode | .agents/skills/ .opencode/skills/ .claude/skills/ | — | AGENTS.md |
| Cline | .claude/skills/ .cline/skills/ .clinerules/skills/ | .clinerules/<skill>.md | AGENTS.md |
| Zed | .agents/skills/ | — | AGENTS.md * |
| JetBrains Junie | .agents/skills/ .junie/skills/ | — | AGENTS.md * |
| Kiro | .kiro/skills/ | .kiro/steering/<skill>.md | AGENTS.md |
| Augment | .agents/skills/ .augment/skills/ .claude/skills/ | — | AGENTS.md |
| Trae | .trae/skills/ | .trae/rules/<skill>.md | AGENTS.md |
| Continue | — | .continue/rules/<skill>.md | — |
| Amazon Q Developer | — | — | .amazonq/rules/frontend-skills.md |
| Aider | — | — | CONVENTIONS.md |
* zależy od plików, które projekt już ma (na przykład istniejący CLAUDE.md).
Instalacja dla Twojego agenta
npx github:dawidolko/frontend-skills init Ten sposób nie był jeszcze testowany. npx i pnpm dlx są przetestowane; jeśli ten zawiedzie, użyj jednego z nich.
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)
| Agent | Rozpoznawany po |
|---|---|
| Claude Code | CLAUDE.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 CLI | GEMINI.md .gemini |
| Antigravity CLI | .agents/rules .agent/rules |
| Devin / Windsurf | .devin .windsurf .windsurfrules |
| OpenCode | opencode.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 |
Co trafia gdzie dla: Claude Code
.claude/skills/fe-react/SKILL.mdskill.claude/skills/fe-react/references/react.mdskill.claude/rules/fe-react.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.
---
paths:
- "**/*.jsx"
- "**/*.tsx"
---
# React components (frontend-skills)
Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked "review this React code".
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.claude/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: OpenAI Codex
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskillAGENTS.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.
## 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.Co trafia gdzie dla: Cursor
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskill.cursor/rules/fe-react.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.
---
description: Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked "review this React code".
globs: **/*.jsx, **/*.tsx
alwaysApply: false
---
# React components (frontend-skills)
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.agents/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: GitHub Copilot
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskill.github/instructions/fe-react.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.
---
applyTo: "**/*.jsx,**/*.tsx"
description: "Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked \"review this React code\"."
---
# React components (frontend-skills)
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.agents/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: Gemini CLI
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskillGEMINI.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.
## 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.Co trafia gdzie dla: Antigravity CLI
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskill.agents/rules/fe-react.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.
---
trigger: glob
globs: "**/*.jsx, **/*.tsx"
description: "Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked \"review this React code\"."
---
# React components (frontend-skills)
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.agents/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: Devin / Windsurf
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskill.devin/rules/fe-react.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.
---
trigger: glob
globs: "**/*.jsx,**/*.tsx"
---
# React components (frontend-skills)
Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked "review this React code".
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.agents/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: OpenCode
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskillAGENTS.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.
## 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.Co trafia gdzie dla: Cline
.claude/skills/fe-react/SKILL.mdskill.claude/skills/fe-react/references/react.mdskill.clinerules/fe-react.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.
---
paths:
- "**/*.jsx"
- "**/*.tsx"
---
# React components (frontend-skills)
Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked "review this React code".
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.claude/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: Zed
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskillCLAUDE.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.
## 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.Co trafia gdzie dla: JetBrains Junie
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskillAGENTS.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.
## 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.Co trafia gdzie dla: Kiro
.kiro/skills/fe-react/SKILL.mdskill.kiro/skills/fe-react/references/react.mdskill.kiro/steering/fe-react.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.
---
inclusion: fileMatch
fileMatchPattern: ["**/*.jsx", "**/*.tsx"]
---
# React components (frontend-skills)
Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked "review this React code".
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.kiro/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: Augment
.agents/skills/fe-react/SKILL.mdskill.agents/skills/fe-react/references/react.mdskillAGENTS.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.
## 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.Co trafia gdzie dla: Trae
.trae/skills/fe-react/SKILL.mdskill.trae/skills/fe-react/references/react.mdskill.trae/rules/fe-react.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.
---
description: "Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked \"review this React code\"."
globs: **/*.jsx,**/*.tsx
alwaysApply: false
---
# React components (frontend-skills)
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.trae/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: Continue
.frontend-skills/skills/fe-react/SKILL.mdskill.frontend-skills/skills/fe-react/references/react.mdskill.continue/rules/fe-react.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.
---
name: "React components"
description: "Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked \"review this React code\"."
globs: ["**/*.jsx", "**/*.tsx"]
alwaysApply: false
---
# React components (frontend-skills)
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.frontend-skills/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.Co trafia gdzie dla: Amazon Q Developer
.frontend-skills/skills/fe-react/SKILL.mdskill.frontend-skills/skills/fe-react/references/react.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.
## 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-react` (React components): when editing `**/*.jsx`, `**/*.tsx`, first read `.frontend-skills/skills/fe-react/SKILL.md`.Co trafia gdzie dla: Aider
.frontend-skills/skills/fe-react/SKILL.mdskill.frontend-skills/skills/fe-react/references/react.mdskillCONVENTIONS.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.
## 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-react` (React components): when editing `**/*.jsx`, `**/*.tsx`, first read `.frontend-skills/skills/fe-react/SKILL.md`.Jeden folder dla większości agentów
Wielu agentów czyta wspólny folder .agents/skills/, a niektórzy czytają dwa foldery i pokazaliby każdy skill dwa razy. Instalator wybiera najmniejszy zestaw folderów, który czyta każdy wybrany agent, z najmniejszą liczbą duplikatów, i nazywa duplikaty, których nie dało się uniknąć; doctor sprawdza to później ponownie.
Twoje pliki instrukcji zostają Twoje
Wspólne pliki, takie jak AGENTS.md, CLAUDE.md czy GEMINI.md, dostają jeden krótki blok między <!-- frontend-skills:start --> a <!-- frontend-skills:end -->. Tekst poza blokiem nigdy nie jest zmieniany, kolejne uruchomienie podmienia blok w miejscu, a plik powstaje tylko wtedy, gdy go nie było.
Reguły zawężone do typów plików
Tam, gdzie agent to obsługuje, każdy skill dostaje też krótki plik reguł z jego skrótem reguł i wzorcami plików, których dotyczy, więc reguła CSS nie jest ładowana, gdy agent edytuje test. Istnieje osiem takich formatów, każdy z własnym kluczem (paths, globs, applyTo, fileMatchPattern…). To prawdziwy plik zapisywany dla Cursora ze skilla fe-react:
---
description: Writes and reviews React 19 components (also inside Next.js, Vite or React Router apps) - keys, state, effects, events, refs, forms with actions, memoization and React Compiler - so they stay correct, accessible and fast. Use when creating or editing a .jsx or .tsx component or hook, fixing a re-render or stale-state bug, or when asked "review this React code".
globs: **/*.jsx, **/*.tsx
alwaysApply: false
---
# React components (frontend-skills)
- Keys come from the data (`key={item.id}`), never the array index for lists that change (react/no-array-index-key).
- Compute derived values during render; an effect only synchronises with something outside React (react/no-derived-state-effect).
- Declare components at module level; never define a component inside another (react/no-nested-component).
- Keep state minimal and close to where it is used; lift it only as far as the nearest shared parent.
- Handle user actions in event handlers, not in effects that watch state.
- Every effect that subscribes, listens or starts a timer returns a cleanup.
- Interactive elements are `<button>` and `<a>`, not `div` with `onClick` (a11y/no-click-on-static); every `<img>` has `alt` (a11y/img-alt).
- Never mutate state or props; never call hooks conditionally; never read `ref.current` during render.
Before larger changes, read the full skill: `.agents/skills/fe-react/SKILL.md`. Explain any rule id with `npx github:dawidolko/frontend-skills explain <id>`.fe-react.Budżety tokenów
Agent stale płaci za listę nazw i opisów skilli, blok instrukcji i reguły ładowane zawsze. Za użycie płaci treścią skilla, plikiem referencyjnym tylko wtedy, gdy jest potrzebny, i wynikiem poleceń. Budżety pilnuje walidator repozytorium:
| Część | Budżet | Specyfikacja Agent Skills |
|---|---|---|
description | 400 znaków | 1024 |
cały SKILL.md | 120 linii i 1800 tokenów | poniżej 500 linii i 5000 tokenów (zalecenie) |
skrót ## Rules | 12 punktów i 450 tokenów | bez limitu |
| jeden plik referencyjny | 300 linii i 4000 tokenów | bez limitu |
| blok instrukcji | 250 tokenów | bez limitu |
Zmierzony koszt każdego skilla
Ładowane zawsze: 4219 tokenów za nazwy i opisy wszystkich skilli (50). Projekt dostaje tylko skille potrzebne jego stackowi, więc jego lista jest krótsza.
| Skill | Ładowane zawsze | Treść skilla, przy użyciu | Referencje, na żądanie | Razem |
|---|---|---|---|---|
fe-a11y-aria | 91 | 1070 | 1372 | 2533 |
fe-a11y-carousel-toast | 102 | 791 | 1127 | 2020 |
fe-a11y-combobox | 82 | 872 | 1167 | 2121 |
fe-a11y-core | 92 | 1097 | 2711 | 3900 |
fe-a11y-dialog | 82 | 846 | 1280 | 2208 |
fe-a11y-forms | 92 | 875 | 1223 | 2190 |
fe-a11y-keyboard | 93 | 1127 | 1593 | 2813 |
fe-a11y-media | 88 | 781 | 1342 | 2211 |
fe-a11y-menus | 89 | 872 | 1271 | 2232 |
fe-a11y-tables | 92 | 864 | 1043 | 1999 |
fe-a11y-tabs-accordion | 79 | 821 | 1218 | 2118 |
fe-a11y-visual | 94 | 998 | 1747 | 2839 |
fe-angular | 78 | 1152 | 2088 | 3318 |
fe-astro | 73 | 920 | 1501 | 2494 |
fe-audit | 83 | 778 | 731 | 1592 |
fe-component | 84 | 972 | 1297 | 2353 |
fe-core-web-vitals | 108 | 956 | 1518 | 2582 |
fe-css-architecture | 92 | 1053 | 2297 | 3442 |
fe-css-layout | 82 | 879 | 1666 | 2627 |
fe-css-modern | 94 | 839 | 1810 | 2743 |
fe-data-fetching | 76 | 876 | 1803 | 2755 |
fe-fix | 90 | 670 | 814 | 1574 |
fe-fonts | 75 | 875 | 1339 | 2289 |
fe-forms | 87 | 954 | 1472 | 2513 |
fe-html | 76 | 869 | 1289 | 2234 |
fe-i18n | 83 | 1010 | 1550 | 2643 |
fe-icons | 81 | 968 | 1857 | 2906 |
fe-images | 81 | 1008 | 1726 | 2815 |
fe-javascript | 79 | 1070 | 1903 | 3052 |
fe-learn | 80 | 748 | 748 | 1576 |
fe-lighthouse | 82 | 820 | 1485 | 2387 |
fe-motion | 79 | 838 | 1432 | 2349 |
fe-nextjs | 81 | 1053 | 1942 | 3076 |
fe-nuxt | 81 | 1136 | 2024 | 3241 |
fe-perf-delivery | 81 | 837 | 1431 | 2349 |
fe-react | 83 | 794 | 1070 | 1947 |
fe-responsive | 93 | 1080 | 1971 | 3144 |
fe-review | 80 | 787 | 789 | 1656 |
fe-sass | 75 | 1016 | 1926 | 3017 |
fe-security | 90 | 971 | 1450 | 2511 |
fe-seo-metadata | 93 | 951 | 1689 | 2733 |
fe-state | 71 | 888 | 1490 | 2449 |
fe-svelte | 77 | 963 | 1544 | 2584 |
fe-sveltekit | 77 | 1033 | 1637 | 2747 |
fe-tailwind | 75 | 1097 | 1546 | 2718 |
fe-testing | 91 | 949 | 1636 | 2676 |
fe-tooling | 88 | 857 | 1519 | 2464 |
fe-typescript | 87 | 1016 | 2090 | 3193 |
fe-vue | 81 | 1070 | 1926 | 3077 |
fe-web-components | 76 | 1077 | 1699 | 2852 |
Tokeny to szacunek frontend-skills estimate v1 (calibrated on o200k), zmierzony poleceniem frontend-skills tokens --all podczas budowania tej strony.
Lekcje
Gdy potwierdzisz coś o swoim projekcie („pola formularza używają naszego komponentu Field”), zostaje to zapisane jako jedna linia w .frontend-skills/lessons.md, a każdy skill czyta ten plik jako pierwszy. Lekcja ma najwyżej 300 znaków, może wymieniać identyfikatory reguł, których dotyczy, i jest odrzucana, jeśli wygląda na sekret.
Zapisanie lekcji:
npx github:dawidolko/frontend-skills learn --lesson "Form fields use components/ui/Field.tsx" --kind convention - 2026-11-11 · convention · Form fields use components/ui/Field.tsx, which renders label, hint and error. [a11y/input-label]Audyt i raport
audit czyta kod źródłowy i sprawdza go każdą regułą, która ma test statyczny. Z --url uruchamia też, po zapytaniu, Lighthouse i axe-core w Twoim Chrome i przypisuje ich wyniki do tych samych identyfikatorów reguł. Reguły, których maszyna nie oceni, trafiają na listę kontrolną.
W kodzie źródłowym
Brak alt, lang, tytułu lub viewportu; zablokowane powiększanie; dodatni tabindex; obsługa kliknięć na elementach statycznych; pola bez etykiet; błędny autocomplete; usunięty obrys fokusu; obrazy bez wymiarów; skrypty blokujące renderowanie; fonty bez font-display; za duże obrazy; indeksy jako klucze; 100vh.
Na wyrenderowanej stronie
Kontrast kolorów, dostępne nazwy wyliczone przez komponenty, regiony i nagłówki gotowej strony, kolejność fokusu, rozmiar celów dotykowych, wydajność według Lighthouse, audyty SEO i dobrych praktyk.
Przez człowieka
Czy tekst alternatywny znaczy to, co trzeba, jakość komunikatów błędów, kolejność czytania, pułapki klawiatury we własnych widżetach, komunikaty czytnika ekranu, obciążenie poznawcze.
audit: liczby według wagi, każda reguła z pierwszym miejscem, kod wyjścia.Project: react-vite · 2026-11-11 · 3 files read, 131 static rules run.
| critical | serious | moderate | minor |
|---|---|---|---|
| 2 | 3 | 4 | 5 |
**Result: findings at serious or above.**
Automated checks find only part of the problems; the checklist at the end needs a person.
Critical
a11y/img-alt Every img and area element has an alt attribute; a decorative image has alt="".
Why: Without alt, a screen reader announces the file name or nothing, and the image's meaning is lost; when the image fails to load, nothing replaces it.
Fix: Describe what the image says in this context (alt="Revenue grew 20% in 2026"), not what it looks like. For an image that only decorates, write alt="" so assistive technology skips it. An image inside a link that has no other text needs the link's purpose as its alt.
Sources: WCAG 2.2, Understanding SC 1.1.1 Non-text Content · MDN, the img element (alt) · WAI Images Tutorial, decorative images
src/App.tsx:8<img> has no alt attribute; describe it, or use alt="" if it is decorative.
a11y/input-label Every form field has a programmatic label (label element, aria-label or aria-labelledby); a placeholder is not a label.
Why: A field without a programmatic label is announced only as "edit text": the user does not know what to type.
Fix: Pair a visible <label for="email"> with <input id="email">, or wrap the field in the label. When the design has no visible label (a search field next to its button), use aria-label or aria-labelledby; keep a visible label wherever you can.
Sources: WCAG 2.2, Understanding SC 3.3.2 Labels or Instructions · WCAG 2.2, Understanding SC 1.3.1 Info and Relationships · WAI Forms Tutorial, labeling controls · MDN, the label element
src/App.tsx:15<input type="email"> has no label; add <label for>, wrap it in <label> or use aria-label.
Serious
a11y/focus-visible Never remove the focus outline without drawing a visible replacement for keyboard focus.
Why: Keyboard users see where they are only through the focus indicator.
Fix: Style :focus-visible instead of removing focus styles: button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }. If the design needs no ring for mouse clicks, :focus:not(:focus-visible) { outline: none; } is acceptable. With Tailwind, pair outline-none with a focus-visible:ring-* or focus-visible:outline-* class.
Sources: WCAG 2.2, Understanding SC 2.4.7 Focus Visible · MDN, the :focus-visible pseudo-class · Tailwind CSS, outline-style (outline-hidden and outline-none)
src/App.tsx:16outline-none removes the focus indicator; add a focus-visible:ring-* or focus-visible:outline-* class.src/app.css:9"a:focus" removes the focus outline with no visible replacement.
frontend-report.md, raport zapisywany przez audit, tak jak czyta go człowiek.Skondensowany wynik dla agentów
Z --json audyt wypisuje jedną linię na regułę, z poprawką i każdym miejscem jako plik:linia, bez innej prozy, więc agent wydaje tokeny na znaleziska. To prawdziwy wynik dla przykładowego projektu react-vite:
$ npx github:dawidolko/frontend-skills audit --json
{"v":1,"failOn":"serious","failed":true,"counts":{"critical":2,"serious":3,"moderate":4,"minor":5},"rules":{"a11y/img-alt":{"s":"critical","fix":"Describe what the image says in this context (alt=\"Revenue grew 20% in 2026\"), not what it looks like.","at":["src/App.tsx:8"]},"a11y/input-label":{"s":"critical","fix":"Pair a visible <label for=\"email\"> with <input id=\"email\">, or wrap the field in the label.","at":["src/App.tsx:15"]},"a11y/focus-visible":{"s":"serious","fix":"Style :focus-visible instead of removing focus styles: button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }.","at":["src/App.tsx:16","src/app.css:9"]},"a11y/no-click-on-static":{"s":"serious","fix":"Use <button type=\"button\"> for an action and <a href> for navigation; both are focusable, keyboard operable and announced correctly for free.","at":["src/App.tsx:9"]},"js/asset-import":{"s":"moderate","fix":"Import the file from the source tree (import hero from './hero.jpg') and use the result, or the framework's image component with that import (next/image, Astro <Image>, @nuxt/image, SvelteKit enhanced:img).","at":["src/App.tsx:8"]},"perf/img-dimensions":{"s":"moderate","fix":"Write the image's intrinsic size: <img src=\"hero.jpg\" width=\"1200\" height=\"600\" alt=\"…\">, and let CSS scale it with max-width: 100%; height: auto;.","at":["src/App.tsx:8"]},"react/no-array-index-key":{"s":"moderate","fix":"Use a stable id from the data: key={todo.id}.","at":["src/App.tsx:12"]},"seo/meta-description":{"s":"moderate","fix":"Write one or two sentences per page that say what is on it, in the page's language.","at":["index.html:3"]},"css/asset-url":{"s":"minor","fix":"Keep images and fonts next to the source (src/assets/…) and reference them relatively (url('../assets/hero.jpg')) or through the project's alias (@/assets/…, ~/assets/…).","at":["src/app.css:5"]},"html/button-type":{"s":"minor","fix":"Write type=\"button\" on every button that runs script, and type=\"submit\" on the one that submits, so intent is visible in the markup.","at":["src/App.tsx:16"]},"perf/font-display":{"s":"minor","fix":"Add font-display: swap to show fallback text at once, or font-display: optional when you would rather keep the fallback than shift the layout.","at":["src/app.css:3"]},"responsive/dynamic-viewport-units":{"s":"minor","fix":"Use min-height: 100dvh (follows the visible area) or 100svh (the smallest, stable value).","at":["src/App.tsx:7"]},"ts/isolated-modules":{"s":"minor","fix":"Add \"verbatimModuleSyntax\": true (which implies isolated modules and keeps imports exactly as written) or at least \"isolatedModules\": true, then write import type { User } from './types' for type-only imports.","at":["tsconfig.json:1"]}}}
Kody wyjścia: 0, gdy nic nie osiąga progu --fail-on (domyślnie serious), 1, gdy coś osiąga, 2 przy błędnym użyciu, 3, gdy wymagane narzędzie jest niedostępne.
explain a11y/img-alt: hasło słownika w terminalu.Pomijanie znaleziska
Napisz fs-ignore <id reguły> w komentarzu w tej samej linii lub linię wyżej albo wpisz identyfikatory reguł i ścieżki w audit.ignore i audit.exclude w profilu.
Domyślnie bezpieczne
Nic, co napisałeś, nie jest nadpisywane. Każdy plik i blok zapisany przez polecenie trafia do .frontend-skills/install.json z sumą kontrolną; uninstall usuwa plik tylko wtedy, gdy suma wciąż się zgadza, a plik, który zmieniłeś, zostawia. --dry-run pokazuje plan i niczego nie zapisuje.