Agent skill

Typescript React

by mikotoIO in mikotoIO/mikoto

Contains TypeScript/React patterns and conventions for the Mikoto frontend.

MITAuto-check passedFrontend & Design

Install Typescript React

skills CLI
$ npx skills add mikotoIO/mikoto --skill typescript-react -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mikotoIO/mikoto typescript-react --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mikotoIO/mikoto.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/typescript-react .claude/skills/typescript-react && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
typescript-react
GitHub stars
132
Token cost
~2.5k tokens
SKILL.md length
362 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Contains TypeScript/React patterns and conventions for the Mikoto frontend.

  • Tasks that involve React components
  • SKILL.md covers Activation, Project Structure, Component Patterns and State Management, plus 10 more sections
  • Calls pnpm

What it does

Typescript React is an agent skill from mikotoIO/mikoto. Contains TypeScript/React patterns and conventions for the Mikoto frontend. ALWAYS activate before working on frontend code in apps/client/ or packages/.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering React components. It works with TypeScript and React. The licence is MIT.

When your agent uses it

  • Tasks that involve React components

Example prompts

  • “Use the typescript-react skill to contain TypeScript/React patterns and conventions for the Mikoto frontend”
  • “/typescript-react”

What it can do on your machine

Read from SKILL.md and the folder at commit 88f7ff0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Typescript React loads about 2.5k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 362 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mikotoIO/mikoto at commit 88f7ff0, republished under its MIT licence (© mikotoIO). 362 words, ~2,493 tokens.

