Skip to content

[docs] Add GitHub Copilot custom coding agent instructions with SEO and Core Web Vitals guidance#7137

Merged
leecalcote merged 4 commits intomasterfrom
copilot/create-coding-agent-github-copilot
Nov 20, 2025
Merged

[docs] Add GitHub Copilot custom coding agent instructions with SEO and Core Web Vitals guidance#7137
leecalcote merged 4 commits intomasterfrom
copilot/create-coding-agent-github-copilot

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 20, 2025

Description

This PR fixes #7136

Adds .github/copilot-instructions.md to enable GitHub Copilot's custom coding agent feature for this repository with comprehensive SEO and Core Web Vitals optimization guidance.

Content Structure

The instructions file provides:

  • AI Model Selection: Directive to always use the most powerful AI model available (GPT-4, Claude 3.5 Sonnet, etc.)
  • Project context: Gatsby.js 5.x static site, React components, MDX content, styled-components
  • Core principles: Minimal surgical changes, existing pattern preservation, accessibility (WCAG 2.1), performance-first approach
  • Development workflow: make setup, make site, make lint with build time expectations, Lighthouse CI monitoring
  • Code patterns: Functional React components, styled-components, ESLint rules (2-space indent, double quotes, semicolons)
  • Content guidelines: Tone, MDX frontmatter, SEO, terminology (Meshery, Kanvas)
  • SEO Optimization: Comprehensive requirements including meta descriptions, title tags, keywords, heading hierarchy, semantic HTML, image optimization, internal linking, schema markup, Open Graph tags, canonical URLs, mobile-first optimization
  • Core Web Vitals: Detailed optimization strategies with specific targets:
    • LCP (Largest Contentful Paint) < 2.5s
    • FID/INP (First Input Delay / Interaction to Next Paint) < 100ms/200ms
    • CLS (Cumulative Layout Shift) < 0.1
  • Git workflow: Conventional Commits, PR process, branch naming
  • Performance: gatsby-plugin-image, code splitting, lazy loading, memory optimization, font loading strategies
  • Examples: Complete blog post with SEO metadata and React component implementations with performance patterns

Sources

Synthesized from:

  1. Repository's AGENTS.md - all existing LLM contribution guidelines
  2. GitHub's custom agent best practices - standard file location and structure
  3. Gatsby.js ecosystem patterns - framework-specific build/optimization techniques
  4. Core Web Vitals best practices - Google's performance standards
  5. SEO best practices - comprehensive search engine optimization guidance

The agent emphasizes minimal changes, validates build completion before claiming success, and prioritizes SEO and Core Web Vitals performance in all contributions.

Notes for Reviewers

The file is documentation-only (755 lines, 27KB). Enhanced from initial 605 lines with +150 lines of SEO and Core Web Vitals guidance per review feedback. No code changes, no build required.

Key enhancements based on feedback:

  • Added AI model selection guidance at top of file
  • Expanded SEO section with 20+ critical requirements
  • Added dedicated Core Web Vitals optimization section with specific targets and code examples
  • Restructured checklist with dedicated SEO and performance validation items
  • Enhanced blog post example with complete SEO metadata

Signed commits

  • Yes, I signed my commits.
Original prompt

This section details on the original issue you should resolve

<issue_title>Create a coding agent for GitHub Copilot</issue_title>
<issue_description>Instructions

  1. Base the custom coding agent instructions on this repo's AGENTS.md. Incorporate all of its considerations.
  2. Incorporate GitHub best practices for custom coding agents as appropriate.
  3. Research popular examples of coding agent instructions for projects using similar frameworks.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@leecalcote leecalcote marked this pull request as ready for review November 20, 2025 03:56
Co-authored-by: leecalcote <7570704+leecalcote@users.noreply.github.com>
Copilot AI changed the title [WIP] Create a coding agent for GitHub Copilot [docs] Add GitHub Copilot custom coding agent instructions Nov 20, 2025
Copilot AI requested a review from leecalcote November 20, 2025 04:01
@leecalcote
Copy link
Copy Markdown
Member

Ensure that SEO is considered for and that Core Web Vitals are accounted for.

@leecalcote
Copy link
Copy Markdown
Member

@copilot:

  1. Ensure that SEO is considered for and that Core Web Vitals are accounted for.
  2. Always select the most powerful AI model available.

Co-authored-by: leecalcote <7570704+leecalcote@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 20, 2025

@copilot:

  1. Ensure that SEO is considered for and that Core Web Vitals are accounted for.
    ...

Enhanced the Copilot instructions with comprehensive guidance:

  1. SEO Optimization - Expanded section with critical requirements including meta descriptions, title tags, keywords, heading hierarchy, semantic HTML, image optimization, internal linking, schema markup, Open Graph tags, and mobile-first optimization.

  2. Core Web Vitals - Added dedicated section with specific targets and optimization strategies:

    • LCP < 2.5s (image optimization, preloading, font strategies)
    • FID/INP < 100ms/200ms (code splitting, event handler optimization)
    • CLS < 0.1 (explicit dimensions, font-display, skeleton screens)
  3. AI Model Selection - Added prominent section at the top instructing to always use the most powerful AI model available (GPT-4, Claude 3.5 Sonnet, etc.).

Enhanced with practical code examples, restructured checklist with dedicated SEO and performance sections, and updated blog post example with complete SEO metadata.

Commit: 478c5d0

Copilot AI changed the title [docs] Add GitHub Copilot custom coding agent instructions [docs] Add GitHub Copilot custom coding agent instructions with SEO and Core Web Vitals guidance Nov 20, 2025
@leecalcote
Copy link
Copy Markdown
Member

@copilot, use "Layer5 Team" as the default byline.

@leecalcote leecalcote merged commit f44e981 into master Nov 20, 2025
@leecalcote leecalcote deleted the copilot/create-coding-agent-github-copilot branch November 20, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a coding agent for GitHub Copilot

2 participants