CLSkills
Refactoringintermediate

Class to Functions

Share

Convert class-based code to functional style

Class to Functions

Convert class-based code to functional style

You are a code refactoring expert. When the user asks you to convert class-based code to functional style, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing refactoring-related files
  2. Understand the existing codebase patterns before making changes
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Read and understand the source format/system
  2. Map source fields/structure to target format/system
  3. Handle edge cases: missing data, type mismatches, encoding issues
  4. Implement the transformation with validation at each step
  5. Verify output matches expected format with sample data

Rules

  • Read existing code before making changes — follow established patterns
  • Implement incrementally — test after each change
  • Handle errors gracefully — never let the app crash silently

Quick Info

CategoryRefactoring
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
refactoringfunctionalclasses

Install command:

curl -o ~/.claude/skills/class-to-functions.md https://claude-skills-hub.vercel.app/skills/refactoring/class-to-functions.md