safe-code-modifications

Verify unused imports, functions, variables, and constants before removal.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/coff33ninja/ai-skills-mcp --skill safe-code-modifications
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-code-modifications
Source: https://github.com/coff33ninja/ai-skills-mcp/tree/main/skills/safe-code-modifications
Command: npx skills add https://github.com/coff33ninja/ai-skills-mcp --skill safe-code-modifications

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps developers avoid unintended code removals by providing a comprehensive verification process before modifying code.

Core Features & Use Cases

  • Verification Process: Before removing any code, it ensures that imports, functions, variables, or constants are not in use and are safe to remove.
  • Language-Specific Checks: Offers specific guidelines for different programming languages to check for unused code correctly.
  • Use Case: When refactoring legacy code, it helps identify and remove unused code safely to improve maintainability without introducing bugs.

Quick Start

Run the safe-code-modifications skill to check for unused imports in your project and follow the guidelines for safe removal.

Frequently Asked Questions about safe-code-modifications

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

FAQPage Schema
How do I safely remove unused code without introducing bugs?

Unused code removal requires verifying that imports, functions, variables, and constants have no remaining references before deletion. This Skill provides comprehensive verification checks and language-specific guidelines to ensure safe code refactoring without introducing bugs.

What is the process for identifying unused imports and variables in a codebase?

Identifying unused imports and variables involves scanning the local source code repository to detect unreferenced functions and constants. This Skill automates this verification process using applicable language-specific tools to ensure safe code removal.

Does safe code removal work for different programming languages?

Yes, safe code removal provides language-specific guidelines and best practices for different programming languages. It checks for unused imports, functions, and variables correctly by applying rules tailored to each language's specific syntax and tooling.

What do I need to check before deleting functions during legacy code refactoring?

Before deleting functions during legacy code refactoring, you must verify that the functions, variables, and constants are not in use anywhere in the local codebase. This ensures safe removal and maintains code safety without introducing regressions.

When should I avoid using automated code removal in refactoring?

You should avoid automated code removal without verification when you lack local codebase access or applicable language-specific tools. Safe code removal requires thorough verification to prevent unintended deletions of seemingly unused imports or variables during maintenance.