sdd-refactor

Refactor code symbols across files using LSP-powered reference analysis.

4|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/tylerburleigh/claude-foundry --skill sdd-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdd-refactor
Source: https://github.com/tylerburleigh/claude-foundry/tree/main/skills/sdd-refactor
Command: npx skills add https://github.com/tylerburleigh/claude-foundry --skill sdd-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides LSP-powered refactoring with safety checks. It uses findReferences to understand impact before making changes, performs batch edits, and verifies correctness.

Core capabilities:

  • Safe rename operations with complete reference updates
  • Extract function/method with reference updating
  • Move symbol across files with import fixups
  • Unused code cleanup based on zero-reference analysis

Fallbacks: If LSP returns no results for the target language, a Grep-based fallback is used to locate references.

Note: This skill integrates with Claude Code's LSP tools for precise edits and verification.

Core Features & Use Cases

  • Safe rename across the codebase with reference updates
  • Extract function/method and update all call sites
  • Move symbol between files with import fixups
  • Dead code cleanup based on reference analysis

Quick Start

To try it, run the sdd-refactor skill to rename a symbol across a project, then review the generated reference changes and risk report before applying edits.

Frequently Asked Questions about sdd-refactor

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

FAQPage Schema
How do I safely rename a function or variable across my entire codebase?

Safe rename operations use LSP-powered symbol resolution to find all references before making changes, then apply batch edits with automatic import updates across Python, TypeScript, Go, and other supported languages. This ensures no call sites are missed.

Can I extract a function and automatically update all call sites?

Yes. Extract function refactoring identifies all references to the new function and updates call sites automatically. The Skill validates structural correctness and adjusts imports as needed.

What happens when I move a symbol to a different file?

Moving symbols performs reference analysis to locate all usages, updates import statements across files, and validates that references resolve correctly in their new location.

How does this handle languages where LSP isn't available?

When LSP returns no results, the Skill falls back to Grep-based pattern matching to locate references, ensuring refactoring support across a wider range of languages and edge cases.

Can I use this to find and remove dead code?

Yes. The Skill analyzes references across your codebase; symbols with zero references are flagged as unused, enabling safe cleanup and removal of dead code.

What validation happens before edits are applied?

The Skill enforces impact analysis via findReferences, executes batch edits, and validates structural and reference correctness to confirm all changes maintain code integrity.