Compétences safe-refactor
📦

safe-refactor

v1.0 Révision du contenu r1 Sûr ⚙️ Commandes externes

Refactor Code with Tests and Small Changes

Code cleanup can introduce behavior changes that are difficult to detect. This skill guides small refactoring steps with baseline tests, dependency checks, and repeated verification.

Prend en charge: Claude Codex Code(CC)
Maintain this Skill? Claim it 🥉 78 Bronze

Installer avec mon Agent

Copiez cette demande dans votre Agent. Elle contient la page Skill de référence et le manifeste.

Demande d’agent
Review the Skillstore skill "safe-refactor" from https://skillstore.io/skills/agentkitco-safe-refactor.md and its manifest at https://skillstore.io/api/skills/agentkitco-safe-refactor/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

Votre Agent doit toujours présenter son plan et demander toute confirmation exigée par la politique de sécurité.

Ressources lisibles par les agents

Utilisez ces liens lorsqu’un Agent IA, un crawler ou un script a besoin d’un contexte propre au lieu de lire toute la page.

Tester

Utilisation de « safe-refactor ». Extract duplicated validation from two functions without changing their behavior.

Résultat attendu:

  • Boundary: preserve validation order, error messages, and return values.
  • Baseline: relevant tests passed before editing.
  • Change: extracted the shared validation logic in one reviewable step.
  • Verification: relevant tests and lint passed after extraction.
  • Left unchanged: an unrelated naming inconsistency.

Utilisation de « safe-refactor ». Restructure a legacy parser that has no tests.

Résultat attendu:

  • Characterization tests added for representative valid and invalid inputs.
  • Baseline behavior recorded, including existing error messages.
  • Restructuring completed in separate, verified steps.
  • Uncertainty: large input performance was not exercised.
  • Observed bug reported separately and left unchanged.

Audit de sécurité

Sûr
v2 • 22/10/2026 Ouvrir le rapport versionné

All three static findings are false positives: Markdown command references are not Ruby execution, and the completion report is not system reconnaissance. No evidence found of prompt injection, data exfiltration, or malicious intent in SKILL.md.

1
Fichiers analysés
38
Lignes analysées
0
Éléments à examiner
0
Faux positifs ignorés

Facteurs de risque

⚙️ Commandes externes (2)
Le dernier audit statique et sémantique terminé n’a détecté aucun constat de sécurité confirmé. Cela ne prouve pas que le skill est sans effets secondaires.
Partager et citer ce rapport

Partagez le rapport d’évaluation versionné, le badge neutre, la carte intégrable et les citations. Skillstore présente les preuves sans décider si ce Skill est sûr.

Ouvrir le rapport versionné
Évaluation de sécurité

Copier le lien du rapport

https://skillstore.io/skills/agentkitco-safe-refactor/audits/2?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Badge Markdown

[![Skillstore security assessment](https://skillstore.io/badges/skills/agentkitco-safe-refactor/security.svg)](https://skillstore.io/skills/agentkitco-safe-refactor?utm_source=security_passport_badge)

Badge HTML

<a href="https://skillstore.io/skills/agentkitco-safe-refactor?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/agentkitco-safe-refactor/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Carte intégrable

<iframe src="https://skillstore.io/embed/skills/agentkitco-safe-refactor.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Citations académiques (APA · BibTeX · CFF)

Citation APA

agentkitco. (2026). safe-refactor security audit report (audit version 2) [Author version 1.0]. Skillstore. https://skillstore.io/skills/agentkitco-safe-refactor/audits/2

Citation BibTeX

@techreport{agentkitco-agentkitco-safe-refactor-2026, author = {agentkitco}, title = {safe-refactor security audit report (audit version 2)}, institution = {Skillstore}, year = {2026}, number = {2}, url = {https://skillstore.io/skills/agentkitco-safe-refactor/audits/2}, note = {Author version 1.0} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "safe-refactor security audit report (audit version 2)" version: "1.0" type: report authors: - name: "agentkitco" date-released: "2026-10-22" url: "https://skillstore.io/skills/agentkitco-safe-refactor/audits/2" identifiers: - type: other value: "skillstore:agentkitco-safe-refactor:audit:2" description: "Skillstore immutable audit report identifier"

Comparer les variantes

2 variantes installables

Chaque auteur reste un skill installable distinct. La variante recommandée est classée selon les preuves Skillstore.

Pourquoi cette variante est première

Utilisation Skillstore plus élevée
juliusbrussee Recommandé

juliusbrussee-safe-refactor

Score Skillstore 78
Niveau de confiance des preuves Moyen
Utilisation Skillstore 8
Mis Ă  jour

2026-09-09

agentkitco Actuelle

agentkitco-safe-refactor

Score Skillstore 78
Niveau de confiance des preuves Moyen
Utilisation Skillstore 6
Mis Ă  jour

2026-10-22

Score Skillstore

Pourquoi ce score Niveau de confiance des preuves: Moyen
55
Architecture
85
Maintenabilité
87
Contenu
65
Communauté
91
Conformité aux spécifications

Ce que vous pouvez créer

Clean Up a Working Module

Extract duplicated logic while preserving outputs, error messages, logging, and edge cases through small, verified edits.

Protect Legacy Behavior

Add characterization tests before restructuring code that lacks coverage, and document behavior that remains unverified.

Review a Shared API Rename

Identify callers and dependents before renaming exported symbols, and request approval when compatibility requires a breaking change.

Essayez ces prompts

Assess a Refactoring Task
Use safe-refactor to assess [module]. State the goal, behavior boundaries, existing tests, and baseline results before proposing any edits.
Extract Repeated Logic
Use safe-refactor to extract repeated logic in [file]. Preserve behavior, make one change per step, and run relevant tests after each step.
Characterize Untested Code
Use safe-refactor on [legacy module]. Add characterization tests for realistic inputs before restructuring. Preserve current errors and ordering, and report coverage gaps.
Plan a Shared Symbol Rename
Use safe-refactor to rename [exported symbol]. Check all callers and dependents, propose a deprecation path, and request approval before any API break.

Bonnes pratiques

  • Define behavior boundaries and record baseline failures before editing.
  • Add characterization tests before restructuring untested behavior.
  • Review each small diff and verify that rollback preserves pre-existing user edits.

Éviter

  • Mixing refactoring with bug fixes, features, or dependency upgrades.
  • Continuing through failing tests instead of undoing the last step and reducing its scope.
  • Changing public APIs without approval or a deprecation path.

Foire aux questions

What does this skill provide?
It provides a structured workflow for behavior-preserving refactoring, including test baselines, dependency checks, incremental edits, and a final report.
What happens when the code has no tests?
The workflow calls for characterization tests that record current behavior before refactoring begins.
Does it guarantee identical behavior?
No. Verification depends on test coverage and available checks, and the final report must identify behavior that remains uncertain.
Can it fix bugs during a refactor?
It directs the assistant to report discovered bugs and handle fixes as separate changes.
When does it ask for user input?
It asks when tests cannot run, baseline failures are unexplained, a public API break is needed, or a real bug is found.
Does it require a specific programming language?
No specific language is required. The host assistant must use the existing project tests, type checker, or linter.

Détails du développeur

Auteur

agentkitco

Licence

MIT

Version de l’auteur

v1.0

Révision Skillstore

r1

Avis de version

La version déclarée par l’auteur n’est pas un SemVer valide.

Réf

18efac79a818d7e997295839638fdd21906cfd1c

Récence de maintenance

22/10/2026

Utilisation

5 téléchargements · 0 vues

Structure de fichiers

đź“„ SKILL.md

Autres compétences de agentkitco

Tout afficher
Tout afficher