1. Home
  2. Code & Development
  3. GitHub Copilot
GitHub Copilot logo

GitHub Copilot

AI pair programmer for coding assistance

4.7/5 Rating
41 Views
Paid
My Prompt Writer Craft and save your own prompts for GitHub Copilot — stored privately in your browser
// [LANGUAGE]. Write a [FUNCTION/CLASS/MODULE] that [WHAT IT DOES]. It should handle [EDGE CASES]. Input: [INPUT TYPE]. Output: [OUTPUT TYPE]. Follow [CODING STYLE/PATTERNS].
Example:
// TypeScript. Write a class that manages a priority queue of API requests. It should handle rate limiting, retries with exponential backoff, and concurrent request limits. Input: request objects with priority scores. Output: resolved promises. Follow SOLID principles.

About GitHub Copilot

Get AI-powered code suggestions, entire functions, and explanations directly in your editor as you code.

Key Features

  • Powered by advanced AI technology
  • User-friendly interface for all skill levels
  • Fast and reliable performance
  • Regular updates and improvements

Sample Prompts for GitHub Copilot

10 ready-to-use prompts — click any card to copy, or paste into the writer above.

Prompt Writer Write, refine and save your own prompts — stored in your browser
Generate a function Copy

// TypeScript. Write a function that takes an array of objects with name and score properties, removes duplicates keeping the highest score, sorts descending, and returns the top N results. Include JSDoc comments and handle null inputs gracefully.

Write unit tests Copy

// Write comprehensive Jest unit tests for the function below. Include: happy path, edge cases for empty arrays, null inputs, duplicate values, boundary conditions, and a test for performance with 10,000 items: [paste your function]

Refactor for clean code Copy

// Refactor this function to follow clean code principles. Remove duplication, improve naming, add error handling, reduce complexity, and add JSDoc. Explain each change you made and why: [paste your messy code]

Build a React hook Copy

// React + TypeScript. Write a custom hook useApiData that fetches from a URL, handles loading/error/success states, caches results for N minutes using useRef, cancels requests on unmount with AbortController, and auto-refetches when dependencies change.

Write a REST API endpoint Copy

// Node.js + Express + TypeScript. Write a POST /api/users/:id/settings endpoint that validates the request body against a Zod schema, updates the user settings in a PostgreSQL database using Prisma, logs the change with the user ID and timestamp, and returns appropriate HTTP status codes with error details.

Database query optimization Copy

// SQL (PostgreSQL). The following query takes 8 seconds on a table with 5 million rows. Analyze it, explain why it is slow, rewrite it for performance, and suggest the indexes I should add: [paste your slow query]

Implement a design pattern Copy

// TypeScript. Implement the Observer pattern for a real-time notification system. Multiple components should be able to subscribe to events like user.login, order.placed, payment.failed. Show the full implementation with a working example.

Convert to async Copy

// JavaScript. Convert this callback-based function to use async/await. Add proper error handling with try/catch, handle all edge cases, and make sure it handles Promise.allSettled for parallel operations where appropriate: [paste your callback code]

Write documentation Copy

// Generate JSDoc documentation and a README section for this module. Include: what it does, all parameters with types and descriptions, return values, thrown errors, usage examples for the 3 most common use cases, and known limitations: [paste your module]

Security audit Copy

// Perform a security audit on this code. Check for: SQL injection, XSS vulnerabilities, insecure direct object references, missing input validation, exposed secrets, unsafe dependencies, and improper error handling. For each issue, show the fix: [paste your code]

Try GitHub Copilot

Visit the official website to get started

Visit Website

External link — opens in new tab

Pricing

Paid

Paid subscription required to access

Quick Stats

Rating 4.7/5.0
Total Views 41
Added Feb 2026
Status Verified
Sample Prompts 10 available