Podstawy

TypeScript

Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types.

fe-typescripttypescript6 regułładowane zawsze: 87 tokenów; przy użyciu: 1016 tokenów; w referencjach na żądanie: 2090 tokenów.

Instalacja

init instaluje ten skill, gdy projekt używa: typescript. 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-typescript dla: Claude Code

  • .claude/skills/fe-typescript/SKILL.mdskill
  • .claude/skills/fe-typescript/references/typescript.mdskill
  • .claude/rules/fe-typescript.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-typescript.md
---
paths:
  - "**/*.ts"
  - "**/*.tsx"
  - "**/*.mts"
  - "**/*.cts"
  - "**/tsconfig*.json"
---

# TypeScript (frontend-skills)

Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types.

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: OpenAI Codex

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.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-typescript dla: Cursor

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.mdskill
  • .cursor/rules/fe-typescript.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-typescript.mdc
---
description: Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types.
globs: **/*.ts, **/*.tsx, **/*.mts, **/*.cts, **/tsconfig*.json
alwaysApply: false
---

# TypeScript (frontend-skills)

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: GitHub Copilot

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.mdskill
  • .github/instructions/fe-typescript.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-typescript.instructions.md
---
applyTo: "**/*.ts,**/*.tsx,**/*.mts,**/*.cts,**/tsconfig*.json"
description: "Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types."
---

# TypeScript (frontend-skills)

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: Gemini CLI

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.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-typescript dla: Antigravity CLI

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.mdskill
  • .agents/rules/fe-typescript.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-typescript.md
---
trigger: glob
globs: "**/*.ts, **/*.tsx, **/*.mts, **/*.cts, **/tsconfig*.json"
description: "Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types."
---

# TypeScript (frontend-skills)

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: Devin / Windsurf

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.mdskill
  • .devin/rules/fe-typescript.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-typescript.md
---
trigger: glob
globs: "**/*.ts,**/*.tsx,**/*.mts,**/*.cts,**/tsconfig*.json"
---

# TypeScript (frontend-skills)

Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types.

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: OpenCode

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.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-typescript dla: Cline

  • .claude/skills/fe-typescript/SKILL.mdskill
  • .claude/skills/fe-typescript/references/typescript.mdskill
  • .clinerules/fe-typescript.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-typescript.md
---
paths:
  - "**/*.ts"
  - "**/*.tsx"
  - "**/*.mts"
  - "**/*.cts"
  - "**/tsconfig*.json"
---

# TypeScript (frontend-skills)

Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types.

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: Zed

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.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-typescript dla: JetBrains Junie

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.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-typescript dla: Kiro

  • .kiro/skills/fe-typescript/SKILL.mdskill
  • .kiro/skills/fe-typescript/references/typescript.mdskill
  • .kiro/steering/fe-typescript.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-typescript.md
---
inclusion: fileMatch
fileMatchPattern: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/tsconfig*.json"]
---

# TypeScript (frontend-skills)

Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types.

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: Augment

  • .agents/skills/fe-typescript/SKILL.mdskill
  • .agents/skills/fe-typescript/references/typescript.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-typescript dla: Trae

  • .trae/skills/fe-typescript/SKILL.mdskill
  • .trae/skills/fe-typescript/references/typescript.mdskill
  • .trae/rules/fe-typescript.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-typescript.md
---
description: "Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types."
globs: **/*.ts,**/*.tsx,**/*.mts,**/*.cts,**/tsconfig*.json
alwaysApply: false
---

# TypeScript (frontend-skills)

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: Continue

  • .frontend-skills/skills/fe-typescript/SKILL.mdskill
  • .frontend-skills/skills/fe-typescript/references/typescript.mdskill
  • .continue/rules/fe-typescript.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-typescript.md
---
name: "TypeScript"
description: "Writes and reviews TypeScript for front-end apps (TypeScript 7, React, Vue, Svelte, Angular, Astro) - strict config, no any, types checked at the boundaries (API, storage, forms), narrowing instead of casts, a tsconfig that builds on 6 and 7. Use when editing .ts or .tsx files or a tsconfig, upgrading TypeScript, or when asked to type an API response or review types."
globs: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/tsconfig*.json"]
alwaysApply: false
---

# TypeScript (frontend-skills)

- Keep `strict` on; never set it or one of its flags to `false` (ts/strict).
- Use no option removed in TypeScript 7: `baseUrl`, `moduleResolution: "node"`, `target: "es5"`, `outFile` (ts/no-deprecated-options).
- With Vite or another per-file compiler, set `verbatimModuleSyntax` and write `import type` (ts/isolated-modules).
- Never write `any`: use the real type, a generic, or `unknown` and narrow it (ts/no-explicit-any).
- Validate data from `fetch`, `JSON.parse`, storage, `postMessage` and URLs at run time; never type it with `as` (ts/validate-untrusted).
- Silence an error only with `@ts-expect-error` and a reason, never `@ts-ignore` (ts/no-ts-ignore).
- Narrow with `typeof`, `instanceof`, `in` and type guards instead of `as` casts and `!` assertions.
- Model states as discriminated unions (`{ status: 'error'; error: Error }`) and end a `switch` over them with a `never` check.
- Infer local types; annotate exported functions, component props and module boundaries.

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

