project-surgeon

Analyze codebases, generate risk-prioritized plans, and execute test-preserving improvements.

65|8|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/EasyCode-Obsidian/workflow-architect --skill project-surgeon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-surgeon
Source: https://github.com/EasyCode-Obsidian/workflow-architect/tree/main/claude/skills/project-surgeon
Command: npx skills add https://github.com/EasyCode-Obsidian/workflow-architect --skill project-surgeon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

project-surgeon helps you safely take over an existing codebase by deeply analyzing and auditing it before making carefully planned, test-preserving improvements.

Core Features & Use Cases

  • 4-phase governed runtime (read-only to start): analysis → review → planning → execution, with explicit user approval gates and no skipping phases.
  • 7-dimension code review (Bug Fixer protocol reuse): systematically catalog security, logic, resource, performance, error handling, dependency, and consistency issues without fixing during the review phase.
  • Disk-persisted reports + session resume: writes analysis and review reports to disk and maintains workflow state for reliable continuation.
  • Risk-prioritized execution plan: converts selected findings into phased tasks organized by risk/priority to stabilize first, refactor next, and harden production readiness.
  • Regression protection via Preservation Gate: runs the test suite before/after each task, auto-reverts on new failures, and uses a 3-Strike recovery path for errors.

Quick Start

Run project-surgeon on your existing project directory (for example, your workspace root) and ask it to take over the codebase for refactoring and comprehensive quality auditing.

Frequently Asked Questions about project-surgeon

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

FAQPage Schema
How do I safely refactor legacy code without breaking existing functionality?

Safely refactor legacy code by running a read-only analysis and a 7-dimension security and logic audit first, then executing a risk-prioritized plan with strict regression protection. This workflow uses a Preservation Gate to run tests before and after each task, auto-reverting any changes that introduce new failures.

What is a 7-dimension code review for legacy modernization?

A 7-dimension code review for legacy modernization systematically catalogs security, logic, resource, performance, error handling, dependency, and consistency issues. It identifies problems across these areas without applying fixes during the review phase, creating a structured baseline for subsequent risk-prioritized execution.

How do I plan dependency and config hardening for an existing codebase?

Plan dependency and config hardening by converting audit findings into phased, risk-prioritized tasks that stabilize the codebase first, refactor next, and harden production readiness last. This approach requires explicit phase approval gates to ensure structured and safe execution.

Can I resume a codebase audit and refactoring workflow after stopping?

Yes, you can resume a codebase audit workflow because the process writes disk-persisted analysis and review reports while maintaining workflow state. This allows reliable continuation of the read-only analysis, review, planning, and execution phases without losing prior progress.

What happens if a refactoring task causes test regressions?

If a refactoring task causes test regressions, the Preservation Gate detects the new failures and automatically reverts the changes. The workflow then uses a 3-Strike recovery path to address errors, ensuring the codebase remains stable throughout the execution phase.