refactor-with-safety

Enforce lint, test, and build gates during code refactors.

1|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/DaFum/neurotoxic-game --skill refactor-with-safety-dafum
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-with-safety
Source: https://github.com/DaFum/neurotoxic-game/tree/main/.agents/skills/refactor-with-safety
Command: npx skills add https://github.com/DaFum/neurotoxic-game --skill refactor-with-safety-dafum

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactor-with-safety provides a disciplined approach to code changes by enforcing safety checks, preserving interfaces, and validating across lint, tests, and builds to prevent regressions.

Core Features & Use Cases

  • Enforce safety checks during refactors to ensure type integrity and prevent behavior changes.
  • Verify lint, tests, and builds automatically to catch regressions early.
  • Verify domain-rule compliance by referencing AGENTS.md and project conventions.

Quick Start

Run the full quality gate after every refactor to ensure safety and compatibility.

Frequently Asked Questions about refactor-with-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor code without introducing regressions or breaking public interfaces?

To refactor code safely without regressions, enforce automated lint, test, and build gates while validating type integrity and preserving public interfaces. This approach catches behavior changes early and ensures modular extraction complies with domain rules.

How do I maintain type integrity when extracting modules from game logic or audio engines?

Maintain type integrity during modular extraction by applying safety checks that validate changes against domain rules. Enforcing these validations ensures extracted modules from engines and game logic retain their original behavior and type contracts.

What is the best way to automate quality gates after modifying reducers and complex codebases?

The best way to automate quality gates after modifying reducers is to run full lint, test, and build validations. This verifies domain-rule compliance by referencing project conventions, ensuring safety and compatibility across the codebase.

Can I use automated safety checks to verify domain-rule compliance in my codebase?

Yes, you can use automated safety checks to verify domain-rule compliance by referencing project conventions like AGENTS.md. This ensures refactored code adheres to established domain rules and prevents unintended behavior changes.

When should I not use a full quality gate approach for code maintenance?

You should not skip full quality gate validations when refactoring codebases with complex state engines or reducers. Bypassing lint, test, and build gates risks introducing regressions and breaking preserved public interfaces during modular extraction.