heathen

Rank god-file candidates and detect duplicated code blocks in JavaScript and TypeScript repositories.

2|Updated May 21, 2026
One-click install
npx skills add https://github.com/howells/skills --skill heathen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: heathen
Source: https://github.com/howells/skills/tree/main/heathen
Command: npx skills add https://github.com/howells/skills --skill heathen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It helps you identify and refactor oversized, multi-responsibility “god” files and duplicated logic in JavaScript/TypeScript codebases, reducing brittleness while preserving behavior.

Core Features & Use Cases

  • God-file scanning and ranking: Detects likely React components, scripts, and modules that mix responsibilities, plus oversized candidates.
  • Duplication block detection: Finds repeated code blocks across files to prioritize safe extractions.
  • Evidence-first split planning: Produces a candidate review list and a decomposition order that minimizes breaking changes.
  • Use case: Given a sprawling React page component that renders UI, does data shaping, manages effects, and contains business logic, Heathen guides you to extract helpers/hooks/subcomponents in a testable sequence.

Quick Start

Use the heathen skill to scan your repository for god components and duplicated logic, then produce a safe split order with what to verify after each step.

Frequently Asked Questions about heathen

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

FAQPage Schema
How do I identify god files in a React or TypeScript codebase for refactoring?

God file detection scans JavaScript and TypeScript repositories to rank oversized components and modules that mix multiple responsibilities. It identifies files combining UI rendering, data shaping, and business logic to produce a prioritized candidate list for safe decomposition.

What is the best way to split a large React component without breaking its public interface?

Splitting large React components safely requires an evidence-first decomposition order that prioritizes testable extractions like hooks and subcomponents. This approach preserves public interfaces where possible and minimizes breaking changes by guiding sequential extractions with verification steps.

How can I detect duplicate code blocks across TypeScript modules?

Duplicate code block detection scans JavaScript and TypeScript files to find repeated logic across modules. It identifies recurring code patterns to prioritize safe extractions, helping reduce code brittleness while preserving behavior during refactoring or architectural restructuring tasks.

Does this refactoring approach work with plain JavaScript scripts or only TypeScript modules?

This refactoring approach works with both JavaScript and TypeScript repositories, applying to script decomposition alongside React component simplification and module responsibility splitting. It evaluates candidates and produces split sequences for various file types mixing oversized responsibilities.

When should I avoid splitting god files in my codebase?

You should avoid splitting god files when the oversized module lacks test coverage or when decomposition would expose internal implementation details critical to the public interface. Safe decomposition requires prioritizing testable extractions and verifying behavior preservation after each sequential step.

Why does my sprawling React page component cause brittleness during updates?

Sprawling React page components cause brittleness because they mix rendering, data shaping, effects management, and business logic within a single file. Extracting helpers, hooks, and subcomponents in a testable sequence reduces this brittleness while preserving application behavior.