Skip to content
Back to skills

Safe Refactoring

ASecurity

Refactor existing code while preserving public behavior, callers and project conventions; use compatibility evidence rather than bundling unrelated cleanup.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentsrefactoring

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add najuaircrack/agent-scopeway --skill safe-refactoring --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Safe Refactoring?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Safe Refactoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/najuaircrack-safe-refactoring/badge)](https://www.skillsdirectory.com/skills/najuaircrack-safe-refactoring)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: safe-refactoring
description: "Refactor existing code while preserving public behavior, callers and project conventions; use compatibility evidence rather than bundling unrelated cleanup."
license: MIT
---

# Behavior-preserving refactoring

Identify the owning module, exported contract, callers and serialized forms before moving code. Check whether reflection, configuration, dependency injection, dynamic imports or persisted names create consumers that a static import graph cannot see.

Keep behavior changes separate unless the request authorizes both. Establish characterization at the actual boundary when coverage is missing, including ordering, mutation, error types and side effects that consumers rely on. An accidental existing behavior needs an explicit decision before treating it as a requirement or deleting it.

Make one coherent structural change. Preserve native resources, cancellation, ownership and transaction boundaries. Avoid broad abstractions for a single consumer. When a public name or schema must change, update producer and actual consumers together and retain a deliberate compatibility path if supported versions require one.

Run the affected normal entry point and regression checks. Inspect the final diff for moved behavior, overlooked callers and unrelated formatting. Report any compatibility surface that source search or local execution could not verify.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.