HOMESoftware
Back to Gallery

Software Prompts

Discover curated production-ready templates for Software. Copy tested prompts for ChatGPT, Claude, Gemini, and Midjourney.

Slot: category-top-banner • Format: horizontal
REKLAM / ADVERTISEMENT
FILTER MODEL:
Software
Gemini

TypeScript Edge-Case Test Writer

Generates comprehensive Jest/Vitest unit tests covering all boundary conditions and edge cases for a TS function.

Terminal
You are an expert QA and software testing engineer. Analyze the TypeScript function provided below and write a comprehensive unit test suite using Jest/Vitest.

Ensure that the tests cover:
1. Happy Path: Core functionality with expected inputs and outputs.
2. Edge Cases: Handling null, undefined, empty strings, negative numbers, overflow limits, or empty arrays.
3. Error Handling: Verifying that the function throws the correct error types when invalid inputs are provided.
4. Type Safety: Adhering to and validating TS types.

Here is the function code:
```typescript
[Paste Function Code Here]
```
Ready to copy
SoftwareFEATURED
Claude

Legacy Code Refactoring & Optimization

Refactors legacy JavaScript/TypeScript into modern standards (ES6+), optimizing performance and readability.

Terminal
You are a senior software architect. Analyze the legacy code provided below and refactor it based on the following standards:

1. Modern Standards: Utilize ES6+ features (const/let, arrow functions, destructuring, optional chaining, nullish coalescing).
2. Performance: Optimize time complexity (e.g., swapping nested loops for Map/Set lookups).
3. Readability: Adhere to Clean Code principles (smaller functions, clear naming conventions, comments explaining complex business logic).
4. Security: Eliminate potential bug sources like null pointer exceptions or unexpected type coercions.

Here is the code to refactor:
```javascript
[Paste Code Here]
```
Ready to copy
SoftwareFEATURED
Claude

React & Next.js Performance Optimizer

Refactors React hooks and Next.js page components for optimal rendering performance, caching, and state management.

Terminal
You are an expert Frontend Performance Engineer. Analyze the React/Next.js code provided below and refactor it to optimize performance.

Focus on:
1. Minimizing Unnecessary Rerenders: Use useMemo, useCallback, or React.memo where appropriate.
2. Code Splitting: Suggest dynamic imports (next/dynamic) for heavy components.
3. Caching/Fetch Optimization: Leverage Next.js fetch caching options or React Server Components configuration.
4. State Management: Flatten components structure or optimize state distribution.

Here is the code:
```tsx
[Insert React/Next.js Code Here]
```
Ready to copy
Software
ChatGPT

TypeScript API Endpoint Code Builder

Generates complete Next.js route handlers and Zod input validators based on request schemas.

Terminal
You are a backend software engineer. Write a complete TypeScript Next.js App Router route handler (route.ts) based on the database schema and request requirements provided below.

The output must include:
1. Zod Schema: A validation schema for request payload or query parameters.
2. Error Handling: Return 400 Bad Request if validation fails, 500 for internal errors.
3. Safe DB query: Simulating database operations using Prisma/Mongoose query formatting.
4. Correct Types: Return typed NextResponses with appropriate HTTP status codes.

Endpoint details:
- Route URL/Method: [e.g., POST /api/user]
- Request Body Schema: [Describe fields and types]
- Database Action: [Create user, fetch data, etc.]
Ready to copy
Software
Gemini

SQL Database Performance Query Tuner

Analyzes slow SQL queries, designs indexes, and refactors queries for optimal execution speed.

Terminal
You are a database administrator and SQL optimization expert. Analyze the slow SQL query and schema provided below and provide optimization recommendations.

Deliver:
1. Refactored Query: Write the optimized version of the SQL query.
2. Indexing Strategy: Identify which columns should be indexed (composite or single) and explain why.
3. Query Execution Plan analysis: Explain why the original query was slow (e.g., table scan, bad join logic).

SQL Query & Details:
```sql
[Insert SQL Query Here]
```
Database Schema & Row Counts:
[Provide schema details and table sizes]
Ready to copy
Software
ChatGPT

OpenAPI Spec & Swagger Documenter

Transforms raw JSON payloads or routes code into standardized OpenAPI 3.0 YAML documentation.

Terminal
You are an API technical writer. Convert the raw code or request/response payload details below into a standardized OpenAPI 3.0 specification in YAML format.

Ensure:
- Valid YAML syntax.
- All request parameters (header, query, path, body) are detailed with types.
- Success responses (200 OK, 201 Created) and error responses (400, 401, 404, 500) are fully defined.

Raw API Details:
[Paste API endpoint code, controller, or JSON payloads here]
Ready to copy