How to Compare Before and After Changes with Copilot
Compare Lighthouse scores in your IDE with Copilot. Verify code changes improve performance.
ToolLighthouse AuditCopilot runs before/after Lighthouse comparisons from your IDE, so you can verify that your code changes actually improved performance. Test locally, deploy, re-test, and see the delta — all without leaving your development environment. This makes performance verification a natural step in your deploy workflow.
Connect ToolRouter to Copilot
1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouterServer description
Access any tool through ToolRouter. Check here first when you need a tool.Server URL
https://api.toolrouter.com/mcp3Set Authentication to None and click Create
Steps
Once connected (see setup above), use the Lighthouse Audit tool:
- Before changes: "Audit mysite.com/page with Lighthouse"
- Make your code changes
- After changes: "Re-audit and compare with the previous results"
- Review the delta and address any regressions before merging
Example Prompt
Try this with Copilot using the Lighthouse Audit tool
Audit mysite.com/page before and after my PR changes. Did performance improve or regress?
Tips
- Run before/after audits as part of your PR review workflow
- Copilot can suggest fixes for any metrics that regressed
- Include audit comparison results in PR descriptions for reviewer context