Download SKILL.mdSave it as .claude/skills/typescript-react/SKILL.md (or your agent's skills folder).
name
typescript-react
description
Contains TypeScript/React patterns and conventions for the Mikoto frontend. ALWAYS activate before working on frontend code in apps/client/ or packages/.

TypeScript/React Development in Mikoto

Activation

TRIGGER when: working on frontend code in apps/client/, packages/mikoto.js/, or any TypeScript/React files.

Project Structure

apps/client/src/
├── components/
│   ├── atoms/          # Small, single-purpose (Avatar, SpaceIcon)
│   ├── molecules/      # Compound components (markdown, editors)
│   ├── surfaces/       # Page/tab views (MessageSurface, DocumentChannel)
│   ├── modals/         # Modal dialogs
│   ├── sidebars/       # Sidebar components
│   ├── tabs/           # Tab UI components
│   ├── ui/             # Chakra UI component re-exports
│   ├── icons/          # Custom FontAwesome icons
│   └── design/         # Design system components
├── views/              # Top-level views (MainView, AuthView)
├── hooks/              # Custom React hooks
├── store/              # Jotai atoms, LocalDB
└── functions/          # Utility functions (fileUpload, notify)

packages/
├── mikoto.js/          # Core API client library
│   ├── managers/       # Resource managers (SpaceManager, ChannelManager)
│   ├── WebsocketApi.ts # WebSocket connection
│   ├── MikotoClient.ts # Main client class
│   ├── AuthClient.ts   # Authentication
│   └── api.gen.ts      # Auto-generated types from OpenAPI
├── mikoto-ui/          # UI component library
├── permcheck/          # Permission checking utilities
├── lexical-markdown/   # Markdown editing plugin
└── tsconfig/           # Shared TypeScript config

Component Patterns

All components are functional with typed props interfaces:

tsx
export const Avatar = (
  props: {
    src?: string | null;
    userId?: string;
    size?: number;
  } & React.HTMLAttributes<HTMLImageElement>,
) => {
  const { src, userId, size, ...rest } = props;

  // implementation

  return <img src={src} size={size} {...rest} />;
};
Styling

We use Chakra UI

tsx
import { chakra } from '@chakra-ui/react';

// Chakra factory
const Card = chakra('div', {
  base: { p: '4', bg: 'bg.panel' },
});

There's a lot of legacy code that uses Emotion styled-components, but we're migrating to Chakra UI.

Surface System (Tab/Panel Management)

Components map to surface kinds for dynamic rendering:

tsx
const surfaceMap = {
  textChannel: MessageSurface,
  voiceChannel: lazy(() => import('./Voice')),
  documentChannel: lazy(() => import('./Documents')),
  search: SearchSurface,
  spaceSettings: SpaceSettingsSurface,
  // ...
};
  • Surfaces are lazy-loaded with React.lazy() and Suspense
  • DockView manages multi-pane layout
  • Tabs identified by kind/key format
Modal Pattern
tsx
// Modals use useModalKit() hook
// State managed through modalState atom
// Content rendered in Chakra DialogRoot
Context Menu Pattern
tsx
// useContextMenu() hook
// Position-aware with auto-flip near viewport edge
// Dismisses on outside click or Escape

State Management

Three state tools are used for different purposes:

Jotai (UI/Client State)
tsx
import { atom, useAtom, useAtomValue, useSetAtom } from 'jotai';
import { atomWithStorage } from 'jotai/utils';

// Simple atom
const rightBarOpenState = atom(false);

// Persisted atom
const themeState = atomWithStorage('theme', 'dark');

// Atom family (parameterized)
const tabNameFamily = atomFamily((id: string) => atom(''));

// Usage
const [value, setValue] = useAtom(rightBarOpenState);
const value = useAtomValue(rightBarOpenState);
const setValue = useSetAtom(rightBarOpenState);
Valtio (Reactive Data/Managers)

Used in mikoto.js for reactive object proxies:

tsx
import { proxy, useSnapshot } from 'valtio';
import { proxyMap } from 'valtio/utils';

// CachedManager uses proxyMap for collections
// useMaybeSnapshot() for conditional proxy observation
React Query (Server State)
tsx
// QueryClient configured with structuralSharing: false
// (due to Mikoto.js class objects)
LocalDB (Typed localStorage)
tsx
import { LocalDB } from '@/store/LocalDB';

// Runtime type-safe wrapper using Zod
const db = new LocalDB('key', schema, initFunction);
db.get(); // typed
db.set(value); // validated

API Client (mikoto.js)

MikotoClient
tsx
import { useMikoto } from '@/hooks';

function MyComponent() {
  const mikoto = useMikoto();

  // REST calls use bracket notation
  const space = await mikoto.rest['spaces.get'](undefined, {
    params: { spaceId: id },
  });

  // WebSocket operations
  mikoto.ws.send('typing.start', { channelId });
}
Manager Pattern

Managers wrap REST/WebSocket with caching:

tsx
// SpaceManager, ChannelManager, UserManager, etc.
// Extend CachedManager<T> for cached resources
// Methods: _get(), _insert(), _delete(), values()
// Auto-subscribe to WebSocket events for real-time updates
Context Hooks
tsx
export function useMikoto(): MikotoClient; // Main client
export function useAuthClient(): AuthClient; // Auth client

Routing

React Router v6 with browser router:

/                                          → MainView (shell)
/spaces, /friends, /discover, /settings    → Top-level views
/space/:spaceRef                           → Space view
/space/:spaceRef/channel/:channelId        → Channel view
/space/:spaceRef/settings                  → Space settings
/login, /register, /forgotpassword         → Auth views
/invite/:inviteCode                        → Invite handler
  • :spaceRef accepts both UUIDs and @handles
  • Routes wrapped with MikotoClientProvider for auth

Custom Hooks

tsx
// Context access
useMikoto(); // MikotoClient instance
useAuthClient(); // AuthClient instance

// Data fetching
useFetchMember(space); // Load space members

// UI utilities
useContextMenu(fn); // Right-click menus
useContextMenuX(); // Extended context menu
useModalKit(); // Modal management
useTabkit(); // Tab operations
useInterval(cb, ms); // setInterval wrapper
useIsMobile(); // Mobile detection
useErrorElement(); // Error boundary helper

TypeScript Conventions

Config
  • Strict mode: true
  • Target: es2020
  • Module resolution: bundler
  • JSX: react-jsx (new transform)
  • Path alias: @/* → ./src/*
Type Patterns
tsx
// Props: always interface
interface ButtonProps {
  variant?: 'solid' | 'outline';
  size?: 'sm' | 'md' | 'lg';
}

// Unions/mapped types: use type
type ConnectionState = 'connecting' | 'reconnecting' | 'disconnected';

// Zod for runtime validation
import { z } from 'zod';
const schema = z.object({ name: z.string() });

// Generic constraints
class CachedManager<T extends { id: string }> { ... }
Strict Safety
  • No implicit any
  • Optional chaining (?.) and nullish coalescing (??) used throughout
  • Type guards with is keyword
  • Discriminated unions for state types

File Naming

TypeConventionExample
ComponentsPascalCaseAvatar.tsx, UserArea.tsx
HookscamelCase with use prefixuseInterval.ts
UtilitiescamelCasefileUpload.ts
Types/ClassesPascalCaseLocalDB.ts, MikotoClient.ts
DirectoriescamelCase or kebab-caseatoms/, mikoto-ui/
Show full SKILL.md (144 more words)Show less

Import Conventions

tsx
// Path alias (always use for app imports)
import { Avatar } from '@/components/atoms/Avatar';
import { Button, Dialog } from '@/components/ui';
// Barrel exports from index files
import { useAuthClient, useMikoto } from '@/hooks';

Key Dependencies

CategoryLibraries
UI@chakra-ui/react v3, @emotion/styled, framer-motion
Statejotai, valtio, @tanstack/react-query v5
Editorslexical, slate, y.js
Real-timesocket.io-client, livekit-client
Formsreact-hook-form, zod
Layoutdockview-react, re-resizable, react-virtuoso
Icons@fortawesome/react-fontawesome, react-icons
Routingreact-router-dom v6

Development Commands

bash
pnpm dev                # Vite dev server (from apps/client/)
moon :typecheck         # Monorepo-wide type check
moon :lint              # ESLint
moon :lint.fix          # Auto-fix lint issues
moon :format            # Prettier
moon :test              # Vitest
moon :generate          # Regenerate API types from OpenAPI schema

Testing

tsx
import { expect, test } from 'vitest';

test('description', () => {
  expect(result).toBe(expected);
});

Best Practices

  • Use @/ imports for all app-internal imports
  • No casts - prefer to check the types/use zod validators, over using as (especially no any)
  • Type all props with named interfaces, not inline types
  • Use Jotai for UI state, Valtio for data proxies, React Query for server state
  • Lazy load surfaces and heavy components with React.lazy()
  • Use existing hooks — check @/hooks before writing new state logic
  • Use barrel exports — add new components to relevant index.ts
  • Run moon :typecheck after all frontend changes
  • Use Chakra semantic tokens (bg.subtle, fg.muted, border) for theme compatibility
  • Prefer Chakra style props over inline CSS, but Emotion styled is acceptable for complex components

© mikotoIO, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/typescript-react of mikotoIO/mikoto.

Open the folder on GitHubat commit 88f7ff0

Compare with similar skills

Typescript React next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Typescript React compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Typescript React this skillmikotoIO/mikoto132—~2.5kAutomated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
Dify Component Writing Guidelanggenius/dify158k—~626Automated safety check: PassCustom licence
React Frontend Development Guidelinesdiet103/claude-code-infrastructure-showcase10k2 repos~2.9kAutomated safety check: PassMIT
Formik Form PatternsChrisWiles/claude-code-showcase6.1k3 repos~2.1kAutomated safety check: PassNone
Animated React Component LibrariesHainrixz/editor-pro-max2601 repos~5.7kAutomated safety check: PassCustom licence

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated today
    Frontend & DesignAuto-check passed
  • React Frontend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.

    10k GitHub starsUsed in 2 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Formik Form Patterns

    ChrisWiles/claude-code-showcase

    Shows how to build forms with Formik and Yup validation, including conditional rules, field helpers, GraphQL submission, edit forms and multi-step flows.

    6.1k GitHub starsUsed in 3 repos~2.1k tokens
    Frontend & DesignAuto-check passed
  • Animated React Component Libraries

    Hainrixz/editor-pro-max

    Helps choose and drop in animated React components from Magic UI and React Bits for landing pages, marketing sites and dashboards, instead of hand-coding animations.

    260 GitHub starsUsed in 1 repo~5.7k tokens
    Frontend & DesignAuto-check passed
  • Fast Typescript Check

    internet-development/www-sacred

    Keep www-sacred's TypeScript fast to type-check and fast to run.

    1.6k GitHub stars~4.3k tokensUpdated today
    Frontend & DesignAuto-check passed

More from mikotoIO/mikoto

  • Chakra UI

    mikotoIO/mikoto

    Contains Chakra UI v3 documentation for styling, theming, and components.

    132 GitHub stars~824 tokensUpdated 2 mo ago
    Auto-check passed
  • Learn

    mikotoIO/mikoto

    Creates a new skill or updates an existing skill to capture new knowledge.

    132 GitHub stars~517 tokensUpdated 2 mo ago
    Auto-check passed
  • Rust

    mikotoIO/mikoto

    Contains knowledge on Mikoto usage of Rust. An agent skill from mikotoIO/mikoto.

    132 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Rebase

    mikotoIO/mikoto

    Rebases the current branch onto the latest main branch. An agent skill from mikotoIO/mikoto.

    132 GitHub stars~290 tokensUpdated 2 mo ago
    Auto-check passed
  • Create PR

    mikotoIO/mikoto

    Creates a pull request using the GitHub CLI. An agent skill from mikotoIO/mikoto.

    132 GitHub stars~138 tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Typescript React

What does Typescript React do?

Contains TypeScript/React patterns and conventions for the Mikoto frontend. Typescript React is an agent skill from mikotoIO/mikoto. Contains TypeScript/React patterns and conventions for the Mikoto frontend.

When should I use Typescript React?

Typescript React fits situations like: tasks that involve React components.

How do I install Typescript React in Claude Code?

Run `npx skills add mikotoIO/mikoto --skill typescript-react -a claude-code`. Or copy the skill folder (.claude/skills/typescript-react in mikotoIO/mikoto) into .claude/skills/typescript-react in your project. Claude Code loads it when a task matches its description.

How do I install Typescript React in Codex?

Run `npx skills add mikotoIO/mikoto --skill typescript-react -a codex`. Or copy the skill folder (.claude/skills/typescript-react in mikotoIO/mikoto) into .agents/skills/typescript-react in your project. Codex loads it when a task matches its description.

Can I use Typescript React in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mikotoIO/mikoto --skill typescript-react -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/typescript-react, .gemini/skills/typescript-react, .github/skills/typescript-react and .opencode/skills/typescript-react in your project.

What does Typescript React need to run?

Going by SKILL.md and its folder, Typescript React needs the command-line tools its instructions call (pnpm).

Does Typescript React access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Typescript React safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Typescript React use?

Typescript React is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Typescript React use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Typescript React?

Skills that share tags, products or a category with Typescript React: Web Artifacts Builder (anthropics/skills, 180k stars), Dify Component Writing Guide (langgenius/dify, 158k stars), React Frontend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars) and Formik Form Patterns (ChrisWiles/claude-code-showcase, 6.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Typescript React?

mikotoIO (a GitHub organization) maintains it in mikotoIO/mikoto, which has 132 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 5, 2026.

Source: mikotoIO/mikoto on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.