pharo-refactor

Refactor Pharo code in a live image with automated checks.

14|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/KentBeck/SmalltalkGenie --skill pharo-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pharo-refactor
Source: https://github.com/KentBeck/SmalltalkGenie/tree/main/.agents/skills/pharo-refactor
Command: npx skills add https://github.com/KentBeck/SmalltalkGenie --skill pharo-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenges of safely refactoring Pharo code, providing tools for clean and reliable changes to the codebase.

Core Features & Use Cases

  • Live Image Refactoring: Make structural changes without altering the code behavior, directly within the live Pharo image.
  • Code Analysis: Identify references and implementors to plan refactoring, minimizing risks.
  • Incremental Changes: Execute one small refactor at a time, with tests to verify behavior remains unchanged.
  • Use Case: Refactor a large class without causing unintended side effects by following a structured process.

Quick Start

Run the 'pharo-refactor' skill to begin refactoring a Pharo class. Ensure that you have a passing test suite before you start.

Frequently Asked Questions about pharo-refactor

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

FAQPage Schema
How do I safely refactor Pharo code in a live image?

To safely refactor Pharo code in a live image, you execute incremental structural changes while using automated checks and passing tests to verify behavior remains unchanged. This minimizes the risk of unintended side effects during maintenance.

What is the best way to restructure a large Pharo Smalltalk class without side effects?

Restructuring a large Pharo Smalltalk class without side effects requires a structured process of making one small refactor at a time. You must identify references and implementors first, then verify each change with a passing test suite.

Do I need a passing test suite before starting live image refactoring?

Yes, you need a passing test suite before starting live image refactoring. Tests act as automated checks to verify that each incremental structural change maintains the original code behavior without introducing unintended side effects.

How does code analysis help when refactoring Pharo code?

Code analysis helps refactoring Pharo code by identifying existing references and implementors within the live image. This allows you to accurately plan structural changes and minimize risks before executing any incremental refactoring steps.

Can I make structural changes to Pharo code without altering its behavior?

Yes, you can make structural changes to Pharo code without altering its behavior by following an incremental refactoring process. Automated checks and a verified test suite ensure that the live image maintains its original functionality throughout maintenance.