frontend-conventions
Skill7 starsChanged 3 days agoMITView on GitHub
Frontend code: TypeScript, React, Biome, Vitest coverage. TRIGGER when: editing `.tsx`, `.ts` in a frontend app, or React components, hooks or pages; touching a frontend `package.json`, `tsconfig*.json`, `biome.json`/`.jsonc`, `vitest.config.*` or lockfile; measuring a front end's test coverage; user asks about frontend tooling, React or Biome. SKIP when: server-side TS (Node, CDK, Pulumi), plain HTML (`web-layout-conventions`), or no frontend code.
- Reads credentials
9 other projects use a version of this.
Adopted by
Most recently taken up by
- leroyguillaume/skillsword for word, first seen Nov 22, 2026
- jbouder/skillstheir own version, first seen Nov 1, 2026
- fpindej/netrocktheir own version, first seen Oct 8, 2026
- cloudflare/cloudflare-ostheir own version, first seen Sep 21, 2026
- aylinmarie/code-working-agentstheir own version, first seen Aug 19, 2026
- Benjaming61001/skillstheir own version, first seen Aug 10, 2026
Used with
Projects with it also use backend-conventions.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillbackend-conventions
Sentry backend conventions for logging, tracing/spans, span/tag attribute naming, metrics tags, and the options system. Use when adding or editing Python in src/ that logs (logger.info/exception), records metrics (metrics.incr/timing with tags), instruments spans/transactions, calls sentry_sdk.set_tag/set_attribute or set_span_tag/set_span_data, or reads registered options with options.get(). Trigger on "add logging", "log an error", "add a metric", "add a span", "instrument tracing", "set an attribute", "add a tag", "read an option", "LOG005", "LOG011", or metrics tag cardinality questions.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 1
- leroyguillaume/skills★ 7100% same
Edited · 0
None found.
Wrote their own version · 8
- cloudflare/cloudflare-os★ 12ksame name
- fpindej/netrock★ 234same name
- mikemai2awesome/agent-skills★ 17same name
- Benjaming61001/skills★ 1same name
- jbouder/skills★ 1same name
- kimzeze/frontend-conventions★ 1same name
- aylinmarie/code-working-agents★ 0same name
- ryokkon624/scrum-agent-base★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- adr-conventionsSkill
- api-conventionsSkill
- architecture-conventionsSkill
- argocd-conventionsSkill
- ci-conventionsSkill
- config-conventionsSkill
- contributing-conventionsSkill
- councilSkill
- cryptography-conventionsSkill
- dependency-update-conventionsSkill
- diagram-conventionsSkill
- docker-conventionsSkill
- documentation-conventionsSkill
- github-actions-conventionsSkill
- github-issue-conventionsSkill
- github-pr-conventionsSkill
- github-repo-settingsSkill
- gitlab-ci-conventionsSkill
- helm-conventionsSkill
- herdr-core-delegationSkill
- herdr-delegationSkill
- herdr-tui-delegationSkill
- kopf-conventionsSkill
- kubernetes-operator-conventionsSkill
- logging-conventionsSkill
- logo-conventionsSkill
- mise-conventionsSkill
- ollama-conventionsSkill
- openssf-conventionsSkill
- pr-conventionsSkill
- pre-commit-conventionsSkill
- project-metadata-conventionsSkill
- python-async-conventionsSkill
- python-conventionsSkill
- readme-conventionsSkill
- release-script-conventionsSkill
- release-supply-chain-conventionsSkill
- renovate-ci-conventionsSkill
- rest-conventionsSkill
- rust-build-conventionsSkill
- rust-conventionsSkill
- rust-http-conventionsSkill
- security-policy-conventionsSkill
- signal-handling-conventionsSkill
- sql-conventionsSkill
- starlight-conventionsSkill
- systemd-conventionsSkill
- system-user-conventionsSkill
- task-conventionsSkill
- terraform-conventionsSkill
- topic-splittingSkill
- ui-copy-conventionsSkill
- web-layout-conventionsSkill
- yaml-conventionsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 1 is distinctive, and 7 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Write everything in TypeScript.
- Very specific: line 31
Add a Biome pre-commit hook as a local language: system hook running the lockfile's Biome (npm run lint, or npx biome check), alongside the …
- Very specific: line 98
Never weaken the type checker: do not set strict: false, noImplicitAny: false, or sprinkle @ts-ignore / @ts-expect-error / as casts to …
- Very specific: line 102
Never write application code in .js / .jsx, and never ship plain JavaScript modules for app logic.
- Very specific: line 105
Never use ESLint or Prettier, and never add an .eslintrc* or .prettierrc*.
- Distinctive: line 108
Never use class components or legacy lifecycle methods.
- Very specific: line 110
Never thread an untyped or inline-shaped object between components or functions as a stand-in for a known record — define the …
- Very specific: line 113
Never use console.log (or console.*) for diagnostics.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend conventions
Always:
- Write everything in TypeScript. Application source is
.ts/.tsxonly. New UI is.tsx; non-UI modules are.ts. - Build all UI with React using function components and hooks. Type props and state explicitly; type component return values where it aids clarity.
- Enforce strict typing.
tsconfig.jsonmust set"strict": true(this turns onnoImplicitAny,strictNullChecks, and the rest of the strict family). Additionally enablenoUncheckedIndexedAccessandexactOptionalPropertyTypes. Treattsc --noEmitas a blocking gate, on the same footing as Biome — fix every type error before a change is done. Runtsc --noEmitvia pre-commit, which CI runs. - Format and lint with Biome (
biome check --write). It replaces both ESLint and Prettier. Configure everything inbiome.json(orbiome.jsonc). Enable the recommended rules and setsuspicious/noExplicitAnytoerror. - Add a Biome pre-commit hook as a local
language: systemhook running the lockfile's Biome (npm run lint, ornpx biome check), alongside the baseline hooks frompre-commit-conventions. Notbiomejs/pre-commit: itsadditional_dependenciesis a second Biome version to keep in step. CI runsnpm cibeforepre-commitso the hook finds Biome. - Exclude the frontend lockfile from
check-added-large-files, aspre-commit-conventionsdescribes for every lockfile. - Model structured data with an explicit
type/interface, never a bare inline object shape threaded through the code. First reuse a type a dependency already ships (an SDK's request/response model, a generated API client, library prop types); only define your own when none exists. Derive rather than duplicate (Pick,Omit,ReturnType,z.infer, …). - Validate data crossing an I/O boundary (API responses, form input, URL
params,
localStorage) with a schema validator (e.g.zod) and infer the TypeScript type from the schema, so the runtime shape and the static type cannot drift. - Apply
ui-copy-conventionsto every string the UI shows, andweb-layout-conventionsto layout and styling, mobile-first breakpoints included. - Apply
logging-conventions. Frontend mechanics: use one structured logger module configured at app startup, and log key-values (logger.debug("fetch.done", { url, status })), never by interpolating values into the message string. Gate verbosity by a log level the app's config module reads once (with Vite,import.meta.env.VITE_LOG_LEVEL; seeconfig-conventions), never read inline at the call site. - Provide tests for components and logic with Vitest + React Testing Library (or the framework's first-party test runner). Test behaviour through the rendered output and user interactions, not implementation details.
Measure their coverage with Vitest's
v8provider (ci-conventions): V8's own counters, with no instrumentation pass over the source. Add@vitest/coverage-v8as a dev dependency at the same version as Vitest, so the lockfile pins both together; Renovate's monorepo grouping keeps them in step. With the framework's own runner instead, its built-in coverage.coverage: { provider: "v8", include: ["src/**"], reporter: ["text", ["text", { file: "summary.txt" }], "html"], },coverage: desc: Run the tests and measure their coverage cmds: - npx vitest run --coverage {{.CLI_ARGS}} coverage:summary: desc: Print the summary of the last coverage run cmds: - cat coverage/summary.txtThe HTML report lands in
coverage/, which is gitignored. On GitLab, add thecoberturareporter (coverage/cobertura-coverage.xml); the job's regex reads theAll filesrow's line column:/^All files\s*\|(?:[^|]*\|){3}\s*(\d+(?:\.\d+)?)/.
Never:
- Never use the
anytype. Reach forunknownplus narrowing, a generic, or a precise type instead. Ifanyis genuinely unavoidable (an untyped third-party module), isolate it behind a typed boundary and annotate the single line with// biome-ignore lint/suspicious/noExplicitAny: <reason>explaining why. Never use a blanketanyto make a type error disappear. - Never weaken the type checker: do not set
strict: false,noImplicitAny: false, or sprinkle@ts-ignore/@ts-expect-error/ascasts to silencetsc. A cast or suppression needs a one-line comment saying why the checker is wrong and why it is safe; prefer fixing the type. - Never write application code in
.js/.jsx, and never ship plain JavaScript modules for app logic. (Config files a tool requires in JS are the only exception.) - Never use ESLint or Prettier, and never add an
.eslintrc*or.prettierrc*. Biome owns formatting and linting; all config lives inbiome.json. - Never use class components or legacy lifecycle methods; function components and hooks only.
- Never thread an untyped or inline-shaped object between components or
functions as a stand-in for a known record — define the
type/interfaceand use it, deriving from an existing type where possible. - Never use
console.log(orconsole.*) for diagnostics; route everything through the configured structured logger.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

