safe-refactor
Refactor Code Without Changing Behavior
Structural code changes can introduce subtle regressions and expand scope. This skill defines behavior boundaries and brackets focused refactors with verification.
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
Review the Skillstore skill "safe-refactor" from https://skillstore.io/skills/juliusbrussee-safe-refactor.md and its manifest at https://skillstore.io/api/skills/juliusbrussee-safe-refactor/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「safe-refactor」。 Move validation from the controller into the domain service without changing API behavior.
預期結果:
- Boundary: preserve response status, error messages, validation order, and public service signatures.
- Sequence: characterize current behavior, move validation, keep the controller adapter, then remove duplication.
- Verification: run the same controller and service tests before and after each step.
正在使用「safe-refactor」。 Consolidate duplicate cache invalidation logic used by two modules.
預期結果:
- Boundary: preserve invalidation timing, key format, failure handling, and call order.
- Sequence: introduce one owner, migrate one caller, verify, then migrate the second caller.
- Stop condition: both callers use the shared owner and existing behavior remains proven.
安全審計
安全The only static finding is a false positive caused by a normal refactoring constraint in SKILL.md. No malicious intent, unsafe system access, or prompt injection was found.
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/juliusbrussee-safe-refactor/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/juliusbrussee-safe-refactor?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/juliusbrussee-safe-refactor?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/juliusbrussee-safe-refactor/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/juliusbrussee-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>學術引用 (APA · BibTeX · CFF)
APA 引用
juliusbrussee. (2026). safe-refactor security audit report (audit version 1) [Author version unspecified]. Skillstore. https://skillstore.io/skills/juliusbrussee-safe-refactor/audits/1BibTeX 引用
@techreport{juliusbrussee-juliusbrussee-safe-refactor-2026,
author = {juliusbrussee},
title = {safe-refactor security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/juliusbrussee-safe-refactor/audits/1},
note = {Author version unspecified}
}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 1)"
version: "unspecified"
type: report
authors:
- name: "juliusbrussee"
date-released: "2026-08-12"
url: "https://skillstore.io/skills/juliusbrussee-safe-refactor/audits/1"
identifiers:
- type: other
value: "skillstore:juliusbrussee-safe-refactor:audit:1"
description: "Skillstore immutable audit report identifier"
比較變體
2 個可安裝變體每位作者的技能都保留為獨立的可安裝項目。推薦變體依 Skillstore 證據排序。
為何此變體排名第一
juliusbrussee-safe-refactor
2026-09-09
Skillstore 評分
評分依據 證據置信度: 中你可以打造什麼
Extract a Shared Module
Plan a focused extraction while preserving callers, error behavior, and test results.
Move Component Ownership
Transfer one responsibility between packages while keeping public interfaces stable.
Review Maintenance Changes
Check whether a cleanup remains structural and includes equivalent verification.
試試這些提示
Use safe-refactor to plan this cleanup. Identify preserved behavior, the smallest structural change, and verification before and after the edit.
Extract the repeated logic into one owner. Preserve interfaces, failures, ordering, and compatibility. Keep each intermediate state buildable and testable.
Move this responsibility from the current module to the target module. Separate feature changes and verify every affected public contract.
Design staged changes for this cross-package refactor. Define invariants, compatibility constraints, rollback points, and equivalent proof for every stage.
最佳實務
- Record observable behavior and verification commands before editing.
- Move one responsibility at a time and keep every state testable.
- Run the same proof after changes and stop when the requested structure is achieved.
避免
- Mixing new features with structural changes.
- Changing public contracts without explicit scope.
- Adding dependencies or configuration without a correctness need.
常見問題
What counts as a safe refactor?
Does this skill write code?
Can I change an API during the refactor?
What verification should I use?
Can this skill add dependencies?
When should the refactor stop?
開發者詳細資訊
授權
MIT
Skillstore 修訂
r1
版本提示
作者未聲明版本。
引用
9e5d158a7fd6576779833ff3529fe92b1a198150
維護新鮮度
2026/8/13
使用量
0 次下載 · 0 次瀏覽
檔案結構