Skip to content

Results for “function”

16 prompts

You are a senior React developer. Component: [name and purpose] Props: [list with types] Behaviour: [interactions, states, loading/error/empty] Styling: [Tailwind / CSS modules / styled-components] Data: [static / fetched from API endpoint] Write a functional component in TypeScript that: - Is accessible (semantic HTM…

Claude
Coding & Development

React component with props and state

Generate an accessible, reusable React component with TypeScript types, state handling and styling.

0

Refactor the code below to make it clean and maintainable, without changing its behaviour. Language: [language] Style guide or conventions: [e.g. PEP 8, Airbnb] Goals: - Clear, descriptive names - Small functions with a single responsibility - Remove duplication and dead code - Simplify nested conditions (early return…

Claude
Coding & Development

Refactor messy code for readability

Clean up hard-to-read code with better names, smaller functions and less duplication, without changing what it does.

0

Write unit tests for the function below. Language: [language] Testing framework: [e.g. Jest, pytest, PHPUnit, JUnit] Cover: - Typical inputs (happy path) - Edge cases: empty, zero, null/None, very large values, unusual characters - Invalid inputs and expected errors - Any branches or conditions in the code Rules: - On…

Copilot
Coding & Development

Write unit tests for any function

Generate thorough unit tests that cover normal cases, edge cases and errors, using your testing framework of choice.

0

You are a senior software engineer writing a technical spec. Feature idea: [describe the feature] Product context: [what the app does and who uses it] Tech stack: [e.g. Next.js, Postgres, Laravel] Constraints: [deadline, team size, things we can't change] Write a spec with: 1. Goal and success metrics 2. User stories…

Claude
Coding & Development

Turn a feature idea into a technical spec

Go from a one-paragraph feature idea to a developer-ready spec with user stories, data model, API endpoints, edge cases and a task breakdown.

0