J Defrag — Development skill for Claude Code
Scan the codebase for fragmentation — duplicated components, inconsistent patterns, files to consolidate, logic to share — and fix it in verified batches.
How to install J Defrag
Installs to ~/.claude/commands/jlaws-dotfiles-j-defrag.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/jlaws/dotfiles/HEAD/.claude/commands/j-defrag.md -o ~/.claude/commands/jlaws-dotfiles-j-defrag.md Restart Claude Code, or start a new session, for it to be picked up.
What J Defrag does
name: j-defrag description: "Scan the codebase for fragmentation — duplicated components, inconsistent patterns, files to consolidate, logic to share — and fix it in verified batches. Use to keep the codebase coherent on a regular cadence. Do NOT use for single-file cleanups (edit directly) or diff review before merge (use /j-diff-review)." argument-hint: "" model: opus effort: xhigh
Load skills `refactoring-and-debt` and
Alternatives in Development
- Synthesize Findings — Combine findings from multiple research agents into a coherent, well-structured research report 228 ★
- Symfony Voters — Implement authorization logic using Symfony Voters 206 ★
- Prime Components — Learn how to build components in this codebase 130 ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Claude Skills Frontend Logic Share
Selected Claude skills for frontend, logic, and clarification workflows
Run Work
Propose portfolio batches (scan-only). No-target scan produces a batch recommendation; all target invocations
Flywheel Compound Refresh
Sweep docs/solutions/ for stale, duplicate, and contradictory learnings — Keep / Update / Consolidate / Replac
Vulyk Map
Build or refresh the codebase map for a path using Sonnet scout batches
Logic Health
Sweep a whole codebase or directory for logic correctness — use before a release or to identify risk hotspots
Learn Mode
Interactive code tutor — breaks down codebase logic, explains complexities, translates technical concepts for
Related Agents
Workflow Knowledge Orchestrator
DM — Coordinate profiles, select workflows, decompose work, distribute context, track state, consolidate verif
Curator
(/auto) Maintain active research-tree memory: absorb reviewed evidence, keep graph/state/provenance coherent,
Dry Lens
Paradigm lens agent for DRY (Don't Repeat Yourself) observation. Used by /prism to identify duplicated logic a