Not in the top 1,000 by GitHub stars
mkosir/typescript-style-guide
⚙<U+FE0F> TypeScript Style Guide and Agent Skill. A concise set of conventions and best practices for consistent, maintainable code.
History
Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.
View weekly changes
skills/typescript-discriminated-unions/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
skills/typescript-functions/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
skills/typescript-naming/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
skills/typescript-react/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
skills/typescript-source-organization/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
skills/typescript-style-guide/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
skills/typescript-tests/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
skills/typescript-types/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
skills/typescript-variables/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Instructions only → After Instructions only
170074a0df9b → 170074a0df9b
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 170074a0df9b
No earlier version was observed for comparison.
Heat
0.3- Star growth, last 7 daysNot available
- Star growth, last 24 hoursNot available
- Rank movement, last 7 daysNot available
- Commits, last 30 daysNot available
- Accounts asking about it through MCP, last 7 daysNot available
- Hot votes this weekNot available
Heat never changes the order by stars, and sponsorship never touches it. How heat works
Stars over time
Individual skills in this repository
- typescript-discriminated-unions
skills/typescript-discriminated-unions - typescript-functions
skills/typescript-functions - typescript-naming
skills/typescript-naming - typescript-react
skills/typescript-react - typescript-source-organization
skills/typescript-source-organization - typescript-style-guide
skills/typescript-style-guide - typescript-tests
skills/typescript-tests - typescript-types
skills/typescript-types - typescript-variables
skills/typescript-variables
How it works
typescript-discriminated-unions
When your agent uses it
Apply, review, and explain discriminated unions in TypeScript. Use automatically for tasks involving mutually exclusive variants, invalid state prevention, exhaustiveness checking, variant-specific object properties, application state, function arguments, or React props.
What it loads into context
Frontmatter
57 tokensAlways available to the agent
SKILL.md
2,086 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Boundaries
- Discriminated Unions {#discriminated-unions}
Files
SKILL.mdcore10,030 bytes
Read SKILL.md
# Discriminated Unions
Apply the TypeScript Style Guide's discriminated-union conventions in the context of the current task.
## Workflow
1. Inspect the consuming repository's conventions and configuration.
2. Let explicit repository conventions take precedence over this opinionated guidance.
3. Apply, review, or explain only the guidance relevant to the task.
4. State important tradeoffs when the appropriate model depends on context or judgment.
## Boundaries
- Use discriminated unions for mutually exclusive variants that require different data.View the complete source on GitHubtypescript-functions
When your agent uses it
Apply, review, and explain TypeScript function conventions. Use automatically for tasks involving function responsibility, statelessness, purity, side effects, function arguments, function API design, or return types.
What it loads into context
Frontmatter
47 tokensAlways available to the agent
SKILL.md
971 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Boundaries
- Related Guidance
- Functions
Files
SKILL.mdcore5,051 bytes
Read SKILL.md
# Functions
Apply the TypeScript Style Guide's function conventions in the context of the current task.
## Workflow
1. Inspect the consuming repository's conventions and configuration.
2. Let explicit repository conventions take precedence over this opinionated guidance.
3. Apply, review, or explain only the guidance relevant to the task.
4. State important tradeoffs when the appropriate design depends on context or judgment.
## Boundaries
- Keep TypeScript and ESLint responsible for checks they can enforce automatically.View the complete source on GitHubtypescript-naming
When your agent uses it
Apply, review, and explain TypeScript naming conventions. Use automatically for tasks involving exports, identifiers, generic type parameters, acronyms, React props and handlers, hooks, comments, or TSDoc.
What it loads into context
Frontmatter
50 tokensAlways available to the agent
SKILL.md
2,459 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Boundaries
- Related Guidance
- Naming
Files
SKILL.mdcore10,202 bytes
Read SKILL.md
# Naming
Apply the TypeScript Style Guide's naming conventions in the context of the current task.
## Workflow
1. Inspect the consuming repository's conventions and configuration.
2. Let explicit repository conventions take precedence over this opinionated guidance.
3. Apply, review, or explain only the guidance relevant to the task.
4. State important tradeoffs when the appropriate name or documentation depends on context or judgment.
## Boundaries
- Keep ESLint and other tooling responsible for checks they can enforce automatically.View the complete source on GitHubtypescript-react
When your agent uses it
Apply, review, and explain React conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX tasks involving prop-derived state, prop typing, component responsibilities, data flow, compound components, or client and server state.
What it loads into context
Frontmatter
55 tokensAlways available to the agent
SKILL.md
1,409 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Boundaries
- Related Guidance
- Appendix - React
Files
SKILL.mdcore5,999 bytes
Read SKILL.md
# React
Apply the TypeScript Style Guide's React conventions in the context of the current task.
## Workflow
1. Inspect the consuming repository's React, framework, and state-management conventions.
2. Let explicit repository conventions take precedence over this opinionated guidance.
3. Apply, review, or explain only the guidance relevant to the task.
4. State important tradeoffs when component or state design depends on application context.
## Boundaries
- Keep TypeScript, React, and ESLint responsible for checks they can enforce automatically.View the complete source on GitHubtypescript-source-organization
When your agent uses it
Apply, review, and explain TypeScript source organization conventions. Use automatically for tasks involving feature-based organization, code colocation, import paths, import sorting, monorepos, or frontend and backend project structure.
What it loads into context
Frontmatter
52 tokensAlways available to the agent
SKILL.md
1,433 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Boundaries
- Source Organization
Files
SKILL.mdcore5,588 bytesSKILL.mdcore5,588 bytesSKILL.mdcore5,588 bytes
Read SKILL.md
# Source Organization
Apply the TypeScript Style Guide's source organization conventions in the context of the current task.
## Workflow
1. Inspect the consuming repository's existing structure, framework conventions, and configuration.
2. Let explicit repository conventions take precedence over this opinionated guidance.
3. Apply, review, or explain only the guidance relevant to the task.
4. State important tradeoffs when organization depends on project size, framework, or team conventions.
## Boundaries
- Keep formatting and linting tools responsible for import sorting when configured.View the complete source on GitHubtypescript-style-guide
When your agent uses it
Apply, review, and explain the opinionated conventions in the TypeScript Style Guide. Use automatically only when TypeScript conventions are part of the requested task, including type modelling, discriminated unions, function APIs, variables and state, naming, source organization, React props, component APIs, state management, data flow, or tests. Do not use for styling or layout alone.
What it loads into context
Frontmatter
84 tokensAlways available to the agent
SKILL.md
664 tokensWhen the skill is activated
Reference documents
13,335 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Reference routing
- Boundaries
Files
SKILL.mdcore3,474 bytesSKILL.mdcore3,474 bytesreferences/discriminated-unions.mddoc8,765 bytesreferences/functions.mddoc3,901 bytesreferences/naming.mddoc9,047 bytesreferences/react.mddoc4,851 bytesreferences/source-organization.mddoc4,539 bytesreferences/tests.mddoc4,394 bytesreferences/types.mddoc15,670 bytesreferences/variables.mddoc5,687 bytes
Read SKILL.md
# TypeScript Style Guide
Apply only the conventions relevant to the current task. Keep TypeScript, linters, and formatters responsible for rules they can enforce automatically.
## Workflow
1. Inspect the consuming repository's conventions and configuration.
2. Let explicit repository conventions take precedence over this opinionated guide.
3. Identify which guide topic applies.
4. Read only the reference for the task's primary guide topic. Read multiple references only when the task substantively spans multiple topics.
5. Apply, review, or explain the conventions in the context of the current task.
6. State important tradeoffs when a convention depends on context or judgment.
## Reference routingView the complete source on GitHubtypescript-tests
When your agent uses it
Apply, review, and explain testing conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX test tasks involving test design, AAA, mocking, isolation, black-box testing, Testing Library queries, test descriptions, or snapshots.
What it loads into context
Frontmatter
57 tokensAlways available to the agent
SKILL.md
1,157 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Boundaries
- Related Guidance
- Appendix - Tests
Files
SKILL.mdcore5,581 bytes
Read SKILL.md
# Tests
Apply the TypeScript Style Guide's testing conventions in the context of the current task.
## Workflow
1. Inspect the consuming repository's test runner, libraries, conventions, and configuration.
2. Let explicit repository conventions take precedence over this opinionated guidance.
3. Apply, review, or explain only the guidance relevant to the task.
4. State important tradeoffs when testing strategy depends on risk, scope, or maintenance cost.
## Boundaries
- Keep the test runner, TypeScript, and ESLint responsible for checks they can enforce automatically.View the complete source on GitHubtypescript-types
When your agent uses it
Apply, review, and explain TypeScript type conventions. Use automatically for tasks involving inference, readonly data, type-safe constants, template literal types, any and unknown, assertions, type errors, type definitions, arrays, type imports, or generated service types.
What it loads into context
Frontmatter
59 tokensAlways available to the agent
SKILL.md
3,868 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Boundaries
- Types
Files
SKILL.mdcore16,694 bytes
Read SKILL.md
# Types
Apply the TypeScript Style Guide's type conventions in the context of the current task.
## Workflow
1. Inspect the consuming repository's conventions and configuration.
2. Let explicit repository conventions take precedence over this opinionated guidance.
3. Apply, review, or explain only the guidance relevant to the task.
4. State important tradeoffs when the appropriate model depends on context or judgment.
## Boundaries
- Keep TypeScript and ESLint responsible for checks they can enforce automatically.View the complete source on GitHubtypescript-variables
When your agent uses it
Apply, review, and explain TypeScript variable conventions. Use automatically for tasks involving variable declarations, const assertions, enum alternatives, literal-union state modelling, boolean flags, or choosing between null and undefined.
What it loads into context
Frontmatter
50 tokensAlways available to the agent
SKILL.md
1,667 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Workflow
- Boundaries
- Related Guidance
- Variables
Files
SKILL.mdcore6,859 bytes
Read SKILL.md
# Variables
Apply the TypeScript Style Guide's variable conventions in the context of the current task.
## Workflow
1. Inspect the consuming repository's conventions and configuration.
2. Let explicit repository conventions take precedence over this opinionated guidance.
3. Apply, review, or explain only the guidance relevant to the task.
4. State important tradeoffs when the appropriate choice depends on context or judgment.
## Boundaries
- Keep TypeScript and ESLint responsible for checks they can enforce automatically.View the complete source on GitHubSkills included
- typescript-discriminated-unions
- typescript-functions
- typescript-naming
- typescript-react
- typescript-source-organization
- typescript-style-guide
- typescript-tests
- typescript-types
- typescript-variables
Repository facts
- License
- MIT
- Created
- Sep 18, 2022
- Last pushed
- Sep 3, 2026
- Forks
- 38
- Open issues
- 0
- Project activity
- Slowing
Rank over the last 12 weeks
Now #992 · best #639 · down 241 in 30 days
- #729 on Sep 3
- #751 on Sep 10
- #794 on Sep 30
- #829 on Oct 15
- #863 on Oct 20
- #992 since Oct 25
8 earlier periods
- #734 on Aug 1
- #639 on Aug 7
- #680 on Aug 17
- #678 on Aug 20
- #683 on Aug 21
- #714 on Aug 25
- #697 on Aug 26
- #730 on Aug 28
Before you install
Instructions onlyAutomated signals, not a guarantee
Checked Nov 4, 2026
Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.
Show 3 notes
skills/typescript-source-organization/SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedskills/typescript-source-organization/SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedskills/typescript-style-guide/SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzed
- No broad tool permissions
- No dangerous shell commands
- 98 network referencesin 16 files: typescript-naming/SKILL.md:37 typescript-style-guide/references/naming.md:8 typescript-style-guide/references/types.md:264 and 13 more
- No hidden or obfuscated text
- No instruction overrides
- No executable scripts
- No access to secrets
- No requests to vote in Hot
Show all 98 signals by file
skills/typescript-discriminated-unions/SKILL.md
- Network accessline 44
<Rule href="https://typescript-eslint.io/rules/switch-exhaustiveness-check/">{`"@typescript-eslint/switch-exhaustiveness-check": "error"`}</Rule>
skills/typescript-functions/SKILL.md
- Network accessline 94
<Rule prefix="Require explicit return types at module boundaries" href="https://typescript-eslint.io/rules/explicit-module-boundary-types/" - Network accessline 95
prefix="Require explicit return types at module boundaries" href="https://typescript-eslint.io/rules/explicit-module-boundary-types/" >{`"@typescript-eslint/explicit-module-boundary-types": "error"`}</Rule> - Network accessline 96
href="https://typescript-eslint.io/rules/explicit-module-boundary-types/"
skills/typescript-naming/SKILL.md
- Network accessline 37
<Rule prefix="Named exports must be used to ensure that all imports follow a uniform pattern" href="https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md" - Network accessline 38
prefix="Named exports must be used to ensure that all imports follow a uniform pattern" href="https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md" >{`export default [ - Network accessline 39
href="https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md" - Network accessline 67
`isDisabled`, `hasProduct` <!-- prettier-ignore-start --> <Rule href="https://typescript-eslint.io/rules/naming-convention"> - Network accessline 68
<!-- prettier-ignore-start --> <Rule href="https://typescript-eslint.io/rules/naming-convention"> {`'@typescript-eslint/naming-convention': [ - Network accessline 69
<Rule href="https://typescript-eslint.io/rules/naming-convention"> - Network accessline 136
<Rule href="https://typescript-eslint.io/rules/naming-convention"> - Network accessline 158
<Rule href="https://typescript-eslint.io/rules/naming-convention"> - Network accessline 229
<Rule href="https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md">{`'react/jsx-handler-names': [ - Network accessline 249
<Rule prefix="Camel case, prefixed as 'use'" href="https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks" - Network accessline 250
prefix="Camel case, prefixed as 'use'" href="https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks" >{`'react-hooks/rules-of-hooks': 'error'`}</Rule> - Network accessline 251
href="https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks" - Network accessline 253
<Rule prefix="Symmetrical convention: [value, setValue] = useState()" href="https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md#rule-details" - Network accessline 254
prefix="Symmetrical convention: [value, setValue] = useState()" href="https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md#rule-details" >{`'react/hook-use-state': 'error'`}</Rule> - Network accessline 255
href="https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md#rule-details" - Network accessline 305
// ✅ Use - Reference planned improvements // TODO: Move filtering to the backend once API v2 is released. // Issue/PR - https://github.com/foo/repo/pulls/55124 - Network accessline 306
// TODO: Move filtering to the backend once API v2 is released. // Issue/PR - https://github.com/foo/repo/pulls/55124 const filteredUsers = frontendFiltering(selectedUsers); - Network accessline 307
// Issue/PR - https://github.com/foo/repo/pulls/55124 - Network accessline 310
// ✅ Use - Add context to explain why // Use Fourier transformation to minimize information loss - https://github.com/dntj/jsfft#usage - Network accessline 311
// Use Fourier transformation to minimize information loss - https://github.com/dntj/jsfft#usage - Network accessline 317
[TSDoc](https://tsdoc.org/) standardizes TypeScript documentation comments so editors and documentation tools can interpret them consistently. This improves developer experience and supports generated API documentation.
skills/typescript-react/SKILL.md
- Network accessline 167
If prop drilling truly becomes an issue as the app scales, try refactoring render methods or local state in parent components, or use composition. - Data fetching is only allowed in container components. - The use of a server-state library - Network accessline 168
- Data fetching is only allowed in container components. - The use of a server-state library is encouraged ([TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview), [Apollo Client](https://github.com/apollographql/ - Network accessline 169
- The use of a server-state library is encouraged ([TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview), [Apollo Client](https://github.com/apollographql/apollo-client) etc.). - Network accessline 171
Reconsider whether something should be truly global across the application, e.g. `themeMode` or `Permissions`, or whether it can be put in server state (e.g. user settings from the `/me` endpoint). If global state is still truly needed, use
skills/typescript-source-organization/SKILL.md
- Network accessline 38
- **Relative** imports `./sortItems` must be used when importing files within the same feature that are 'close' to each other. This also allows moving the feature around the codebase without changing these imports. - **Absolute** imports `@ - Network accessline 40
- **All** imports must be auto sorted by tooling e.g. [prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports), [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/ord
skills/typescript-style-guide/references/discriminated-unions.md
- Network accessline 19
<Rule href="https://typescript-eslint.io/rules/switch-exhaustiveness-check/">{`"@typescript-eslint/switch-exhaustiveness-check": "error"`}</Rule>
skills/typescript-style-guide/references/functions.md
- Network accessline 65
<Rule prefix="Require explicit return types at module boundaries" href="https://typescript-eslint.io/rules/explicit-module-boundary-types/" - Network accessline 66
prefix="Require explicit return types at module boundaries" href="https://typescript-eslint.io/rules/explicit-module-boundary-types/" >{`"@typescript-eslint/explicit-module-boundary-types": "error"`}</Rule> - Network accessline 67
href="https://typescript-eslint.io/rules/explicit-module-boundary-types/"
skills/typescript-style-guide/references/naming.md
- Network accessline 8
<Rule prefix="Named exports must be used to ensure that all imports follow a uniform pattern" href="https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md" - Network accessline 9
prefix="Named exports must be used to ensure that all imports follow a uniform pattern" href="https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md" >{`export default [ - Network accessline 10
href="https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md" - Network accessline 38
`isDisabled`, `hasProduct` <!-- prettier-ignore-start --> <Rule href="https://typescript-eslint.io/rules/naming-convention"> - Network accessline 39
<!-- prettier-ignore-start --> <Rule href="https://typescript-eslint.io/rules/naming-convention"> {`'@typescript-eslint/naming-convention': [ - Network accessline 40
<Rule href="https://typescript-eslint.io/rules/naming-convention"> - Network accessline 107
<Rule href="https://typescript-eslint.io/rules/naming-convention"> - Network accessline 129
<Rule href="https://typescript-eslint.io/rules/naming-convention"> - Network accessline 200
<Rule href="https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md">{`'react/jsx-handler-names': [ - Network accessline 220
<Rule prefix="Camel case, prefixed as 'use'" href="https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks" - Network accessline 221
prefix="Camel case, prefixed as 'use'" href="https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks" >{`'react-hooks/rules-of-hooks': 'error'`}</Rule> - Network accessline 222
href="https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks" - Network accessline 224
<Rule prefix="Symmetrical convention: [value, setValue] = useState()" href="https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md#rule-details" - Network accessline 225
prefix="Symmetrical convention: [value, setValue] = useState()" href="https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md#rule-details" >{`'react/hook-use-state': 'error'`}</Rule> - Network accessline 226
href="https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md#rule-details" - Network accessline 276
// ✅ Use - Reference planned improvements // TODO: Move filtering to the backend once API v2 is released. // Issue/PR - https://github.com/foo/repo/pulls/55124 - Network accessline 277
// TODO: Move filtering to the backend once API v2 is released. // Issue/PR - https://github.com/foo/repo/pulls/55124 const filteredUsers = frontendFiltering(selectedUsers); - Network accessline 278
// Issue/PR - https://github.com/foo/repo/pulls/55124 - Network accessline 281
// ✅ Use - Add context to explain why // Use Fourier transformation to minimize information loss - https://github.com/dntj/jsfft#usage - Network accessline 282
// Use Fourier transformation to minimize information loss - https://github.com/dntj/jsfft#usage - Network accessline 288
[TSDoc](https://tsdoc.org/) standardizes TypeScript documentation comments so editors and documentation tools can interpret them consistently. This improves developer experience and supports generated API documentation.
skills/typescript-style-guide/references/react.md
- Network accessline 138
If prop drilling truly becomes an issue as the app scales, try refactoring render methods or local state in parent components, or use composition. - Data fetching is only allowed in container components. - The use of a server-state library - Network accessline 139
- Data fetching is only allowed in container components. - The use of a server-state library is encouraged ([TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview), [Apollo Client](https://github.com/apollographql/ - Network accessline 140
- The use of a server-state library is encouraged ([TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview), [Apollo Client](https://github.com/apollographql/apollo-client) etc.). - Network accessline 142
Reconsider whether something should be truly global across the application, e.g. `themeMode` or `Permissions`, or whether it can be put in server state (e.g. user settings from the `/me` endpoint). If global state is still truly needed, use
skills/typescript-style-guide/references/source-organization.md
- Network accessline 15
- **Relative** imports `./sortItems` must be used when importing files within the same feature that are 'close' to each other. This also allows moving the feature around the codebase without changing these imports. - **Absolute** imports `@ - Network accessline 17
- **All** imports must be auto sorted by tooling e.g. [prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports), [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/ord
skills/typescript-style-guide/references/tests.md
- Network accessline 22
- Tests should be resilient to changes. - Black box testing - Always test only publicly exposed behavior. Don't write fragile tests based on how the implementation works internally. - Query HTML elements based on attributes that are unl - Network accessline 23
- Black box testing - Always test only publicly exposed behavior. Don't write fragile tests based on how the implementation works internally. - Query HTML elements based on attributes that are unlikely to change. Order of priority must be - Network accessline 24
- Query HTML elements based on attributes that are unlikely to change. Order of priority must be followed as specified in [Testing Library](https://testing-library.com/docs/queries/about/#priority) - [role](https://testing-library.com/docs/ - Network accessline 39
<Rule href="https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md#mustmatch">
skills/typescript-style-guide/references/types.md
- Network accessline 264
<Rule href="https://typescript-eslint.io/rules/ban-ts-comment/#allow-with-description">{`'@typescript-eslint/ban-ts-comment': [ - Network accessline 285
<Rule prefix="Define all types using type alias" href="https://typescript-eslint.io/rules/consistent-type-definitions" - Network accessline 286
prefix="Define all types using type alias" href="https://typescript-eslint.io/rules/consistent-type-definitions" >{`'@typescript-eslint/consistent-type-definitions': ['error', 'type']`}</Rule> - Network accessline 287
href="https://typescript-eslint.io/rules/consistent-type-definitions" - Network accessline 334
<Rule prefix="Array types should be defined using generic syntax" href="https://typescript-eslint.io/rules/array-type/#generic" - Network accessline 335
prefix="Array types should be defined using generic syntax" href="https://typescript-eslint.io/rules/array-type/#generic" >{`'@typescript-eslint/array-type': ['error', { default: 'generic' }]`}</Rule> - Network accessline 336
href="https://typescript-eslint.io/rules/array-type/#generic" - Network accessline 363
<Rule href="https://typescript-eslint.io/rules/consistent-type-imports/">{`'@typescript-eslint/consistent-type-imports': 'error'`}</Rule> - Network accessline 381
For external services, such as REST, GraphQL, and MQ, it's crucial to generate types from their contracts, whether they use Swagger, schemas, or other sources (e.g. [openapi-ts](https://github.com/drwpow/openapi-typescript), [graphql-config
skills/typescript-style-guide/references/variables.md
- Network accessline 52
Enums are discouraged in the TypeScript ecosystem due to their runtime cost and quirks. The TypeScript documentation outlines several [pitfalls](https://www.typescriptlang.org/docs/handbook/enums.html#const-enum-pitfalls), and TypeScript - Network accessline 53
The TypeScript documentation outlines several [pitfalls](https://www.typescriptlang.org/docs/handbook/enums.html#const-enum-pitfalls), and TypeScript 5.8 introduced the [--erasableSyntaxOnly](https://www.typescriptlang.org/docs/handbook/rel - Network accessline 55
<Rule href="https://eslint.org/docs/latest/rules/no-restricted-syntax">{`'no-restricted-syntax': [ - Network accessline 178
- Use `null` when a value is explicitly empty, such as an assignment or function return value. - Use `undefined` when a value is missing or omitted, such as an optional field in a form, request payload, or database query ([Prisma differenti - Network accessline 179
- Use `undefined` when a value is missing or omitted, such as an optional field in a form, request payload, or database query ([Prisma differentiation](https://www.prisma.io/docs/concepts/components/prisma-client/null-and-undefined)).
skills/typescript-tests/SKILL.md
- Network accessline 51
- Tests should be resilient to changes. - Black box testing - Always test only publicly exposed behavior. Don't write fragile tests based on how the implementation works internally. - Query HTML elements based on attributes that are unl - Network accessline 52
- Black box testing - Always test only publicly exposed behavior. Don't write fragile tests based on how the implementation works internally. - Query HTML elements based on attributes that are unlikely to change. Order of priority must be - Network accessline 53
- Query HTML elements based on attributes that are unlikely to change. Order of priority must be followed as specified in [Testing Library](https://testing-library.com/docs/queries/about/#priority) - [role](https://testing-library.com/docs/ - Network accessline 68
<Rule href="https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md#mustmatch">
skills/typescript-types/SKILL.md
- Network accessline 287
<Rule href="https://typescript-eslint.io/rules/ban-ts-comment/#allow-with-description">{`'@typescript-eslint/ban-ts-comment': [ - Network accessline 308
<Rule prefix="Define all types using type alias" href="https://typescript-eslint.io/rules/consistent-type-definitions" - Network accessline 309
prefix="Define all types using type alias" href="https://typescript-eslint.io/rules/consistent-type-definitions" >{`'@typescript-eslint/consistent-type-definitions': ['error', 'type']`}</Rule> - Network accessline 310
href="https://typescript-eslint.io/rules/consistent-type-definitions" - Network accessline 357
<Rule prefix="Array types should be defined using generic syntax" href="https://typescript-eslint.io/rules/array-type/#generic" - Network accessline 358
prefix="Array types should be defined using generic syntax" href="https://typescript-eslint.io/rules/array-type/#generic" >{`'@typescript-eslint/array-type': ['error', { default: 'generic' }]`}</Rule> - Network accessline 359
href="https://typescript-eslint.io/rules/array-type/#generic" - Network accessline 386
<Rule href="https://typescript-eslint.io/rules/consistent-type-imports/">{`'@typescript-eslint/consistent-type-imports': 'error'`}</Rule> - Network accessline 404
For external services, such as REST, GraphQL, and MQ, it's crucial to generate types from their contracts, whether they use Swagger, schemas, or other sources (e.g. [openapi-ts](https://github.com/drwpow/openapi-typescript), [graphql-config
skills/typescript-variables/SKILL.md
- Network accessline 81
Enums are discouraged in the TypeScript ecosystem due to their runtime cost and quirks. The TypeScript documentation outlines several [pitfalls](https://www.typescriptlang.org/docs/handbook/enums.html#const-enum-pitfalls), and TypeScript - Network accessline 82
The TypeScript documentation outlines several [pitfalls](https://www.typescriptlang.org/docs/handbook/enums.html#const-enum-pitfalls), and TypeScript 5.8 introduced the [--erasableSyntaxOnly](https://www.typescriptlang.org/docs/handbook/rel - Network accessline 84
<Rule href="https://eslint.org/docs/latest/rules/no-restricted-syntax">{`'no-restricted-syntax': [ - Network accessline 207
- Use `null` when a value is explicitly empty, such as an assignment or function return value. - Use `undefined` when a value is missing or omitted, such as an optional field in a form, request payload, or database query ([Prisma differenti - Network accessline 208
- Use `undefined` when a value is missing or omitted, such as an optional field in a form, request payload, or database query ([Prisma differentiation](https://www.prisma.io/docs/concepts/components/prisma-client/null-and-undefined)).
How the signals fit together
Facts from a static read of the files at the pinned commit. They describe what the code does, not why.
Some files could not be read; the facts below still hold.
No combined signals at this commit.
Works with
| Agent | Status | Evidence | Install to |
|---|---|---|---|
| Claude Code | Compatible | Standard SKILL.md skills/typescript-discriminated-unions/SKILL.md | .claude/skills/<skill-name>/ |
| Codex | Compatible | Standard SKILL.md skills/typescript-discriminated-unions/SKILL.md | .agents/skills/<skill-name>/ |
| Cursor | Compatible | Standard SKILL.md skills/typescript-discriminated-unions/SKILL.md | .cursor/skills/<skill-name>/ |
| Gemini CLI | Compatible | Standard SKILL.md skills/typescript-discriminated-unions/SKILL.md | .gemini/skills/<skill-name>/ |
| GitHub Copilot | Compatible | Standard SKILL.md skills/typescript-discriminated-unions/SKILL.md | .github/skills/<skill-name>/ |
| OpenCode | Compatible | Standard SKILL.md skills/typescript-discriminated-unions/SKILL.md | .opencode/skills/<skill-name>/ |
- Native The repository ships a manifest, folder or frontmatter field for this agent.
- Compatible A standard SKILL.md that this agent can read.
- Unknown No evidence either way.
Derived automatically from paths, manifests and frontmatter. Not tested on each agent.