Trim CLAUDE.md into skills and drop posthog-remote MCP - #140
Merged
Conversation
Move the GitHub PR operations reference and PostHog-specific workflow, database access, production architecture, and SDK repo notes out of the always-loaded CLAUDE.md into two new skills: github-pr-operations and posthog-context. Safety-critical rules (never post PR comments without approval, never use posthog-db against prod, never use socket IP addresses) stay in CLAUDE.md as standing one-liners. Remove the decommissioned posthog-remote MCP server from install.sh and update investigator.md to query PostHog product data via posthog-cli over Bash instead of the mcp__posthog-remote__exec tool.
There was a problem hiding this comment.
Pull request overview
This PR refactors always-loaded AI guidance by extracting PostHog- and GitHub-PR-specific operational references into dedicated skills, removes the decommissioned posthog-remote MCP server from installation, and updates the investigator agent guidance to use posthog-cli for product-data queries.
Changes:
- Add two new skills:
posthog-contextandgithub-pr-operations, moving repo-specific workflows/mechanics out ofai/CLAUDE.md. - Remove the
posthog-remoteMCP server fromai/install.sh. - Update
ai/agents/investigator.mdto replace the removedmcp__posthog-remote__execguidance withposthog-cli apivia restricted Bash.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ai/skills/posthog-context/SKILL.md | New PostHog-specific context skill (workflow, DB rules, architecture notes, SDK repo locations). |
| ai/skills/github-pr-operations/SKILL.md | New skill documenting PR comment/reply mechanics and thread resolution via gh. |
| ai/install.sh | Drops posthog-remote from the MCP server installation list and related env handling. |
| ai/CLAUDE.md | Trims always-loaded content down to safety-critical one-liners and pointers to the new skills. |
| ai/agents/investigator.md | Switches product-data guidance from removed MCP tool to posthog-cli api via restricted Bash. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 3. Note which approach you used in the Assumptions field. | ||
| 2. **Pick the region.** PostHog runs in US and EU. If the hypothesis doesn't specify, check the context or default to US (`mcp__grafana__*`); note which you used. | ||
| 3. **Execute queries.** Use Grafana MCP tools (`mcp__grafana__*` or `mcp__grafana-eu__*`) for metrics and logs, `mcp__posthog-db__*` for database state. Do not copy large query outputs into your report — extract the key numbers. | ||
| 3. **Execute queries.** Use Grafana MCP tools (`mcp__grafana__*` or `mcp__grafana-eu__*`) for metrics and logs, `mcp__posthog-db__*` for database state, `posthog-cli api` (via Bash) for PostHog product data. Do not copy large query outputs into your report — extract the key numbers. |
| @@ -49,9 +49,9 @@ You have access to: | |||
| - `mcp__grafana__*` — US Grafana (metrics, logs, dashboards, Loki, Prometheus) | |||
| - `mcp__grafana-eu__*` — EU Grafana (same capabilities, EU region) | |||
| - `mcp__posthog-db__*` — PostHog production database (for tenant state, schema inspection) | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the GitHub PR operations reference and PostHog specific workflow, database access, production architecture, and SDK repo notes out of the always loaded CLAUDE.md into two new skills, github-pr-operations and posthog-context. Safety critical rules (never post PR comments without approval, never use posthog-db against prod, never use socket IP addresses) stay in CLAUDE.md as standing one liners.
Remove the decommissioned posthog-remote MCP server from install.sh.
Update investigator.md to query PostHog product data via posthog-cli over Bash instead of the removed mcp__posthog-remote__exec tool.
Test plan
sh -n ai/install.shto confirm it still parses.