agentsclimarketplace

Refactor

Skill GlamgarOnDiscord/claude-saas-blueprint/.claude/skills/refactor

Plug-and-play AI workflow that turns Claude Code, Cursor, Copilot or any AI agent into a senior SaaS engineer. Hexagonal architecture, multi-tenant by default, 31 skills + APEX workflow.

Install
npx -y skills add GlamgarOnDiscord/claude-saas-blueprint --skill refactor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 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

Refactoring sûr et méthodique. Améliorer sans casser.

SKILL.md

1.7 KB, as published. Nobody here has run it

Arguments

  • scope : Quoi refactorer (fichier, module, pattern)
  • goal : L'objectif du refactoring

Instructions

Phase 1 — Comprendre l'existant

  1. Lire le code à refactorer
  2. Lister TOUS les fichiers qui importent/utilisent le code concerné (Grep)
  3. Vérifier que les tests existent pour le code à refactorer
  4. Si pas de tests → en écrire AVANT de refactorer

Phase 2 — Planifier

Utiliser EnterPlanMode si blast radius > 3 fichiers.

Types de refactoring courants :

  • Extract : Sortir une fonction/composant d'un fichier trop long
  • Rename : Renommer pour clarifier (utiliser replace_all avec Grep)
  • Restructure : Déplacer des fichiers dans une meilleure organisation
  • Simplify : Réduire la complexité (dé-nester, éliminer les duplications)
  • Type-safe : Remplacer any par des types stricts
  • Pattern : Appliquer un design pattern (repository, factory, etc.)

Phase 3 — Exécuter

Règles strictes :

  1. Un changement à la fois — commit logique entre chaque transformation
  2. Tests verts entre chaque étape — si un test casse, rollback
  3. Pas de changement de comportement — le refactoring ne change que la forme
  4. Imports à jour — vérifier après chaque déplacement de fichier

Phase 4 — Valider

  1. tsc --noEmit — zero erreur
  2. Tous les tests passent
  3. Grep pour vérifier qu'aucun ancien import/nom n'est resté
  4. Review visuelle si UI impactée

Gives 1 of the 12 instructions most refactoring skills give

Counted across 521 of the 525 authors here whose files we hold, read 2026-08-06

  • run tests after each changein 59 of 521, across 56 files
  • write tests before refactoringhere, and in 27 of 521, across 24 files
  • preserve external behaviorin 26 of 521, across 22 files
  • remove dead codein 25 of 521, across 24 files
  • make small incremental changesin 20 of 521, across 17 files
  • break the implementation into tiny commitsin 18 of 521, across 5 files
  • ask the user about alternative optionsin 17 of 521, across 4 files
  • create a GitHub issue with the planin 17 of 521, across 4 files
  • explore the repository to verify assertionsin 17 of 521, across 4 files
  • interview the user about the refactorin 16 of 521, across 3 files
  • check the codebase for test coveragein 16 of 521, across 3 files
  • refactor one thing at a timein 16 of 521, across 12 files

Said here and by no other author read

  • list all files that import the target code
  • verify that tests exist for the code
  • use plan mode if the blast radius exceeds 3 files
  • rollback if a test breaks
  • update imports after moving files
  • run the type checker with no emit

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.