Software Development
TypeScript Refactoring Prompt That Explains Every Change
Refactor messy TypeScript for readability and type safety, and get an explicit list of behavior changes and tests to add.
Home / All prompts / Software Development
Development prompts work best when they ask for reasons along with code. A refactor you cannot review is a risk, so these prompts ask the model to list what changed, what behavior might differ and which tests would catch a regression.
Always run model-written code in a safe environment, read it before merging and keep your own tests as the final judge. The prompts below are written to make that review faster, not to replace it.
Software Development
Refactor messy TypeScript for readability and type safety, and get an explicit list of behavior changes and tests to add.
Software Development
Diagnose a slow PostgreSQL query from the schema and EXPLAIN output, and get index and rewrite suggestions with the trade-offs.
Software Development
Design a React feature as small, testable parts: a data hook, a presentational view, typed props and explicit loading, empty and error states.
Software Development
Generate focused unit tests by listing a function's behaviors and edge cases first, then writing tests that check behavior instead of implementation.