BrowsePrompt

More in this categoryCoding Prompts

05 / 06

2-phase workflowFeatured

Function Draft to Production-Ready

Draft a working function, then harden it for production.

Published

Workflow · 2 phases

  1. Phase 1: Phase 1 — Function draft

    Write a [LANGUAGE] function that [DESCRIBE TASK, e.g. fetches user data from an API and caches it]. Keep it simple and readable first — just make it work.
  2. Phase 2: Phase 2 — Error handling

    Now harden that function for production: add try/catch error handling, input validation, timeout handling, retry logic with exponential backoff, and logging. Explain each addition with a one-line comment.
  • Coding Prompts2 phases

    Plan Feature Then Build

    Plan a feature first, then build it agentically.

    • Windsurf
    By Priya Sharma
  • Coding Prompts

    Unit Tests Generator

    Full unit test suites with edge cases covered.

    • Windsurf
    By Aarav Mehta
  • Coding Prompts2 phases

    Codebase Question to Fix

    Understand the codebase, then implement the fix.

    • Cursor
    By Sofia Carter
  • Coding Prompts

    Refactor Legacy Function

    Clean up legacy code without breaking behavior.

    • Cursor
    By Rahul Verma