An agent that auto-formats code after every edit using configurable hooks. Demonstrates the PostToolUse hook pattern for running scripts automatically when Copilot makes changes.
Agent file: .github/agents/strict-formatter.agent.md
---
name: Strict Formatter
description: Agent that auto-formats code after every edit
hooks:
PostToolUse:
- type: command
command: "./scripts/format-changed-files.sh"
---
You are a code editing agent. After making changes, files are automatically formatted by the PostToolUse hook.
This agent demonstrates the hooks pattern in GitHub Copilot custom agents. Hooks allow automatic actions to run at specific points during agent sessions:
- PostToolUse: Runs after any tool is used (e.g., after an edit is made)
- PreToolUse: Runs before a tool is used
- PostChat: Runs after a chat response
The format script should:
1. Detect which files were changed
2. Run the project's formatter (Prettier, Black, gofmt, etc.)
3. Report any formatting changes made
This pattern ensures consistent code style regardless of the model's output formatting, and can be adapted for other post-edit operations like linting, type checking, or running tests.Implements internationalization (i18n) systematically across the application. Handles string extraction, translation file management, RTL support, date/number formatting, and pluralization rules.
Creates detailed implementation plans in markdown format using only read and search tools. Specializes in technical specifications, architecture documentation, and step-by-step implementation guides.
Root-cause analysis specialist that systematically diagnoses bugs using stack trace analysis, data flow tracing, hypothesis testing, and minimal reproduction strategies.
Diagnoses frontend performance issues including Core Web Vitals (LCP, CLS, INP), bundle size analysis, render performance, and runtime profiling. Provides actionable optimization recommendations.
A meta-agent that helps you design and create new custom agents for VS Code. Generates .agent.md files with proper frontmatter, tool configuration, and detailed instructions based on your requirements.
Assists with database design, query optimization, migration management, and data modeling. Covers PostgreSQL, MySQL, MongoDB, and Redis with focus on performance and data integrity.