スキル一覧に戻る
dallington

react-best-practices-refactor

by dallington

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: react-best-practices-refactor description: Refactors large React files into single-responsibility components using Tailwind CSS and a strict feature-based structure compatible with AstroJS.

React Best Practices Refactor

This skill enforces senior-level React architecture, especially when refactoring code generated by Lovable and preparing it for AstroJS projects.

When to use this skill

Use this skill when:

  • A .tsx file contains multiple components
  • React code is large, unstructured, or AI-generated
  • The user asks to refactor, clean, or organize React code
  • Preparing React components for AstroJS usage

Do NOT use this skill when:

  • The code is already modular and well-structured
  • Only small edits are requested

How to use it

  1. Identify the page-level component
  2. Split UI, logic, and composition into separate files
  3. Enforce feature-based folder structure
  4. Apply Tailwind CSS for all styling
  5. Remove the original monolithic file

Folder Structure (Mandatory)

/components/react/Prompt/ ├── PromptPage.tsx ├── PromptHeader.tsx ├── PromptForm.tsx ├── PromptList.tsx ├── PromptItem.tsx ├── hooks/ │ └── usePrompt.ts ├── types.ts └── index.ts

Component Rules

  • One component per file
  • Named exports only
  • Props must be typed
  • Tailwind CSS only (no CSS files)
  • No complex logic inside JSX

Expected Output

  • Modular, maintainable React components
  • AstroJS-compatible code
  • Clear and explicit folder structure

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です