Gdzie trafia fe-typescript dla: Amazon Q Developer

  • .frontend-skills/skills/fe-typescript/SKILL.mdskill
  • .frontend-skills/skills/fe-typescript/references/typescript.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-typescript` (TypeScript): when editing `**/*.ts`, `**/*.tsx`, `**/*.mts`, `**/*.cts`, `**/tsconfig*.json`, first read `.frontend-skills/skills/fe-typescript/SKILL.md`.
Prawdziwy plik

Gdzie trafia fe-typescript dla: Aider

  • .frontend-skills/skills/fe-typescript/SKILL.mdskill
  • .frontend-skills/skills/fe-typescript/references/typescript.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-typescript` (TypeScript): when editing `**/*.ts`, `**/*.tsx`, `**/*.mts`, `**/*.cts`, `**/tsconfig*.json`, first read `.frontend-skills/skills/fe-typescript/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-typescript na tym pliku.
  • Uruchom audyt front-endu na moich zmianach i popraw wszystko, co poważne.
  • Wyjaśnij ts/strict i popraw to tutaj.

Reguły, których uczy

  • ts/strict

    TypeScript runs with strict on; no config turns strict or one of its checks (strictNullChecks, noImplicitAny...) off.

    umiarkowanastatyczne

  • ts/no-deprecated-options

    A TypeScript 6 or 7 tsconfig uses no option deprecated in 6.0 and removed in 7.0 (baseUrl, moduleResolution node, target es5).

    umiarkowanastatyczne

  • ts/isolated-modules

    A Vite project's tsconfig sets isolatedModules or verbatimModuleSyntax, so code the bundler compiles file by file type-checks the same way.

    drobnastatyczne

  • ts/no-explicit-any

    Type values with a real type or unknown (then narrow), never any.

    umiarkowanastatyczne

  • ts/validate-untrusted

    Data from outside the program (fetch, JSON.parse, storage) is validated at run time, not given a type with as or an annotation.

    umiarkowanastatyczne

  • ts/no-ts-ignore

    Silence a type error with @ts-expect-error and a reason, never @ts-ignore or @ts-nocheck.

    drobnastatyczne

Skrót reguł

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

  • Keep strict on; never set it or one of its flags to false (ts/strict).
  • Use no option removed in TypeScript 7: baseUrl, moduleResolution: "node", target: "es5", outFile (ts/no-deprecated-options).
  • With Vite or another per-file compiler, set verbatimModuleSyntax and write import type (ts/isolated-modules).
  • Never write any: use the real type, a generic, or unknown and narrow it (ts/no-explicit-any).
  • Validate data from fetch, JSON.parse, storage, postMessage and URLs at run time; never type it with as (ts/validate-untrusted).
  • Silence an error only with @ts-expect-error and a reason, never @ts-ignore (ts/no-ts-ignore).
  • Narrow with typeof, instanceof, in and type guards instead of as casts and ! assertions.
  • Model states as discriminated unions ({ status: 'error'; error: Error }) and end a switch over them with a never check.
  • Infer local types; annotate exported functions, component props and module boundaries.

Kroki, które wykonuje agent

  1. Check the version in the profile. On TypeScript 7 (tsc is the native compiler, no programmatic API until 7.1), tools that import typescript (typescript-eslint, vue-tsc, svelte-check, Astro, MDX) need 6.0 through the alias typescript@npm:@typescript/typescript6; keep TS 7 as @typescript/native for tsc.
  2. Start a browser app's tsconfig from "module": "esnext", "moduleResolution": "bundler", "verbatimModuleSyntax": true, "noUncheckedIndexedAccess": true, and list global types in "types" (it defaults to [] since 6.0, so vite/client or node must be named).
  3. Put one schema per external shape next to the call (Valibot or Zod Mini, or the validator already in the project); derive the type from it (v.InferOutput<typeof User>), so type and check cannot drift.
  4. Type props and events in the framework's way: React ComponentProps<'button'>, Vue defineProps<Props>(), Svelte let { a }: Props = $props(), Angular input.required<T>().
  5. Prefer satisfies to check a literal against a type without widening it; as const objects instead of enum when code runs through type stripping.
  6. Type-check in CI with tsc --noEmit (or the framework's checker): bundlers only strip types.

Jak agent sprawdza swoją pracę

  • npx github:dawidolko/frontend-skills audit --changed reads the tsconfig files (strict, removed options, isolated modules) and .tsx, Vue, Svelte and Astro scripts (any, unchecked casts, @ts-ignore). Plain .ts files are not read by the audit yet; run the linter on them.
  • Lint with typescript-eslint's typed config (no-explicit-any, no-floating-promises, no-unsafe-*, ban-ts-comment).

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