skills/refactor/squatters/SKILL.md
Detect squatters: modules and packages that occupy namespace positions they do not semantically own. Identifies utility dumps, stuttery siblings, axis violations, layer bleeding, and semantic diffusion — common structural smells introduced by agentic programming.
npx skillsauth add jordangunn/skills refactor-squattersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read all references in references/ before using this skill.
A squatter is a module or package that occupies a namespace position it does not semantically own.
In real estate, squatters occupy property without legal claim. In codebases, squatters occupy import paths without conceptual legitimacy. They exist because:
las_fields.py instead of las/fields.py)Squatters degrade navigability. A developer (or agent) cannot guess where code lives because the filesystem lies about ownership.
Every module should be importable from a path that a domain expert would guess correctly.
If a module name compensates for weak structure, or sits beside a package it should be inside, the filesystem is lying about the domain model.
common/, utils/, or helpers/ packageslas_fields.py beside las/)Directory: references/
01_GOAL.md — What this skill accomplishes02_DEFINITIONS.md — Vocabulary for squatters and namespace violations03_INVARIANTS.md — Rules that determine violations04_HEURISTICS.md — Detection patterns and signals05_PROCEDURE.md — Step-by-step audit process06_REMEDIATION.md — Refactoring directions (hypotheses, not mandates)07_OUTPUT.md — Report format and severity classificationDirectory: scripts/
detect.sh: Scan for structural smells (macOS/Linux/WSL)detect.ps1: Scan for structural smells (Windows)# Scan a package for squatters
.codex/skills/refactor/squatters/scripts/detect.sh pulsar/api
# Scan with specific pattern focus
.codex/skills/refactor/squatters/scripts/detect.sh pulsar/api --pattern utility-dump
.codex/skills/refactor/squatters/scripts/detect.sh pulsar/api --pattern stuttery-sibling
testing
Validate a task by setting epistemic_state to validated. Requires explicit validation info (who/why). Computes hash and updates last_reviewed_at.
tools
Compute and display derived status for a task. Runs deterministic status computation and outputs summary of staleness, hash integrity, and eligibility.
tools
Review a task by updating last_reviewed_at timestamp. Recomputes derived status and flags any hash mismatches without changing epistemic state.
testing
Navigate to the previous task in chronological order. Returns the task ID before the specified task based on created_at timestamp.