AI студия Владимира Ломтева
УСЛУГИПРОЕКТЫСТАТЬИБАЗА ЗНАНИЙМаркетплейсПолезные сервисы

Оставьте заявку,
чтобы обсудить проект

Напишите ваш вопрос, не забудьте указать телефон. Мы перезвоним и все расскажем.

Контакты

Москва

Работаем по всей России
и миру (онлайн)

+7 (999) 760-24-41

Ежедневно с 9:00 до 21:00

lamooof@gmail.com

По вопросам сотрудничества

TelegramWhatsApp

Есть предложение?

Напишите нам в мессенджеры

© 2025 AI студия Владимира Ломтева

Политика конфиденциальностиСогласие на обработку ПДн|ИНН 623412173261
    Typescript React Reviewer — Скилл для ИИ-агентов | AI Рассвет

    Typescript React Reviewer

    Expert code reviewer for TypeScript + React 19 applications. Use when reviewing React code, identifying anti patterns, evaluating state management, or assessing code maintainability. Triggers: code review requests, PR reviews, React architecture evaluation, identifying code smells, TypeScript type safety checks, useEffect abuse detection, state management review.

    Скиллы для разработки#GitHub#dotneet/claude-code-marketplace#skills.sh
    Скачивания
    0
    В избранном
    0
    Комментарии
    0
    Просмотры

    Установить скилл

    Добавьте инструмент одной командой или скачайте проверенный архив версии.

    npx skills add dotneet/claude-code-marketplace --skill typescript-react-reviewer
    Скачать ZIP
    Версия
    1.0.0+07fa7eac95c2
    Автор
    Владимир Ломтев
    Репозиторий
    dotneet/claude-code-marketplace
    GitHub: dotneet/claude-code-marketplace
    2

    Установить скилл

    Добавьте инструмент одной командой или скачайте проверенный архив версии.

    npx skills add dotneet/claude-code-marketplace --skill typescript-react-reviewer
    Скачать ZIP
    Версия
    1.0.0+07fa7eac95c2
    Автор
    Владимир Ломтев
    Репозиторий
    dotneet/claude-code-marketplace
    GitHub: dotneet/claude-code-marketplace

    Как установить

    1. 1Скопируйте команду из блока установки.
    2. 2Запустите её в терминале из каталога проекта.

    Документация

    TypeScript + React 19 Code Review Expert

    Expert code reviewer with deep knowledge of React 19's new features, TypeScript best practices, state management patterns, and common anti-patterns.

    Review Priority Levels

    🚫 Critical (Block Merge)

    These issues cause bugs, memory leaks, or architectural problems:

    Issue Why It's Critical
    useEffect for derived state Extra render cycle, sync bugs
    Missing cleanup in useEffect Memory leaks
    Direct state mutation (.push(), .splice()) Silent update failures
    Conditional hook calls Breaks Rules of Hooks
    key={index} in dynamic lists State corruption on reorder
    any type without justification Type safety bypass
    useFormStatus in same component as <form> Always returns false (React 19 bug)
    Promise created inside render with use() Infinite loop

    ⚠️ High Priority

    Issue Impact
    Incomplete dependency arrays Stale closures, missing updates
    Props typed as any Runtime errors
    Unjustified useMemo/useCallback Unnecessary complexity
    Missing Error Boundaries Poor error UX
    Controlled input initialized with undefined React warning

    📝 Architecture/Style

    Issue Recommendation
    Component > 300 lines Split into smaller components
    Prop drilling > 2-3 levels Use composition or context
    State far from usage Colocate state
    Custom hooks without use prefix Follow naming convention

    Quick Detection Patterns

    useEffect Abuse (Most Common Anti-Pattern)

    // ❌ WRONG: Derived state in useEffect
    const [firstName, setFirstName] = useState('');
    const [fullName, setFullName] = useState('');
    useEffect(() => {
      setFullName(firstName + ' ' + lastName);
    }, [firstName, lastName]);
    
    // ✅ CORRECT: Compute during render
    const fullName = firstName + ' ' + lastName;
    
    // ❌ WRONG: Event logic in useEffect
    useEffect(() => {
      if (product.isInCart) showNotification('Added!');
    }, [product]);
    
    // ✅ CORRECT: Logic in event handler
    function handleAddToCart() {
      addToCart(product);
      showNotification('Added!');
    }
    

    React 19 Hook Mistakes

    // ❌ WRONG: useFormStatus in form component (always returns false)
    function Form() {
      const { pending } = useFormStatus();
      return <form action={submit}><button disabled={pending}>Send</button></form>;
    }
    
    // ✅ CORRECT: useFormStatus in child component
    function SubmitButton() {
      const { pending } = useFormStatus();
      return <button type="submit" disabled={pending}>Send</button>;
    }
    function Form() {
      return <form action={submit}><SubmitButton /></form>;
    }
    
    // ❌ WRONG: Promise created in render (infinite loop)
    function Component() {
      const data = use(fetch('/api/data')); // New promise every render!
    }
    
    // ✅ CORRECT: Promise from props or state
    function Component({ dataPromise }: { dataPromise: Promise<Data> }) {
      const data = use(dataPromise);
    }
    

    State Mutation Detection

    // ❌ WRONG: Mutations (no re-render)
    items.push(newItem);
    setItems(items);
    
    arr[i] = newValue;
    setArr(arr);
    
    // ✅ CORRECT: Immutable updates
    setItems([...items, newItem]);
    setArr(arr.map((x, idx) => idx === i ? newValue : x));
    

    TypeScript Red Flags

    // ❌ Red flags to catch
    const data: any = response;           // Unsafe any
    const items = arr[10];                // Missing undefined check
    const App: React.FC<Props> = () => {}; // Discouraged pattern
    
    // ✅ Preferred patterns
    const data: ResponseType = response;
    const items = arr[10]; // with noUncheckedIndexedAccess
    const App = ({ prop }: Props) => {};  // Explicit props
    

    Review Workflow

    1. Scan for critical issues first - Check for the patterns in "Critical (Block Merge)" section
    2. Check React 19 usage - See react19-patterns.md for new API patterns
    3. Evaluate state management - Is state colocated? Server state vs client state separation?
    4. Assess TypeScript safety - Generic components, discriminated unions, strict config
    5. Review for maintainability - Component size, hook design, folder structure

    Reference Documents

    For detailed patterns and examples:

    • react19-patterns.md - React 19 new hooks (useActionState, useOptimistic, use), Server/Client Component boundaries
    • antipatterns.md - Comprehensive anti-pattern catalog with fixes
    • checklist.md - Full code review checklist for thorough reviews

    State Management Quick Guide

    Data Type Solution
    Server/async data TanStack Query (never copy to local state)
    Simple global UI state Zustand (~1KB, no Provider)
    Fine-grained derived state Jotai (~2.4KB)
    Component-local state useState/useReducer
    Form state React 19 useActionState

    TanStack Query Anti-Pattern

    // ❌ NEVER copy server data to local state
    const { data } = useQuery({ queryKey: ['todos'], queryFn: fetchTodos });
    const [todos, setTodos] = useState([]);
    useEffect(() => setTodos(data), [data]);
    
    // ✅ Query IS the source of truth
    const { data: todos } = useQuery({ queryKey: ['todos'], queryFn: fetchTodos });
    

    TypeScript Config Recommendations

    {
      "compilerOptions": {
        "strict": true,
        "noUncheckedIndexedAccess": true,
        "noImplicitReturns": true,
        "exactOptionalPropertyTypes": true
      }
    }
    

    noUncheckedIndexedAccess is critical - it catches arr[i] returning undefined.

    Immediate Red Flags

    When reviewing, flag these immediately:

    Pattern Problem Fix
    eslint-disable react-hooks/exhaustive-deps Hides stale closure bugs Refactor logic
    Component defined inside component Remounts every render Move outside
    useState(undefined) for inputs Uncontrolled warning Use empty string
    React.FC with generics Generic inference breaks Use explicit props
    Barrel files (index.ts) in app code Bundle bloat, circular deps Direct imports

    Требования и возможности

    Источник пакета
    https://github.com/dotneet/claude-code-marketplace/tree/07fa7eac95c2323f73e5a8a961b70bb9e207f1d0/review-tool/skills/typescript-react-reviewer

    Файлы версии

    ПутьРазмерSHA256
    SKILL.md66388ad9846c1b55bd3a...
    references/antipatterns.md12240edd3b2848c8a6918...
    references/checklist.md7616b34c02df2e8e868b...
    references/react19-patterns.md7749ccc9ea423070269e...

    Частые вопросы

    Как установить Typescript React Reviewer?
    Используйте команду npx skills add dotneet/claude-code-marketplace --skill typescript-react-reviewer или скачайте ZIP-архив.
    Можно ли скачать Typescript React Reviewer бесплатно?
    Да, опубликованную версию можно скачать из маркетплейса бесплатно.

    Похожие инструменты

    Смотреть все
    React DoctorUse when finishing a feature, fixing a bug, before committing React code, or when the user types `/doctor`, asks to scan, triage, or clean up React diagnostics. Covers lint, accessibility, bundle size, architecture. Includes a regression check and a full local-triage workflow that fetches the canonical playbook.Argent Android Emulator SetupSet up and connect to an Android emulator using argent MCP tools. Use when starting a new session on Android, booting an emulator, getting a device serial, or before any UI interaction task.Fireworks Tech GraphCreate technical diagrams such as software architecture, data flow, flowcharts, sequence diagrams, C4 reviews, cloud deployments, event streams, observability investigations, agent/memory systems, UML, ER, network topology, timelines, and technical concept maps, then export SVG, PNG, focused semantic SVG-to-GIF motion, or offline interactive HTML. Treat direct requests such as "Generate a GIF", "生成 GIF", or "制作 GIF" as motion requests, and use this skill when the user asks to visualize a system or engineering concept. Do not use for photos, raster artwork, or quantitative data charts.Modern Web GuidanceSearch tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns.
    Комментарии

    Войдите, чтобы оставить комментарий.

    Комментариев пока нет.