simplify

Refactors TypeScript/stack code by removing dead code and reducing nesting while preserving behavior.

Updated May 23, 2026
One-click install
npx skills add https://github.com/devturco/thiago-dev-template --skill simplify-devturco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/devturco/thiago-dev-template/tree/main/.claude/skills/simplify
Command: npx skills add https://github.com/devturco/thiago-dev-template --skill simplify-devturco

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you reduce confusing, deeply nested, or inconsistent code by refactoring structure while keeping the exact same behavior so the codebase stays easier to maintain.

Core Features & Use Cases

  • Removes dead code such as unused imports, variables, and types while preserving functionality.
  • Reduces nesting using guard clauses and flatter control flow to improve readability.
  • Simplifies types and control flow by leveraging stack-specific patterns (e.g., tRPC hooks, TanStack Query, Zod 4 improvements) without adding new features.

Quick Start

Ask the AI: "Use simplify on my recent changes to remove dead code, reduce nesting, and streamline types while preserving all functionality."

Frequently Asked Questions about simplify

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

FAQPage Schema
How do I refactor TypeScript code to remove dead code and reduce nesting without changing behavior?

You can simplify full-stack TypeScript code by removing dead code, reducing nesting with guard clauses, and consolidating duplicates. This preserves exact behavior while producing minimal diffs and running automated fixes via stack conventions.

What is the best way to simplify tRPC hooks and TanStack Query usage in my codebase?

The best way to simplify tRPC hooks and TanStack Query usage is to refactor existing stack-aligned patterns. This streamlines types and control flow without adding new features, ensuring the codebase stays maintainable and consistently leverages stack conventions.

Does this code simplification approach work with Zod 4 updates in a TypeScript project?

Yes, this approach supports Zod 4 updates in TypeScript projects. It leverages Zod 4 improvements to simplify types and control flow while preserving functionality and maintaining stack-aligned conventions across your codebase.

How do I ensure a refactoring task only generates minimal diffs?

To generate minimal diffs during refactoring, apply simplification-focused transformations only to specified files or recent changes. This removes dead code and streamlines control flow while preserving behavior and avoiding unnecessary structural modifications.

Can I use automated checks to fix code formatting after simplifying control flow?

Yes, you can run automated checks to fix formatting after simplifying control flow. The process concludes by executing a check and fix command, ensuring the refactored code adheres to project standards and maintains consistency across the codebase.