How to Compare Before and After Changes with Copilot

Compare Lighthouse scores in your IDE with Copilot. Verify code changes improve performance.

Tool
Lighthouse Audit icon
Lighthouse Audit

Copilot 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
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

Once connected (see setup above), use the Lighthouse Audit tool:

  1. Before changes: "Audit mysite.com/page with Lighthouse"
  2. Make your code changes
  3. After changes: "Re-audit and compare with the previous results"
  4. 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