ide-refactor
SolidSafe refactoring with git-backed rollback. Verifies a clean working tree, performs the refactoring using LSP rename and code actions, runs tests, and offers to revert via git if anything breaks.
Code & Development 30 stars
4 forks Updated today MIT
Install
Quality Score: 83/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# IDE Safe Refactor Workflow
## Prerequisites
1. Check if the `getToolCapabilities` MCP tool is available to you.
- **Not available** (no MCP tool by that name): stop and tell the user:
"This skill requires the Claude IDE Bridge with a connected VS Code extension. It uses LSP tools (rename symbol, code actions, references, snapshots) that have no CLI equivalent.
To use this skill:
1. Start the bridge: `npm run start-all` (in claude-ide-bridge/)
2. Ensure the Claude IDE Bridge extension is installed in your IDE
3. Use the `claude --ide` session (not remote-control)"
- **Available**: call it. If `extensionConnected` is `false`: show the same message. If `true`: proceed.
Perform refactoring with a safety net. The safety net is **git**: the working
tree is verified clean before anything is touched, so `git checkout` reverts the
whole change if tests fail afterwards.
## Workflow
### Phase 1: Checkpoint
There is no snapshot tool. Git is the rollback mechanism, and it only works if
the tree is clean first — otherwise a revert would discard the user's unrelated
work along with the refactoring.
1. Call `getGitStatus`.
- **Clean tree**: proceed. `git checkout -- .` will revert everything this
skill does.
- **Uncommitted changes present**: stop and offer the choice —
"You have uncommitted changes. I can't offer a clean rollback until they're
saved. Commit them, or shall I `gitStash` them first and restore them
after?" Neve...
Details
- Author
- Oolab-labs
- Repository
- Oolab-labs/patchwork-os
- Created
- 4 months ago
- Last Updated
- today
- Language
- TypeScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Listed
safe-refactor
Use when restructuring, cleaning up, or reorganizing existing code without changing its behavior. Enforces a test safety net before touching anything and proof that behavior was preserved.
1 Updated 3 weeks ago
suleymanbyzt Code & Development Listed
refactor
Analyze complexity and smells, draft a safe refactor plan, and execute step-by-step with tests. Use when refactoring code or invoking /refactor.
0 Updated 3 days ago
tibursocampos Code & Development Listed
safe-refactor
Use when code needs restructuring without changing observable behavior.
6 Updated 1 months ago
yeaight7