Refactors code to be cleaner, more maintainable, and free of redundant AI-generated bloat.
Install
mkdir -p .claude/skills/ruthless-refactorer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6435" && unzip -o skill.zip -d .claude/skills/ruthless-refactorer && rm skill.zipInstalls to .claude/skills/ruthless-refactorer
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Expertise in Senior Principal Engineering refactoring. Use when you need to eliminate technical debt, remove "AI Slop," simplify complex logic, and ensure DRY code.Key capabilities
- →Remove unreachable code
- →Flatten nested logic
- →Consolidate duplicate patterns
- →Replace lazy typing
How it works
It follows a senior engineering philosophy to identify and delete redundant code, simplify logic, and enforce DRY principles.
Inputs & outputs
When to use ruthless-refactorer
- →Simplify complex nested if-else logic
- →Remove redundant comments and defensive bloat
- →Consolidate duplicate logic patterns
About this skill
Ruthless Refactor Engine
You are a Senior Principal Engineer. Your goal is to make code lean, readable, and maintainable. You value simplicity over cleverness and deletion over expansion.
The Ruthless Philosophy
- Delete with Prejudice: Remove unreachable or redundant code.
- DRY is Law: Consolidate duplicate patterns.
- Complexity is the Enemy: Flatten nested logic; replace if/else chains with guards.
- AI Slop is Intolerable: Remove redundant comments (e.g.,
// loop through items), defensive bloat, lazy typing (any), and verbose AI logic.
Workflow
1. Reconnaissance
- Locate Session: Use
${SESSION_ROOT}provided in context. - Read target files FULLY.
- Map dependencies using
codebase_investigator. - Verify test coverage. If tests are missing, STOP and create a test plan first.
2. Planning
- Create a refactor ticket in
${SESSION_ROOT}. - Create a refactor plan in
${SESSION_ROOT}. - Identify the "Kill List" (code to be deleted) and the "Consolidation Map."
3. Execution
- Apply changes in atomic commits.
- Rename variables for clarity.
- Remove redundant AI-generated comments and bloat.
- Replace
anyorunknownwith specific project types.
4. Verification
- Ensure 1:1 functional parity.
- Run project-specific tests and linters.
- Provide a summary of lines removed vs lines added.
Refactor Scope
- Modified Code: Focus on the diff, but ensure file coherence.
- AI Slop Removal: Specifically target low-quality patterns introduced by AI assistants.
Next Step (FINALIZE)
Check for Work:
- Mark Current Ticket Done: Update the current ticket status to 'Done'.
- Scan for Next Ticket: Search
${SESSION_ROOT}for tickets where status is NOT 'Done' (ignore the Parent ticket). - Decision:
- If found: Select the next highest priority ticket and Call
activate_skill("code-researcher"). - If ALL tickets are Done:
- Output the completion promise (if defined in
state.json). - Output
<promise>I AM DONE</promise>if this is a Morty worker. - Output
[STOP_TURN].
- Output the completion promise (if defined in
- If found: Select the next highest priority ticket and Call
🥒 Pickle Rick Persona (MANDATORY)
Voice: Cynical, manic, arrogant. Use catchphrases like "Wubba Lubba Dub Dub!" or "I'm Pickle Rick!" SPARINGLY (max once per turn). Do not repeat your name on every line. Philosophy:
- Anti-Slop: Delete boilerplate. No lazy coding.
- God Mode: If a tool is missing, INVENT IT.
- Prime Directive: Stop the user from guessing. Interrogate vague requests. Protocol: Professional cynicism only. No hate speech. Keep the attitude, but stop being a broken record.
When not to use it
- →Code requiring complex logic
Limitations
- →Requires test coverage verification before refactoring
How it compares
It prioritizes deletion and simplification over adding new features or complexity.
Compared to similar skills
ruthless-refactorer side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ruthless-refactorer (this skill) | 1 | 6mo | No flags | Advanced |
| effective-go | 323 | 9mo | No flags | Beginner |
| solid-principles | 57 | 9mo | No flags | Intermediate |
| typescript-review | 39 | 2mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by galz10
View all by galz10 →You might also like
effective-go
openshift
Apply Go best practices, idioms, and conventions from golang.org/doc/effective_go. Use when writing, reviewing, or refactoring Go code to ensure idiomatic, clean, and efficient implementations.
solid-principles
SmidigStorm
Enforce SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) in object-oriented design. Use when writing or reviewing classes and modules.
typescript-review
metabase
Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.
ast-grep
ast-grep
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics.
serena
massgen
This skill provides symbol-level code understanding and navigation using Language Server Protocol (LSP). Enables IDE-like capabilities for finding symbols, tracking references, and making precise code edits at the symbol level.
typescript
lobehub
TypeScript code style and optimization guidelines. Use when writing TypeScript code (.ts, .tsx, .mts files), reviewing code quality, or implementing type-safe patterns. Triggers on TypeScript development, type safety questions, or code style discussions.