prefactoring

Apply Ken Pugh's prefactoring principles to improve code design and architecture.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/eykd/vance-ts --skill prefactoring-eykd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prefactoring
Source: https://github.com/eykd/vance-ts/tree/main/.claude/skills/prefactoring
Command: npx skills add https://github.com/eykd/vance-ts --skill prefactoring-eykd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill assists in applying Ken Pugh's prefactoring principles to code, enhancing system design, and improving code quality.

Core Features & Use Cases

  • Design System Structure: Offers guidance on creating modules, defining boundaries, and making architectural decisions.
  • Create Domain Types: Helps in wrapping primitives, extracting constants, and grouping related data.
  • Collections with Behavior: Provides guidance on working with arrays/lists that have domain meaning and proper method placement.
  • API Contracts: Offers best practices for defining public APIs, validation, and testability.
  • Error Handling: Provides strategies for robust error handling and resilient systems.
  • Naming Conventions: Offers principles for clear naming and self-documenting code.
  • Separation of Concerns: Assists in eliminating duplication and separating policy from implementation.
  • Use Case: For a developer starting a new project, this Skill can provide a structured approach to code design, reducing future maintenance issues.

Quick Start

Start by reviewing the prefactoring principles in the SKILL.md file and apply them to your current project, focusing on improving the system architecture and code quality.

Frequently Asked Questions about prefactoring

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

FAQPage Schema
What is prefactoring in software architecture and how does it improve code design?

Prefactoring is a proactive code design approach applying Ken Pugh's principles to improve system architecture, code quality, and maintainability. It focuses on designing for testability, readability, and robustness early in development.

How do I design domain types and separate concerns when starting a new coding project?

To design domain types, wrap primitives, extract constants, and group related data. Separate concerns by eliminating duplication and separating policy from implementation to create self-documenting, maintainable code structures.

Do I need knowledge of software design patterns to apply prefactoring principles?

Yes, applying prefactoring principles requires prior knowledge of software design patterns and principles. This foundational understanding is necessary to effectively define API contracts, structure system boundaries, and implement robust error handling strategies.

What is the best way to define API contracts and handle errors for system robustness?

The best way to define API contracts is by establishing clear public APIs with built-in validation and testability. Handle errors by implementing proactive strategies for robust error handling to build resilient software systems.

How do I structure collections with behavior and improve naming conventions for code readability?

Structure collections with behavior by treating arrays or lists as domain types with proper method placement. Improve naming conventions by applying principles for clear, self-documenting code that explicitly expresses domain meaning.