ralph

Automate deep codebase refactoring using an actor-model state machine.

2|Updated Jun 6, 2026
One-click install
npx skills add https://github.com/AndersCan/mantaq --skill ralph-anderscan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ralph
Source: https://github.com/AndersCan/mantaq/tree/main/.opencode/skills/ralph
Command: npx skills add https://github.com/AndersCan/mantaq --skill ralph-anderscan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, grep, bash, vp, bumpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

The Ralph Skill addresses the need for automated code review and refactoring for deep structural improvements. It enhances productivity, readability, and maintainability of codebases.

Core Features & Use Cases

  • Automated Deep Refactoring: Identifies and refactors long functions, multi-responsibility classes, reduces complex branching, improves type safety, and enhances developer experience.
  • Codebase Ownership: Focuses on codebase self-improvement, handling deep work that typically gets overlooked.
  • Self-Reflecting Loop: Continuously improves the Ralph skill itself to become more effective over time.
  • Use Case: If you want to significantly refactor and optimize a codebase while preserving existing features, use Ralph to automate deep code analysis and transformations.

Quick Start

To begin using Ralph, initiate a deep code self-improvement loop: "start the ralph skill on my project to perform automatic refactorings."

Frequently Asked Questions about ralph

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

FAQPage Schema
How do I automate code refactoring for long functions and complex classes?

Automated code refactoring for long functions and complex classes is handled by an actor-model state machine that identifies multi-responsibility classes and splits them. It performs deep structural transformations to enhance codebase readability and maintainability while preserving existing features.

What is the best way to improve type safety and readability across a codebase?

Improving type safety and readability across a codebase is achieved through deep structural improvements driven by a hierarchical state machine. It analyzes code to optimize complex branching and enforce type safety enhancements, ensuring the codebase remains maintainable over time.

Can I use an automated state machine to split functions without breaking existing features?

Yes, you can use an event-based state machine to split functions without breaking existing features. It automates deep code analysis and transformations, managing tasks like refactoring multi-responsible classes while utilizing git to safely preserve the original functionality.

Do I need git and bash to run automated deep structural codebase improvements?

Yes, git and bash are required dependencies for executing automated deep structural codebase improvements. The process utilizes these existing command-line utilities alongside custom text processing tools for file modifications and tracking transformations.

How does an actor-model state machine approach code optimization differently than standard tools?

An actor-model state machine handles code optimization through a continuous self-reflecting loop that manages deep structural transformations. Unlike standard tools, it autonomously focuses on deep codebase ownership and self-improvement, handling complex refactoring tasks that typically get overlooked.

When should I not use automated deep structural refactoring on my project?

You should avoid automated deep structural refactoring if your project lacks git version control or bash execution environments. Since this process performs deep structural transformations like splitting functions and refactoring classes, sufficient version tracking is necessary to safely manage file modifications.