Typescript React logo

Typescript React

Community
mkosir
typescript-react

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.

Overview

Publishermkosir
Repositorytypescript-style-guide
Skill nametypescript-react
Stars
783
Forks
37
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mkosir on GitHub. Read the source before you install it.

Installation

Install the Typescript React AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mkosir/typescript-style-guide/tree/main/skills/typescript-react
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mkosir/typescript-style-guide.git /tmp/typescript-style-guide
mkdir -p .claude/skills
cp -r /tmp/typescript-style-guide/skills/typescript-react .claude/skills/typescript-react
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Typescript React in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Typescript React on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Typescript React is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.
  • Do not redesign unrelated components or state merely because this skill is active.

Related Guidance

Functions

For detailed function design guidance, use typescript-functions when it is available.

Appendix - React

Since React components and hooks are also functions, the respective function conventions apply.

Props To State

In general, avoid using props as initial state because the state will not update when the props change. This can lead to bugs that are hard to track, unintended side effects, and difficulty testing.
When there is truly a use case for using a prop as initial state, the prop must be prefixed with initial (e.g. initialProduct, initialSort etc.)

tsx
// ❌ Avoid using props to state
type FooProps = {
  productName: string;
  userId: string;
};

export const Foo = ({ productName, userId }: FooProps) => {
  const [productName, setProductName] = useState(productName);
  ...

// ✅ Use prop prefix `initial` when there is a rationale for it
type FooProps = {
  initialProductName: string;
  userId: string;
};

export const Foo = ({ initialProductName, userId }: FooProps) => {
  const [productName, setProductName] = useState(initialProductName);
  ...

Props Type

tsx
// ❌ Avoid using React.FC type
type FooProps = {
  name: string;
  score: number;
};

export const Foo: React.FC<FooProps> = ({ name, score }) => {

// ✅ Use props argument with type
type FooProps = {
  name: string;
  score: number;
};

export const Foo = ({ name, score }: FooProps) => {...

Component Types

Container
  • All container components have the suffix "Container" or "Page" [ComponentName]Container|Page. Use the "Page" suffix to indicate that a component is an actual web page.
  • Each feature has a container component (AddUserContainer.tsx, EditProductContainer.tsx, ProductsPage.tsx etc.)
  • Includes business logic.
  • API integration.
  • Structure:
    ProductsPage/
    ├─ api/
    │  └─ useGetProducts/
    ├─ components/
    │  └─ ProductItem/
    ├─ utils/
    │  └─ filterProductsByType/
    └─ index.tsx
UI - Feature
  • Representational components that are designed to fulfill feature requirements.
  • Nested inside container component folder.
  • Should follow function conventions as much as possible.
  • No API integration.
  • Structure:
    ProductItem/
    ├─ index.tsx
    ├─ ProductItem.stories.tsx
    └─ ProductItem.test.tsx
UI - Design system
  • Globally reusable or shared components used throughout the whole codebase.
  • Structure:
    Button/
    ├─ index.tsx
    ├─ Button.stories.tsx
    └─ Button.test.tsx

Store & Pass Data

  • Pass only the necessary props to child components rather than passing the entire object.

  • Utilize storing state in the URL, especially for filtering, sorting etc.

  • Don't sync URL state with local state.

  • Consider passing data simply through props, using the URL, or composing children. Use global state (Zustand, Context) as a last resort.

  • Use React compound components when components should belong and work together: menu, accordion, navigation, tabs, list, etc.
    Always export compound components as:

    tsx
    // PriceList.tsx
    const PriceListRoot = ({ children }) => <ul>{children}</ul>;
    const PriceListItem = ({ title, amount }) => <li>Name: {name} - Amount: {amount}<li/>;
    
    // ❌
    export const PriceList = {
      Container: PriceListRoot,
      Item: PriceListItem,
    };
    // ❌
    PriceList.Item = Item;
    export default PriceList;
    
    // ✅
    export const PriceList = PriceListRoot as typeof PriceListRoot & {
      Item: typeof PriceListItem;
    };
    PriceList.Item = PriceListItem;
    
    // App.tsx
    import { PriceList } from "./PriceList";
    
    <PriceList>
      <PriceList.Item title="Item 1" amount={8} />
      <PriceList.Item title="Item 2" amount={12} />
    </PriceList>;
  • UI components should show derived state and send events, nothing more (no business logic).

  • As in many programming languages, function arguments can be passed to the next function and on to the next etc.
    React components are no different, so prop drilling should not become an issue.
    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 is encouraged (TanStack Query, Apollo Client etc.).

  • Use of client-state library for global state is discouraged.
    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 Zustand or Context.

Frequently asked questions

What does the Typescript React AI skill do?

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.

Why use Typescript React on TypingMind?

Because you install it once and use it with any model. Typescript React is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Typescript React in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mkosir/typescript-style-guide/tree/main/skills/typescript-react. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Typescript React?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Typescript React?

As many as you like. As long as a model supports skills, you can use Typescript React with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Typescript React AI skill free?

Yes. It is published on GitHub by mkosir under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