rethink

Analyze git history and code to identify design flaws and scope drift.

Updated Sep 9, 2024
One-click install
npx skills add https://github.com/axel-kaliff/dotfiles --skill rethink-axel-kaliff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rethink
Source: https://github.com/axel-kaliff/dotfiles/tree/main/claude/.claude/skills/rethink
Command: npx skills add https://github.com/axel-kaliff/dotfiles --skill rethink-axel-kaliff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers and reviewers pause development and critically evaluate whether the current codebase, branch direction, and dependency choices are justified, or if a redesign or targeted refactor is warranted. It surfaces scope drift, stacked patches, dependency bloat, and design-level mismatches between problem and implementation.

Core Features & Use Cases

  • Branch Retrospective: Reconstructs a feature branch timeline, classifies commits (original-goal, pivot, patch, scope-drift), and highlights repeated fixes that indicate missed design insights.
  • Design Critique: Reads prioritized files to evaluate abstractions, single-responsibility, accidental vs essential complexity, scalability risks, and file-level complexity hotspots.
  • Dependency & Duplication Audit: Flags unnecessary or heavy dependencies, duplicated code clusters, and provides a size inventory to prioritize refactors.
  • Use Cases: Run on an active feature branch before merging, when planning a refactor, or when code feels over-engineered to get a concrete clean-slate proposal and recommendation.

Quick Start

Run the rethink skill on a feature branch or directory to receive a concise retrospective, targeted design critique, and an actionable clean-slate recommendation.

Frequently Asked Questions about rethink

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

FAQPage Schema
How do I review a feature branch for design flaws before merging?

A branch retrospective analyzes git history to classify commits as original-goal, pivot, patch, or scope-drift, surfacing repeated fixes that indicate missed design insights. It helps reviewers evaluate whether the current branch direction is justified before merging.

What is scope drift and how can I detect it in my codebase?

Scope drift occurs when a branch accumulates changes beyond its original goal. You can detect it by analyzing git history to classify commits as original-goal, pivot, patch, or scope-drift, which highlights repeated fixes and design-level mismatches between the problem and implementation.

How do I audit unnecessary dependencies and duplicated code clusters?

To audit dependencies and duplication, run an analysis that flags unnecessary or heavy packages and identifies duplicated code clusters. This audit provides a size inventory to help prioritize targeted refactors and reduce dependency bloat in the codebase.

When should I do a design critique on my repository directories?

You should perform a design critique when planning a refactor, before merging a feature branch, or when code feels over-engineered. It evaluates abstractions, single-responsibility, accidental complexity, scalability risks, and file-level complexity hotspots to justify a redesign.

Can I analyze accidental vs essential complexity in specific files?

Yes, you can analyze accidental versus essential complexity by reading prioritized files within specific directories. The analysis evaluates abstractions, single-responsibility, and file-level complexity hotspots to distinguish unnecessary implementation difficulty from inherent problem complexity.

What is the best way to generate a clean-slate design proposal for refactoring?

The best way to generate a clean-slate design proposal is to synthesize analyzed git history and prioritized file data into actionable recommendations. This approach identifies design mismatches and scope drift to produce a concrete redesign proposal for targeted refactoring.