.claude/skills/refactor/SKILL.md
Reorganizar y refactorizar componentes en carpetas por dominio. Eliminar duplicados, extraer componentes reutilizables, mejorar imports.
npx skillsauth add placidovenegas/kiyoko-AI refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
src/components/
├── ui/ # Primitivos UI (shadcn + custom)
│ ├── button.tsx
│ ├── input.tsx
│ ├── card.tsx
│ ├── dialog.tsx
│ ├── dropdown-menu.tsx
│ ├── select.tsx
│ ├── tabs.tsx
│ ├── badge.tsx
│ ├── skeleton.tsx
│ └── ...
│
├── layout/ # Estructura y navegación
│ ├── Sidebar.tsx
│ ├── sidebar/ # Sub-componentes del sidebar
│ ├── Breadcrumbs.tsx
│ ├── MobileNav.tsx
│ └── UserMenu.tsx
│
├── shared/ # Componentes genéricos reutilizables
│ ├── CommandMenu.tsx
│ ├── FavoriteButton.tsx
│ ├── LoadingScreen.tsx
│ ├── EmptyState.tsx
│ └── ConfirmDialog.tsx
│
├── auth/ # Autenticación
│ ├── AuthCard.tsx
│ └── ...
│
├── project/ # Componentes de proyecto
│ ├── ProjectCard.tsx
│ ├── ProjectGrid.tsx
│ └── ProjectView.tsx
│
├── video/ # Componentes de video
│ ├── VideoCard.tsx
│ ├── VideoGrid.tsx
│ └── VideoView.tsx
│
├── scene/ # Escenas (edición)
│ ├── SceneCard.tsx
│ ├── PromptEditor.tsx
│ └── ...
│
├── ai-chat/ # Chat con Kiyoko
│ ├── ChatPanel.tsx
│ └── ...
│
├── narration/ # Narración y voces
├── timeline/ # Timeline y arcos
├── analysis/ # Análisis de video
├── exports/ # Exportación
├── tasks/ # Gestión de tareas
├── characters/ # Personajes
├── backgrounds/ # Fondos
├── admin/ # Panel admin
├── publications/ # Publicaciones
└── settings/ # Configuración
index.ts en cada carpeta para re-exportarPage (Server Component)
└── View (Client Component — container principal)
├── Header (título + acciones)
├── Filters/Tabs (navegación interna)
├── Content (grid, tabla, lista)
│ └── Card/Row (item individual)
└── Modals/Dialogs (crear, editar, eliminar)
Si un patrón aparece 3+ veces → crear componente en ui/ o shared/:
PageHeaderCardGridDialog estándarEmptyState (ya existe en ui/)ConfirmDialog (ya existe en shared/)// Orden de imports:
// 1. React/Next
import { useState } from 'react';
import Link from 'next/link';
// 2. Librerías externas
import { useQuery } from '@tanstack/react-query';
// 3. Componentes UI
import { Button } from '@/components/ui/button';
import { Card } from '@/components/ui/card';
// 4. Componentes del dominio
import { VideoCard } from '@/components/video/VideoCard';
// 5. Hooks y utils
import { useProject } from '@/hooks/useProject';
import { queryKeys } from '@/lib/query/keys';
// 6. Types
import type { Video } from '@/types';
grep -rn para encontrar el componente en todos los archivosnpx tsc --noEmit para confirmar que no hay erroresany types → tipar correctamente con Database typesuseState + useEffect + fetch → migrar a useQuerytesting
Auditar componentes UI para consistencia visual, compliance con design system, accesibilidad y patrones Notion/Supabase. Usar cuando se quiera verificar calidad visual del proyecto.
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
tools
Cuando necesites crear, modificar o borrar tablas, enums, indices, RLS policies o seeds en Supabase. También para ejecutar SQL vía MCP.
testing
Motor de escenas de Kiyoko AI. Usar cuando se trabaje con escenas, prompts de imagen/video, timeline, camara, o generacion de contenido audiovisual. Referencia completa en docs/v6/MY DOCUMENT/kiyoko-motor-escenas-spec.md