component-analysis
Analyze a React/TypeScript component for compliance with coding guidelines and suggest improvements.
от J-StaR-Films-Studios★ 27 звёзд на GitHub
Установить component-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Component Analysis Skill
Analyze components for coding standards compliance and provide actionable improvements.
When to Use
- Refactoring discussions
- Before major component changes
- When asked to "analyze" or "audit" a component
- Code review of specific files
Analysis Process
1. Identify Component
Get from user or extract:
- Component Path: Full file path
- Component Name: The component name
2. Initial Examination
Read file and check:
- Code structure and organization
- Purpose and functionality
- Immediate issues
- Total lines (check 200-line rule)
3. Coding Guidelines Check
| Check | What to Look For |
|---|---|
| Size | < 200 lines (refactor if exceeded) |
| Single Responsibility | Does one thing well |
| TypeScript | Proper types, interfaces for props |
| Naming | PascalCase components, camelCase functions, handle* events |
| Hooks | Proper use of React hooks and effects |
| Documentation | TSDoc/JSDoc comments |
| Imports | Organized, no unused imports |
4. Styling Check
| Check | What to Look For |
|---|---|
| Tailwind v4 | Using @theme integration |
| Color Tokens | Using primary, accent, semantic tokens |
| Responsive | Mobile-first (sm:, md:, lg:) |
| Dark Mode | dark: variants |
| Performance | Avoiding expensive backdrop-filter |
5. Mobile-First Check
- Mobile-first breakpoints
- Touch-friendly interactions
- Responsive typography
- Container responsiveness
6. Generate Report
# Component Analysis: [Name]
**File:** `[path]`
**Lines:** [X] / 200 max
**Score:** [X]/10
## ✅ Compliant
- [Things done well]
## ⚠️ Warnings
- [Minor issues]
## ❌ Violations
- [Critical issues]
## 📋 Recommendations
### High Priority
1. [Critical fix]
### Medium Priority
1. [Improvement]
## 🔧 Suggested Fixes
[Before/After code examples]
7. Offer Next Steps
- A) Implement high-priority fixes
- B) Create feature documentation
- C) Refactor if > 200 lines
Severity Levels
- 🔴 Critical: Breaking functionality, security issues
- 🟡 Major: Performance, accessibility violations
- 🟢 Minor: Code style, documentation
Common Violations
- No TypeScript interface for props → Define
interface ComponentProps - useEffect missing dependencies → Add to dependency array
- Hardcoded colors → Use Tailwind tokens
- No dark mode → Add
dark:variants - Missing alt text → Add descriptive alt attributes
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл component-analysis?
Analyze a React/TypeScript component for compliance with coding guidelines and suggest improvements.
Как установить скилл component-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл component-analysis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…