A beginner-friendly guide to understanding and creating custom GitHub Copilot agents.
What is an Agent?
In the context of GitHub Copilot, an agent is a specialized AI assistant designed to help with specific tasks in your development workflow. Think of agents as experts that have been trained with particular knowledge, tools, and processes to solve focused problems.
Agents can read files, make edits, run commands, and interact with external services like GitHub’s API. They follow instructions you define and work autonomously to complete tasks.
What is a Custom Agent?
A custom agent is a specialized GitHub Copilot assistant configured with specific expertise, tools, and behavioral instructions. Agents are defined as .agent.md files in the .github/agents/ directory and can be used in VS Code or on GitHub.com.
Unlike the default Copilot coding agent, custom agents allow you to:
- Define specialized behavior for recurring tasks
- Limit tool access to only what’s needed for security
- Encode organizational knowledge into reusable assistants
- Automate workflows that require multiple steps
For example, you could create:
- A test-writing agent that knows how to create comprehensive test suites
- A documentation agent that understands how to write clear, consistent docs
- An accessibility agent that can suggest improvements for existing content based on guidelines set by the organization
Custom Agents vs Custom Instructions
Before diving into custom agents, it’s important to understand the difference between custom agents and custom instructions, as they serve different purposes in your GitHub Copilot workflow.
What are Custom Instructions?
Custom instructions are global preferences and guidelines that apply to all GitHub Copilot interactions across your organization or repository. They’re configured in your Copilot settings and run in the background during every coding session. Think of them as your personal coding standards that Copilot always keeps in mind.
For accessibility work, custom instructions might include:
- Include semantic HTML elements in generated markup
- Add ARIA labels to interactive components when the component doesn’t have visible text that can function as an accessible label
- Ensure keyboard navigation patterns are implemented for custom widgets without native support
Key Differences
| Aspect | Custom Instructions | Custom Agents |
|---|---|---|
| Scope | Global - applies to all Copilot interactions | Specific - only active when explicitly invoked |
| Invocation | Always active in the background | Opt-in - selected from agent picker |
| Tool Access | Uses standard Copilot tools | Can restrict or grant specific tool permissions |
| Use Case | Broad coding preferences and standards | Focused, repeatable tasks and workflows |
| Output | Influences all code suggestions | Task-specific results or pull requests |
Learn more about optimizing Copilot for accessibility with custom instructions.
When to Use Custom Instructions
Use custom instructions when you want:
- Broad awareness of accessibility principles across all your work
- Team-wide standards applied consistently without thinking about them
- General coding preferences that should influence all suggestions
- Background context that shapes how Copilot assists with any task
Example: “Make sure to use page titles that are unique and contain the website name as well as the name of the active page (e.g., ‘Contact Us - Acme Corporation’).”
When to Use Custom Agents
Use custom agents when you need:
- Specific, repeatable workflows that you invoke on demand
- Tool restrictions for security or to focus the agent’s capabilities
- Automated task execution like running tests and creating PRs
- Specialized expertise for particular types of work (auditing, tracking, generating)
Example: An agent that runs axe-core against a webpage, analyzes violations, fixes them, and submits a pull request.
Using Both Together
Custom instructions and custom agents are complementary:
- Custom instructions ensure all your Copilot-generated code follows accessibility best practices
- Custom agents handle specific accessibility tasks like auditing, issue tracking, or automated remediation
For accessibility-focused development, you might use custom instructions to ensure every code suggestion considers WCAG requirements, while using a specialized agent to audit existing code and fix violations.
Why Would You Create a Custom Agent?
Custom agents solve real problems by automating repetitive, specialized, or complex tasks that require domain expertise.
Example Use Cases
1. Issue Tracking Agent
- Problem: You regularly search GitHub for specific types of issues (bugs labeled “accessibility”, features in a milestone, etc.) and need formatted summaries.
- Solution: An agent that knows exactly what filters to apply, how to query the GitHub API, and how to present results clearly.
- Value: Saves 10-15 minutes per search and ensures consistent filtering.
2. UI Component Generator
- Problem: Your organization has specific accessibility guidelines for UI components (always using
forandidto associate labels with form fields, proper ARIA attributes, etc.) but general purpose AI agents apply them inconsistently. - Solution: An agent that generates UI components following your organization’s style guide and accessibility requirements.
- Value: Enforces standards automatically, reduces accessibility defects, and speeds up component creation.
Note: This is a great use case for custom agents. However, while this approach may work well with simple components, complex components within a large codebase can introduce unpredictable behavior that may also vary depending on the language model being used. Test carefully with the help of an accessibility expert when implementing in your own organization.
3. Code Reviewer Agent
- Problem: General AI code reviews don’t follow your organization’s specific practices, such as custom error handling patterns, naming conventions, or accessibility requirements unique to your codebase.
- Solution: An agent configured with your team’s specific code review standards that performs automated checks and provides feedback aligned with your organization’s practices.
- Value: Consistent adherence to organizational standards, faster reviews, and frees human reviewers to focus on critical workflows.
4. Accessibility Auditor Agent
- Problem: You may not be familiar with all WCAG requirements and want to decrease the chances your code introduces accessibility barriers for people with disabilities.
- Solution: An agent that runs axe-core CLI against your web pages, identifies real violations, creates a pull request for human review, and provides a summary report.
- Value: Catches accessibility issues early using industry-standard tooling, provides consistent audits, and automates the fix-verify cycle.
Types of Custom Agents
Custom agents can be categorized into two primary types based on their interaction model and output:
1. Informational Agents
These agents are designed for conversational interactions where users seek information, guidance, or analysis. They can:
- Analyze information in specific ways tailored to your needs
- Perform GitHub searches with predefined scopes
- Present results in specific formats
2. Task-Oriented Agents
These agents perform concrete tasks based on user input and can autonomously create pull requests with proposed changes. They can:
- Execute testing tools and analyze results
- Generate code changes based on findings
- Submit pull requests with comprehensive descriptions
The key distinction is that informational agents provide insights and answers, while task-oriented agents take action and produce deliverable artifacts like pull requests or code changes. However, many agents function as both: answering questions conversationally and making direct code changes depending on what the user asks for. The Markdown Accessibility Assistant covered later in this guide is an example of an agent that can explain accessibility issues (informational) and also edit files to fix them (task-oriented).
How Do You Invoke an Agent?
From VS Code
- Ensure GitHub Copilot is set up in your VS Code
- Open GitHub Copilot Chat (sidebar or inline)
- Windows:
Ctrl + Alt + I - macOS:
Cmd + Ctrl + I
- Windows:
- In the chat’s input toolbar, select the Set Agent button
- Select your custom agent from the agents picker
- Type your request and the agent will execute in your local workspace
Example: After selecting the insiders-a11y-tracker agent, type the following in the chat:
What accessibility improvements shipped this week?
The agent will search GitHub, process results, and respond directly in the chat.
From GitHub.com
Agents can be invoked in two ways on GitHub:
Option 1: Chat with Task Mode
- Open Copilot Chat on GitHub.com
- Select Task from the mode picker in the chat interface
- Optionally, select a custom agent from the agent picker
- Type your request and submit
- The agent will analyze the task and can create a PR automatically
Option 2: Issue Assignment
- Open any issue in your repository (or create a new one)
- In the Assignees section, assign Copilot as the assignee
- A dialog opens where you can optionally provide additional instructions and select a custom agent from the agent picker
- Select Assign to confirm
- Copilot (or the selected custom agent) will create a branch, make changes, and open a PR
Environment Setup for GitHub
When agents run on GitHub (not locally), they may need additional tools installed. You can create a workflow file that runs before the agent starts working to prepare the environment. This file must contain a single job named copilot-setup-steps for GitHub to recognize it. Learn more about customizing the agent environment.
Location: .github/workflows/copilot-setup-steps.yml
name: Copilot Setup Steps
on: workflow_dispatch
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
# Install any tools your agent needs
- name: Install dependencies
run: npm install -g your-tool-here
Step-by-step Guide: Create an Informational Agent
Let’s build a simple but useful agent together. We’ll create an Accessibility Tracker that monitors VS Code Insiders releases for accessibility improvements.
Prerequisites
Before you can create and use this example, you must have the official GitHub MCP server installed and configured. The Model Context Protocol (MCP) server provides the necessary tools and GitHub API integration that agents rely on to function.
GitHub MCP Server: https://github.com/github/github-mcp-server
Note: The GitHub MCP Server installation includes separate workflows for VS Code and VS Code Insiders. Your choice determines which version of VS Code the MCP server will be installed in, but either option works equally well for these instructions.
Without this server installed, agents will not have access to GitHub tools like github/search_issues, github/issue_read, and other GitHub API operations that many custom agents depend on.
Step 1: Define the Purpose
What does it do?
- Searches the
microsoft/vscoderepository for closed accessibility issues - Filters by release milestone and “insiders-released” label
- Provides formatted summaries of recent improvements
Why is this useful?
- Saves time by automating GitHub searches with complex query syntax
- Keeps teams informed about new accessibility features
- Demonstrates core agent concepts without complexity
Step 2: Build the Agent File Structure
Agent files have two main parts: YAML frontmatter and a system prompt. Let’s build them piece by piece.
Part 1: YAML Frontmatter
This metadata defines how the agent appears and what it can do:
---
name: insiders-a11y-tracker
description: Specialized agent for tracking accessibility improvements in VS Code Insiders builds
tools: ["github/search_issues", "github/issue_read"]
---
- name: How users select the agent (shows in the agent picker). If not specified, the name will be derived from the file name
- description: Appears in agent lists to help users find it
- tools: Defines which tools the agent can use. Our agent needs to interact with GitHub, so we grant access to
github/search_issues(search for issues matching criteria) andgithub/issue_read(get detailed information about specific issues). We don’t need file editing or shell commands, so we restrict to just these tools for security. Iftoolsis omitted, the agent will have access to all tools available to GitHub Copilot
Part 2: System Prompt - Identity
Define who the agent is:
You are a VS Code Insiders accessibility tracking specialist. Your primary responsibility is to help users stay informed about accessibility improvements introduced in VS Code Insiders builds.
Part 3: System Prompt - Capabilities
Tell the agent what it can do:
## Your Capabilities
- Search for accessibility issues in the microsoft/vscode repository that have been released to Insiders
- Track when specific accessibility features were introduced
- Provide summaries of recent accessibility improvements
- Filter issues by specific dates, date ranges, or milestones
- Answer questions about the status and timeline of accessibility features
Part 4: Domain Knowledge
Provide the specific GitHub query pattern:
## Search Filter Knowledge
You use the following GitHub search pattern to find accessibility improvements:
repo:microsoft/vscode is:closed milestone:"[Month] [Year]" label:accessibility label:insiders-released
Always adjust the milestone to match the current month/year or the timeframe the user is asking about.
Part 5: Behavioral Instructions
Define how to handle different scenarios:
## Your Responsibilities
1. **Date-Specific Queries**: When asked about improvements "today" or on specific dates, add `closed:YYYY-MM-DD` to your search query
2. **Recent Changes**: When asked about "recent" or "latest" changes, search the current month's milestone and sort by most recently updated
3. **Feature Tracking**: When asked if a specific feature has been introduced, search for relevant keywords along with the standard filters
4. **Monthly Summaries**: When asked about all improvements in a period, retrieve all matching issues and provide a comprehensive summary
5. **Details on Demand**: When users want more information about a specific issue, use the issue read tool to get full details including comments and related PRs
Part 6: Output Formatting
Specify how to present results:
## Response Guidelines
- Be concise but informative in your responses
- **When presenting issues, always start with the issue description/title first**, followed by issue number and other details
- Always include issue numbers and links when referencing specific improvements
- Group related improvements together when presenting multiple results
- Present results as numbered or bulleted lists, not tables
- When no results are found, clearly state this and suggest alternative timeframes or searches
- Format dates consistently (e.g., "January 16, 2026")
Part 7: Context Reminders
Reinforce key constraints:
## Context Awareness
- Current repository: microsoft/vscode
- Focus area: accessibility label
- Build type: insiders-released label
- Always verify you're searching the correct milestone for the user's timeframe
Remember: You are specifically focused on accessibility improvements that have been released to VS Code Insiders. Do not search for or report on features that are only in stable builds or are still in development.
Step 3: The Complete Agent File
View the Insiders A11y Tracker agent file
Save this as `.github/agents/insiders-a11y-tracker.agent.md`:---
name: insiders-a11y-tracker
description: Specialized agent for tracking accessibility improvements in VS Code Insiders builds
tools: ["github/search_issues", "github/issue_read"]
---
You are a VS Code Insiders accessibility tracking specialist. Your primary responsibility is to help users stay informed about accessibility improvements introduced in VS Code Insiders builds.
## Your Capabilities
- Search for accessibility issues in the microsoft/vscode repository that have been released to Insiders
- Track when specific accessibility features were introduced
- Provide summaries of recent accessibility improvements
- Filter issues by specific dates, date ranges, or milestones
- Answer questions about the status and timeline of accessibility features
## Search Filter Knowledge
You use the following GitHub search pattern to find accessibility improvements:
```
repo:microsoft/vscode is:closed milestone:"[Month] [Year]" label:accessibility label:insiders-released
```
Always adjust the milestone to match the current month/year or the timeframe the user is asking about.
## Your Responsibilities
1. **Date-Specific Queries**: When asked about improvements "today" or on specific dates, add `closed:YYYY-MM-DD` to your search query
2. **Recent Changes**: When asked about "recent" or "latest" changes, search the current month's milestone and sort by most recently updated
3. **Feature Tracking**: When asked if a specific feature has been introduced, search for relevant keywords along with the standard filters
4. **Monthly Summaries**: When asked about all improvements in a period, retrieve all matching issues and provide a comprehensive summary
5. **Details on Demand**: When users want more information about a specific issue, use the issue read tool to get full details including comments and related PRs
## Response Guidelines
- Be concise but informative in your responses
- **When presenting issues, always start with the issue description/title first**, followed by issue number and other details
- Always include issue numbers and links when referencing specific improvements
- Group related improvements together when presenting multiple results
- Present results as numbered or bulleted lists, not tables
- When no results are found, clearly state this and suggest alternative timeframes or searches
- Format dates consistently (e.g., "January 16, 2026")
## Context Awareness
- Current repository: microsoft/vscode
- Focus area: accessibility label
- Build type: insiders-released label
- Always verify you're searching the correct milestone for the user's timeframe
Remember: You are specifically focused on accessibility improvements that have been released to VS Code Insiders. Do not search for or report on features that are only in stable builds or are still in development.
Step 4: Testing Your Agent
- Save the file to
.github/agents/insiders-a11y-tracker.agent.md - Open Copilot Chat in VS Code
- Use the agent picker to select
insiders-a11y-tracker - Try these prompts:
what shipped this month?tell me about issue #12345any keyboard navigation improvements in January?
Step-by-step Guide: Create a Task-Oriented Agent
The Insiders Accessibility Tracker above is an informational agent that searches and reports. Now let’s build a task-oriented agent that makes changes to files and can submit pull requests.
We’ll create a Markdown Accessibility Assistant that improves markdown documentation by applying the five accessibility best practices from GitHub’s blog post 5 tips for making your GitHub profile page accessible. It works both locally in VS Code (editing files directly) and on GitHub.com (reviewing PRs and committing fixes).
Prerequisites
Before you can create and use this example, you must have:
-
The official GitHub MCP server installed and configured. The Model Context Protocol (MCP) server provides the necessary tools and GitHub API integration that agents rely on to function.
GitHub MCP Server: https://github.com/github/github-mcp-server
Note: The GitHub MCP Server installation includes separate workflows for VS Code and VS Code Insiders. Your choice determines which version of VS Code the MCP server will be installed in, but either option works equally well for these instructions.
-
Node.js installed for running the markdownlint tool. The agent uses
npxto runmarkdownlint-cli2for automated linting.
Without the MCP server installed, agents will not have access to GitHub tools. Without Node.js, the linting workflow will not function.
Step 1: Define the Purpose
What does it do?
- Reviews markdown files for accessibility issues based on five core principles
- Runs markdownlint to catch structural problems (heading hierarchy, bare URLs, etc.)
- Makes direct fixes for objective issues (links, headings, lists)
- Flags subjective issues (alt text, plain language) for human review
- Works locally on files or reviews GitHub PRs
Why is this useful?
- Automates accessibility checks that are easy to overlook
- Combines automated linting with AI judgment for nuanced decisions
- Teaches authors about accessibility while making improvements
- Respects human expertise for subjective decisions like alt text
How is this different from an informational agent?
- Takes action: Edits files, runs commands, creates commits
- Broader toolset: Needs file operations, command execution, and GitHub tools
- Tiered decision-making: Some fixes are automatic, others require approval
Step 2: Build the Agent File Structure
Agent files have two main parts: YAML frontmatter and a system prompt. Let’s build them piece by piece.
Part 1: YAML Frontmatter
This metadata defines how the agent appears and what it can do:
---
name: Markdown Accessibility Assistant
description: Improve markdown accessibility using GitHub's 5 best practices
tools:
- read
- edit
- search
- execute
- github/*
---
- name: How users select the agent (shows in the agent picker)
- description: Appears in agent lists to help users find it
- tools: Defines which tools the agent can use
Understanding the Toolset
Task-oriented agents typically need a broader set of tools to perform their work:
| Tool | Purpose |
|---|---|
read |
Read file contents to analyze markdown |
edit |
Make changes to markdown files, including multi-replace string operations |
search |
Find files in the workspace |
execute |
Run shell commands (markdownlint) |
github/* |
Wildcard access to all GitHub tools for PR reviews |
The execute tool is key for task-oriented agents—it allows running external tools like linters, test suites, or build scripts. The github/* wildcard grants access to all GitHub operations needed to read PR files, add review comments, and commit changes.
Part 2: System Prompt - Identity and Mission
Define who the agent is and its focused scope:
# Markdown Accessibility Assistant
You are a specialized accessibility expert focused on making markdown documentation inclusive and accessible to all users. Your expertise is based on GitHub's ["5 tips for making your GitHub profile page accessible"](https://github.blog/developer-skills/github/5-tips-for-making-your-github-profile-page-accessible/).
## Your Mission
Improve existing markdown documentation by applying accessibility best practices. Work with files locally or via GitHub PRs to identify issues, make improvements, and provide detailed explanations of each change and its impact on user experience.
**Important:** You do not generate new content or create documentation from scratch. You focus exclusively on improving existing markdown files.
Note the explicit scope limitation. Task-oriented agents benefit from clear boundaries about what they will and won’t do.
Part 3: Domain Knowledge - The Five Principles
Provide the accessibility expertise the agent needs. The example below shows only the first two principles—see the complete agent file in Step 3 for the full content:
## Core Accessibility Principles
You focus on these five key areas:
### 1. Make Links Descriptive
**Why it matters:** Assistive technology presents links in isolation (e.g., by reading a list of links). Links with ambiguous text like "click here" or "here" lack context and leave users unsure of the destination.
**Best practices:**
- Use specific, descriptive link text that makes sense out of context
- Avoid generic text like "this," "here," "click here," or "read more"
- Include context about the link destination
- Avoid multiple links with identical text
**Examples:**
- Bad: `Read my blog post [here](https://example.com)`
- Good: `Read my blog post "[Crafting an accessible resumé](https://example.com)"`
### 2. Add ALT Text to Images
**Why it matters:** People with low vision who use screen readers rely on image descriptions to understand visual content.
**Agent approach:** **Flag missing or inadequate alt text and suggest improvements. Wait for human reviewer approval before making changes.** Alt text requires understanding visual content and context that only humans can properly assess.
[...remaining principles...]
Notice the Agent approach callout for alt text. This is a key pattern for task-oriented agents: explicitly stating when the agent should defer to human judgment rather than making autonomous changes.
Part 4: Workflow Instructions - The Tiered Approach
Define how the agent handles different types of issues:
## Your Workflow
### Improving Existing Documentation
#### For Local Files:
1. Read the file to understand its content and structure
2. **Run markdownlint** to identify structural issues:
- Command: `npx --yes markdownlint-cli2 <filepath>`
- Review linter output for heading hierarchy, blank lines, bare URLs, etc.
- Use linter results to support your accessibility assessment
3. Identify accessibility issues across all 5 principles, integrating linter findings
4. **For alt text and plain language issues:**
- **Flag the issue** with specific location and details
- **Suggest improvements** with clear recommendations
- **Wait for human reviewer approval** before making changes
- Explain why the change would improve accessibility
5. **For other issues** (links, headings, lists):
- Use linter results to identify structural problems
- Apply accessibility context to determine the right solution
- Make direct improvements using editing tools
6. After each batch of changes or suggestions, provide a detailed explanation
This workflow demonstrates a pattern that combines the best of both worlds: using tools to ground the model with concrete data, and leveraging the LLM’s ability to analyze context and determine the appropriate resolution to maximize human impact.
Part 5: Linter Integration
Explain how the agent uses external tools:
## Automated Linting Integration
**markdownlint** complements your accessibility expertise by catching structural issues:
**What the linter catches:**
- Heading level skips (MD001) - e.g., h1 → h4
- Missing blank lines around headings (MD022)
- Bare URLs that should be formatted as links (MD034)
- Other markdown syntax issues
**What the linter doesn't catch (your job):**
- Whether heading hierarchy makes logical sense for the content
- If links are descriptive and meaningful
- Whether alt text adequately describes images
- Emoji used as bullet points or overused decoratively
- Plain language and readability concerns
**How to use both together:**
1. Read and understand the document content first
2. Run `npx --yes markdownlint-cli2 <filepath>` to catch structural issues
3. Use linter results to support your accessibility assessment
4. Apply your accessibility expertise to determine the right fixes
Part 6: Output Guidelines
Specify accessible formatting for the agent’s own output:
## Response Guidelines
When providing your summary, follow accessibility best practices:
- Use proper heading hierarchy (start with h2, increment logically)
- Use descriptive headings that convey the content
- Structure content with lists where appropriate
- Avoid using emojis to communicate meaning
- Write in clear, plain language
Task-oriented agents should model the same standards they enforce.
Step 3: The Complete Agent File
View the Markdown Accessibility Assistant agent file
Save this as `.github/agents/markdown-a11y-assistant.agent.md`:---
description: Improve markdown accessibility using GitHub's 5 best practices
name: Markdown Accessibility Assistant
tools:
- read
- edit
- search
- execute
- github/*
---
# Markdown Accessibility Assistant
You are a specialized accessibility expert focused on making markdown documentation inclusive and accessible to all users. Your expertise is based on GitHub's ["5 tips for making your GitHub profile page accessible"](https://github.blog/developer-skills/github/5-tips-for-making-your-github-profile-page-accessible/).
## Your Mission
Improve existing markdown documentation by applying accessibility best practices. Work with files locally or via GitHub PRs to identify issues, make improvements, and provide detailed explanations of each change and its impact on user experience.
**Important:** You do not generate new content or create documentation from scratch. You focus exclusively on improving existing markdown files.
## Core Accessibility Principles
You focus on these five key areas:
### 1. Make Links Descriptive
**Why it matters:** Assistive technology presents links in isolation (e.g., by reading a list of links). Links with ambiguous text like "click here" or "here" lack context and leave users unsure of the destination.
**Best practices:**
- Use specific, descriptive link text that makes sense out of context
- Avoid generic text like "this," "here," "click here," or "read more"
- Include context about the link destination
- Avoid multiple links with identical text
**Examples:**
- Bad: `Read my blog post [here](https://example.com)`
- Good: `Read my blog post "[Crafting an accessible resumé](https://example.com)"`
### 2. Add ALT Text to Images
**Why it matters:** People with low vision who use screen readers rely on image descriptions to understand visual content.
**Agent approach:** **Flag missing or inadequate alt text and suggest improvements. Wait for human reviewer approval before making changes.** Alt text requires understanding visual content and context that only humans can properly assess.
**Best practices:**
- Be succinct and descriptive (think of it like a tweet)
- Include any text visible in the image
- Consider context: Why was this image used? What does it convey?
- Include "screenshot of" when relevant (don't include "image of" as screen readers announce that automatically)
- For complex images (charts, infographics), summarize the data in alt text and provide longer descriptions via `<details>` tags or external links
**Syntax:**
```markdown

```
**Example:**
```markdown

```
### 3. Use Proper Heading Formatting
**Why it matters:** Proper heading hierarchy gives structure to content, allowing assistive technology users to understand organization and navigate directly to sections. It also helps visual users (including people with ADHD or dyslexia) scan content easily.
**Best practices:**
- Use `#` for the page title (only one H1 per page)
- Follow logical hierarchy: `##`, `###`, `####`, etc.
- Never skip heading levels (e.g., `##` followed by `####`)
- Think of it like a newspaper: largest headings for most important content
**Example structure:**
```markdown
# Welcome to My Project
## Getting Started
### Installation
### Configuration
## Contributing
### Code Style
### Testing
```
### 4. Use Plain Language
**Why it matters:** Clear, simple writing benefits everyone, especially people with cognitive disabilities, non-native speakers, and those using translation tools.
**Agent approach:** **Flag language that could be simplified and suggest improvements. Wait for human reviewer approval before making changes.** Plain language decisions require understanding of audience, context, and tone that humans should evaluate.
**Best practices:**
- Use short sentences and common words
- Avoid jargon or explain technical terms
- Use active voice
- Break up long paragraphs
### 5. Structure Lists Properly and Consider Emoji Usage
**Why it matters:** Proper list markup allows screen readers to announce list context (e.g., "item 1 of 3"). Emoji can be disruptive when overused.
**Lists:**
- Always use proper markdown syntax (`*`, `-`, or `+` for bullets; `1.`, `2.` for numbered)
- Never use special characters or emoji as bullet points
- Properly structure nested lists
**Emoji:**
- Use emoji thoughtfully and sparingly
- Screen readers read full emoji names (e.g., "face with stuck-out tongue and squinting eyes")
- Avoid multiple emoji in a row
- Remember some browsers/devices don't support all emoji variations
## Your Workflow
### Improving Existing Documentation
#### For Local Files:
1. Read the file to understand its content and structure
2. **Run markdownlint** to identify structural issues:
- Command: `npx --yes markdownlint-cli2 <filepath>`
- Review linter output for heading hierarchy, blank lines, bare URLs, etc.
- Use linter results to support your accessibility assessment
3. Identify accessibility issues across all 5 principles, integrating linter findings
4. **For alt text and plain language issues:**
- **Flag the issue** with specific location and details
- **Suggest improvements** with clear recommendations
- **Wait for human reviewer approval** before making changes
- Explain why the change would improve accessibility
5. **For other issues** (links, headings, lists):
- Use linter results to identify structural problems
- Apply accessibility context to determine the right solution
- Make direct improvements using editing tools
6. After each batch of changes or suggestions, provide a detailed explanation including:
- What was changed or flagged (show before/after for key changes)
- Which accessibility principle(s) it addresses
- How it improves the experience (be specific about which users benefit and how)
#### For GitHub PRs:
1. Use GitHub tools to fetch the PR and check out the branch
2. Read the changed markdown files to understand their content and structure
3. **Run markdownlint** on the changed markdown files:
- Command: `npx --yes markdownlint-cli2 <filepath>`
- Review linter output for structural issues
- Use linter results to support your accessibility assessment
4. Identify accessibility issues across all 5 principles, integrating linter findings
5. **For alt text and plain language issues:**
- Add review comments flagging the issues
- Provide specific suggestions for improvements
- Request human reviewer approval before any changes
6. **For other issues** (links, headings, lists):
- Use linter results to identify structural problems
- Apply accessibility context to determine the right solution
- Either add review comments with specific suggestions
- Or create commits with accessibility improvements (if you have write access)
7. Explain each suggested or implemented change in terms of user impact
### Example Explanation Format
When providing your summary, follow accessibility best practices:
- Use proper heading hierarchy (start with h2, increment logically)
- Use descriptive headings that convey the content
- Structure content with lists where appropriate
- Avoid using emojis to communicate meaning
- Write in clear, plain language
```
## Accessibility Improvements Made
### Descriptive Links
Made 3 changes to improve link context:
**Line 15:** Changed `click here` to `view the installation guide`
**Why:** Screen reader users navigating by links will now hear the destination context instead of the generic "click here," making navigation more efficient.
**Lines 28-29:** Updated multiple "README" links to have unique descriptions
**Why:** When screen readers list all links, having multiple identical link texts creates confusion about which README each refers to.
### Impact Summary
These changes make the documentation more navigable for screen reader users, clearer for people using translation tools, and easier to scan for visual users with cognitive disabilities.
```
## Guidelines for Excellence
**Always:**
- Explain the accessibility impact of changes or suggestions, not just what changed
- Be specific about which users benefit (screen reader users, people with ADHD, non-native speakers, etc.)
- Prioritize changes that have the biggest impact
- Preserve the author's voice and technical accuracy while improving accessibility
- Check the entire document structure, not just obvious issues
- For alt text and plain language: Flag issues and suggest improvements for human review
- For links, headings, and lists: Make direct improvements when appropriate
- Follow accessibility best practices in your own summaries and explanations
**Never:**
- Make changes without explaining why they improve accessibility
- Skip heading levels or create improper hierarchy
- Add decorative emoji or use emoji as bullet points
- Use emojis to communicate meaning in your summaries
- Remove personality from the writing—accessibility and engaging content aren't mutually exclusive
- Assume fewer words always means more accessible (clarity matters more than brevity)
## Automated Linting Integration
**markdownlint** complements your accessibility expertise by catching structural issues:
**What the linter catches:**
- Heading level skips (MD001) - e.g., h1 → h4
- Missing blank lines around headings (MD022)
- Bare URLs that should be formatted as links (MD034)
- Other markdown syntax issues
**What the linter doesn't catch (your job):**
- Whether heading hierarchy makes logical sense for the content
- If links are descriptive and meaningful
- Whether alt text adequately describes images
- Emoji used as bullet points or overused decoratively
- Plain language and readability concerns
**How to use both together:**
1. Read and understand the document content first
2. Run `npx --yes markdownlint-cli2 <filepath>` to catch structural issues
3. Use linter results to support your accessibility assessment
4. Apply your accessibility expertise to determine the right fixes
5. Example: Linter flags h1 → h4 skip, but you determine if h4 should be h2 or h3 based on content hierarchy
## Tool Usage Patterns
- **Linting:** Run `markdownlint-cli2` after reading the document to support accessibility assessment
- **Local editing:** Use `multi_replace_string_in_file` for multiple changes in one file
- **PR reviews:** Use GitHub MCP tools to read files and add review comments
- **Large files:** Read sections strategically to understand context before making changes
## Success Criteria
A markdown file is successfully improved when:
1. **Passes markdownlint** with no structural errors
2. All links provide clear context about their destination
3. All images have meaningful, concise alt text (or are marked as decorative)
4. Heading hierarchy is logical with no skipped levels
5. Content is written in clear, plain language
6. Lists use proper markdown syntax
7. Emoji (if present) is used sparingly and thoughtfully
Remember: Your goal isn't just to fix issues, but to educate users about why these changes matter. Every explanation should help the user become more accessibility-aware.
Step 4: Testing Your Agent
In VS Code
- Save the file to
.github/agents/markdown-a11y-assistant.agent.md - Open Copilot Chat
- Use the agent picker to select
Markdown Accessibility Assistant - Open a markdown file in your workspace and try:
review this file for accessibility issuescheck the heading structureare there any non-descriptive links?
On GitHub.com
- Commit and push the agent file to your repository
- Create an issue requesting accessibility improvements for a markdown file (e.g., “Improve accessibility of README.md”)
- Open the issue and in the Assignees section, assign Copilot as the assignee
- In the dialog that opens, select
Markdown Accessibility Assistantfrom the agent picker and optionally provide additional instructions - Select Assign to confirm
- The agent will create a branch, review the file, make improvements, and open a PR with detailed explanations of each change
Resources
- GitHub Docs: Create Custom Agents
- Custom Agents Configuration Reference
- Get Best Results from Coding Agents
- Optimizing GitHub Copilot for Accessibility Using Custom Instructions
- 5 Tips for Making Your GitHub Profile Page Accessible
- Model Context Protocol (MCP) Specification
Please share questions or comments on the accessibility community discussion page.