Refactor
Skill eduardo-lezama/intranet-dashboard/.windsurf.bak/skills/refactor
Intranet dashboard based on html, css and js. Includes advance use of agentic workflows and MCP. For personal use with my own info panels, automation and IoT related stuff
npx -y skills add eduardo-lezama/intranet-dashboard --skill refactorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Usar al refactorizar código existente sin cambiar funcionalidad
SKILL.md
2.1 KB, as published. Nobody here has run it
Cuándo usar esta skill
- Al mejorar estructura de código sin cambiar comportamiento
- Cuando se detecten code smells o duplicación
- Para aplicar patrones más limpios
Contexto necesario antes de empezar
- Leer el código a refactorizar completamente
- Identificar tests existentes (si los hay)
- Entender el comportamiento actual
- Definir qué se va a mejorar y qué NO se va a tocar
Pasos
1. Análisis
- Identificar el problema (duplicación, complejidad, naming, etc.)
- Verificar si hay tests que cubran el código
- Documentar comportamiento actual
2. Plan de refactor
- Listar cambios específicos a realizar
- Definir orden de cambios (de menor a mayor riesgo)
- Identificar puntos de verificación
3. Ejecutar refactor
- Hacer cambios incrementales
- Verificar después de cada cambio significativo
- Mantener commits pequeños y atómicos
4. Validación
ruff check .
ruff format --check .
python -c "from app import app"
pytest tests/ -v # si hay tests
5. Test manual
- Verificar que el comportamiento no ha cambiado
- Probar casos edge si aplica
<patrones_criticos> SIEMPRE:
- Leer tests antes de tocar código
- Verificar comportamiento antes y después
- Commits pequeños y descriptivos
- Mantener la API pública igual
NUNCA:
- Cambiar comportamiento durante refactor
- Eliminar código "muerto" sin confirmar
- Refactorizar y añadir features al mismo tiempo
- Ignorar tests que fallen
PREFERENTEMENTE:
- Extraer funciones/métodos pequeños
- Mejorar nombres para claridad
- Reducir anidación de código </patrones_criticos>
Refactors comunes en este proyecto
- Ordenar imports →
ruff check --fix . - Extraer lógica a cliente → Mover de
main.pya*_client.py - Eliminar duplicación → Crear función helper
- Mejorar error handling → Añadir logging consistente
Checklist de validación
- Comportamiento idéntico al original
-
ruff check .pasa - Tests pasan (si existen)
- La app arranca correctamente
- No se han tocado archivos fuera del scope