typescript-conventions
Skill8 starsChanged 32 days agoMITView on GitHub
TypeScript, React, and UI accessibility conventions for CAST projects. Load when writing, reviewing, or debugging TypeScript/TSX/React code, or when checking accessibility (a11y, aria, focus, contrast, keyboard navigation). Covers file naming, type patterns, hooks, component conventions, testing approach, and the a11y checklist.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- HermeticOrmus/typescript-conventions-skillstheir own version, first seen Nov 8, 2026
- YLfjuk/skillstheir own version, first seen Nov 6, 2026
- andr-ca/agentharnesstheir own version, first seen Oct 15, 2026
- fielding/skillstheir own version, first seen Jul 2, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- andr-ca/agentharness★ 1same name
- fielding/skills★ 1same name
- YLfjuk/skills★ 1same name
- HermeticOrmus/typescript-conventions-skills★ 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 repository21 other files it gives its agents.
- commands/agents.mdAGENTS.md
- rules-core/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-registrySkill
- briefing-writerSkill
- careful-modeSkill
- cast-auditSkill
- cast-conventionsSkill
- deep-researchSkill
- freeze-modeSkill
- git-activitySkill
- laconicSkill
- mergeSkill
- orchestrateSkill
- planSkill
- python-conventionsSkill
- seo-checklistSkill
- seo-index-censusSkill
- shipSkill
- stack-referenceSkill
- wizardSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use React 19 patterns: functional components, hooks, no class components
- Very specific: line 14
Test files live alongside source: Foo.tsx -> Foo.test.tsx
- Distinctive: line 15
Use Vitest + React Testing Library for tests (not Jest in Vite projects)
- Very specific: line 16
Test behavior with getByRole/getByText, not getByTestId
- Distinctive: line 17
Import order: React, third-party, local modules, types (enforce with ESLint)
- Very specific: line 18
Prefer interface over type for object shapes that may be extended
- Very specific: line 19
Use satisfies operator for type-safe config objects
- Very specific: line 26
Every icon-only button/link gets aria-label.
“Common” is measured: kept by at least 6 in 10 of the 4 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
TypeScript Conventions
- Use React 19 patterns: functional components, hooks, no class components
- Extend existing types rather than type casting:
type UserAdmin = User & { isAdmin: true }instead of(user as UserAdmin) - Component files: PascalCase (
UserProfile.tsx) - Hook files: camelCase prefixed with
use(useLocalStorage.ts) - Test files live alongside source:
Foo.tsx->Foo.test.tsx - Use Vitest + React Testing Library for tests (not Jest in Vite projects)
- Test behavior with
getByRole/getByText, notgetByTestId - Import order: React, third-party, local modules, types (enforce with ESLint)
- Prefer
interfaceovertypefor object shapes that may be extended - Use
satisfiesoperator for type-safe config objects
Accessibility (UI projects)
Applies on the FIRST pass, never as a later sweep. Dispatch frontend-qa for a
dedicated a11y review before commit on UI-heavy changes.
- Every icon-only button/link gets
aria-label; decorative icons getaria-hidden="true" - Visible
:focus-visiblestate on every interactive element — never rely on browser default rings on dark themes - Color contrast >= 4.5:1 for text and meaningful icons
- Hit target >= 44x44 px on touch surfaces
- Form inputs have
<label>,autoComplete, andaria-describedbyfor errors - Animation respects
prefers-reduced-motionviauseReducedMotion()or CSS media query - Semantic HTML first (
<button>,<a>,<nav>,<main>); ARIA only when semantic HTML is insufficient - Keyboard navigation works end-to-end — logical tab order, modal focus trap, Escape closes overlays
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.

