Promptles
Multi-Step

Identify the Pattern

When asking Claude to extract shared logic, explicitly describe the repeated pattern you see. Don't just say 'refactor these files' -- tell Claude what the common pattern is so it knows exactly what to extract and what to leave behind.

Where you'll practice this

One Promptles scenario teaches this principle directly.

  • The Custom Hook

    You have three React components -- `UserList.tsx`, `ProductGrid.tsx`, and `OrderHistory.tsx` -- that all implement the same pattern: fetch data from an API on mount, track loading state, handle errors, and render accordingly. Each component has its own duplicated…

Other principles in Multi-Step