P

GitHub Copilot Prompt for Optimizing SEO

The prompt

Generate a complete SEO module for this web application. Include: 1) A reusable meta tag component (title, description, canonical, Open Graph, Twitter Cards) with typed props. 2) An automatic JSON-LD structured data generator for Article, Product, FAQ, BreadcrumbList, and Organization types. 3) A dynamic sitemap.xml that crawls all routes and includes lastmod, changefreq, and priority. 4) An intelligent robots.txt file with appropriate directives per environment (dev/staging/prod). 5) An SEO audit function that programmatically checks: presence of mandatory tags, title length (50-60 chars) and description length (150-160 chars), H1-H6 heading hierarchy, alt attributes on images, and broken internal links. Each component must follow performance best practices (no render-blocking, lazy loading for below-the-fold images) and be compatible with server-side rendering.

Personalize this prompt with Léa

Answer 3 questions and Léa tailors the prompt to your situation.

Why it works

This prompt is effective because it structures the request into five distinct and measurable modules, allowing Copilot to generate coherent and complete code rather than isolated fragments. By specifying precise technical constraints (character lengths, schema types, environments), ambiguity is eliminated and directly usable code is obtained. The modular approach also facilitates gradual integration into an existing project.

Expected result

You will obtain a set of ready-to-use files and components: a reusable meta component, structured data generation functions, a dynamic sitemap, and an automated SEO audit script. The generated code will comply with W3C standards and Google Search Central recommendations, with a modular architecture for easy maintenance and evolution.

Variants by level

FAQ

Can GitHub Copilot really improve my site's SEO?
Yes, but indirectly. GitHub Copilot does not directly modify your Google ranking: it accelerates the implementation of technical SEO best practices in your code. It generates optimized meta tag components, structured data compliant with schema.org standards, and server configurations favorable to crawling. The main advantage is the reduction of human errors and technical consistency across the entire site, two critical factors for large-scale SEO.
How can I verify that the SEO code generated by Copilot is correct?
Three levels of verification are recommended. First, use Google's Rich Results Test and the Schema Markup Validator to validate your structured data. Next, run a Lighthouse audit with SEO mode enabled to check meta tags, heading hierarchy, and accessibility. Finally, integrate automated tests in your CI (with Playwright or Puppeteer) that verify the presence of critical tags on each page type after every deployment.
Which frameworks are best supported by Copilot for SEO?
GitHub Copilot works with all frameworks, but its suggestions are particularly relevant with Next.js (thanks to the next/head module and generateMetadata functions), Nuxt.js (with useSeoMeta and useHead), and Astro (which natively integrates SEO into its layouts). These frameworks have a large open-source codebase on which Copilot was trained, improving the quality and relevance of the generated suggestions.

Related prompts

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More prompts to explore

GitHub Copilot Prompt for Summarizing a Meeting

GitHub Copilot, initially designed for code assistance, proves to be a formidable ally for business productivity tasks, particularly meeting summarization. This page provides an optimized prompt to turn any transcript or notes into a structured report with decisions, actions, and owners.

GitHub Copilot Prompt for Survey Analysis

Survey analysis is a crucial step to extract actionable insights from raw data. GitHub Copilot, through its code generation and contextual understanding capabilities, becomes a powerful ally to automate response processing, identify statistical trends, and produce relevant visualizations.

GitHub Copilot Prompt for Writing a Business Proposal

GitHub Copilot, the coding assistant developed by GitHub and OpenAI, is not limited to code generation. Thanks to its advanced natural language understanding capabilities, it becomes a formidable ally for writing structured professional documents, including business proposals.

GitHub Copilot Prompt for Writing a Contract

GitHub Copilot, the AI-powered coding assistant, proves to be a remarkably versatile tool that goes far beyond the scope of software development. Among its lesser-known applications, contract drafting is a particularly relevant use case.

GitHub Copilot Prompt for Writing a Dissertation

GitHub Copilot, the AI-powered coding assistant developed by GitHub and OpenAI, is not limited to software development. Its generation capabilities...

GitHub Copilot Prompt for Writing a Job Offer

GitHub Copilot, the coding assistant developed by GitHub and OpenAI, is not limited to code generation. Thanks to its advanced completion and

Go further

Get new prompts every week

Join our newsletter.