adding-warehouse-perso…
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Run an improve-my-MCP campaign: an autoresearch-style loop that measures the MCP agent experience with the eval harness, picks the highest-impact tool problem from production data, makes one bounded fix, and keeps it only if before/after scores improve. Use when asked to
$ npx -y skills add PostHog/ai-plugin --skill improving-mcp-tools --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/improving-mcp-toolsContext preview
The summary Claude sees to decide when to auto-load this skill.
Run an improve-my-MCP campaign: an autoresearch-style loop that measures the MCP agent experience with the eval harness, picks the highest-impact tool problem from production data, makes one bounded fix, and keeps it only if before/after scores improve. Use when asked to
name: improving-mcp-tools description: > Run an improve-my-MCP campaign: an autoresearch-style loop that measures the MCP agent experience with the eval harness, picks the highest-impact tool problem from production data, makes one bounded fix, and keeps it only if before/after scores improve. Use when asked to "improve my MCP", run an MCP improvement campaign, fix tool discoverability or descriptions based on evidence, or prepare an eval-backed PR for a tool change. Every shipped change must carry eval evidence; guardrails below are hard rules.
An MCP server gets better only in ways you can measure. This skill is the campaign procedure: score the current agent experience, fix the biggest problem, re-score, and only ship changes the numbers justify. It is the operating manual for the "improve my MCP" loop — one iteration per pass, journaled so a later iteration (or a different agent) can resume without repeating work.
`services/mcp/evals/` is the harness. `benchmark/tasks.yaml` is a fixed set of agent tasks with `expected_tools` and `success_criteria`; scores are only comparable across runs of the same benchmark `version`.
`LIVE_MCP_URL=... LIVE_MCP_TOKEN=... pnpm exec tsx evals/runner/probe.ts --out score.json` from `services/mcp/`. Reports tool-presence misses (discoverability), probe failures, and latency p50/p95. Non-zero exit = regression.
accuracy. Use it for description/discoverability changes — probes cannot detect that an agent picks the wrong tool.
Run the harness against a **seeded local or devbox stack**, never against a customer project. Local recipe: `NODE_ENV=development PORT=9876 POSTHOG_API_BASE_URL=http://localhost:8000 pnpm dev:hono`, personal API key as `LIVE_MCP_TOKEN`.
1. **Measure.** Run the harness for a baseline. Pull production evidence with the MCP analytics tools (`query-mcp-tool-stats`, `query-mcp-tool-failures`, `query-mcp-tool-descriptions`, `query-mcp-tool-sample-intents`) and the lenses in the signals scout cookbook (`products/signals/skills/signals-scout-mcp-tool-calls/references/queries.md`): failure leaderboard, retry/struggle, latency, intents that matched no tool. 2. **Pick one issue.** Rank by reach × severity. Skip anything the journal shows with two failed attempts. One issue per iteration — a PR that fixes three things can't be attributed to any of them when scores move. 3. **Fix, bounded.** Only files inside the allowlist (below). Typical fixes: sharpen a tool description so the right intent finds it, tighten an input schema that agents keep getting wrong, fix an annotation, update a skill. 4. **Validate.** Re-run the affected benchmark slice plus a no-regression sample. Keep the change only if the target metric improves and nothing else degrades. A discarded change is a normal outcome — journal it and move on. 5. **Ship.** One PR per iteration with before/after scores in the body (format in [references/campaign-journal.md](references/campaign-journal.md)). Keep it stampable: ≤400 changed lines, only files inside the allowlist below, apply the `stamphog` label. Autonomy level comes from the campaign config — default is **draft PR for human review**; only arm auto-merge when the operator has explicitly enabled the self-driving experiment (see guardrails). 6. **Journal.** Append the iteration record before ending the pass.
These are not suggestions; violating any of them ends the campaign pass.
`products/*/skills/**`, `services/mcp/evals/**`, the codegen outputs of `pnpm generate-tools` / `scaffold-yaml` (`services/mcp/src/tools/generated/**` and `services/mcp/schema/generated-tool-definitions.json`), and docs. Anything else (handler code, package manifests, workflows, migrations, auth paths) → stop and hand the finding to a human as a draft PR or report instead.
read-only. Never create, mutate, or delete customer-visible objects while measuring.
score, and the exact harness commands used.
a fix it validates — changing the exam and the answer together proves nothing. Benchmark changes are their own PR and bump `version`.
after 3 open unmerged campaign PRs). Two failed attempts on an issue parks it permanently.
says stop — stop mid-iteration, journal state, end cleanly.
tool for another — that's why the no-regression sample is mandatory. The intent-cluster snapshot's `tool_overlaps` (see [`exploring-mcp-intent-clusters`](../exploring-mcp-intent-clusters/SKILL.md)) lists exactly which pairs compete for which intents: snapshot it before a description rewrite and recompute after, and treat a capture shift in an overlapping pair as the regression signal.
before attributing a latency change to your fix.
check `getToolsForFeatures` gating before "fixing" discoverability.
Official PostHog plugin for AI clients. Access PostHog products directly from your AI coding tool.
Repo: PostHog/ai-plugin
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user…
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with…
Split a completed PostHog task run into activity records — what the agent tried, whether it worked, what blocked it — and record each one through the…
Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click / rageclick / scroll-depth data for a URL, names the hot elements by…
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can…