Skip to content
Resources / Playbooks

Catch instrumentation breakage from coding agents

When an agent writes the code, it can call Skene's MCP server to check its tracking changes before it commits, while the fix is still cheap.

Job-to-be-done: Make sure your coding agent (Cursor, Claude Code, Codex, Devin) finds out about analytics drift before it commits. · Updated 2026-05-22

Problem context

Your team uses one or more coding agents heavily. Refactors and new features often come from agent output.

You have seen analytics calls disappear after agent-written PRs even when the rest of the diff looks clean.

The pull request review catches it, but at that point the human reviewer is already cleaning up after the agent.

What breaks if this is not solved

  • Reviewer time. Catching drift after the agent commits means the human is now the corrective signal.
  • Agent quality perception. Repeated post-hoc fixes make agents look worse than they are.
  • Velocity. Each agent PR with instrumentation drift turns into a multi-round review.

When this playbook applies

  • Your team has at least one agent that supports MCP (Cursor, Claude Code, Codex, Devin).
  • Developers are willing to add a server to their agent's MCP config.
  • You already have pull request reviews on as a fallback.

System approach

MCP can expose a deterministic plan-versus-scan check and a separate changed-code review. GitHub pull-request review uses its own path. Verify which mechanism your workflow invokes.

Surface findings inside the agent's own loop. The agent should see and react before commit.

Keep the friction low: the install should be a one-line config change per developer.

Execution steps

  1. Add the hosted MCP server to your client: point it at https://www.skene.ai/api/mcp with an X-API-Key header carrying a workspace API key. There is nothing to install.
  2. For Cursor, use the remote-server configuration in the current MCP integration docs. There is no local MCP executable to install.
  3. For Claude Code, follow its remote MCP configuration with the same endpoint and workspace-key header.
  4. Restart the agent. Confirm Skene appears in the available tools.
  5. Test: ask the agent to refactor a function that contains an analytics call. Verify Skene's tool gets invoked and reports drift if the call disappears.
  6. Share the install snippet in the team Slack or onboarding doc so every dev gets it.
  7. Keep pull request reviews turned on as a fallback: some PRs will come from devs who have not installed the MCP, or from external contributors.

Metrics to watch

  • Agent PRs with no Skene findings

    Should rise as agents learn from MCP feedback in-loop.

  • Time between commit and merge for agent PRs

    Trend down as fewer review cycles are needed.

Failure modes

  • Treating MCP as a replacement for pull request reviews. Use both.
  • Letting individual devs install the MCP without team-level visibility. The agent learns; the team should know what it is learning.
  • Not periodically auditing what the agent has been accepting as 'no drift'. The agent's judgment is good but not infallible.